PTC Arbortext Content Delivery Deployment > Advanced Configurations > Loading Users, Profiles, and Service Groups
Loading Users, Profiles, and Service Groups
Users, profiles, and service groups can be loaded from files during the initial setup and configuration of PTC Arbortext Content Delivery, rather than being created individually from the utilities on the administration home page. This is accomplished using the LoadFromFile command-line utility.
Once loaded into PTC Arbortext Content Delivery, these users, profiles, and service groups can be viewed and managed from the utilities on the administration home page.
The LoadFromFile syntax is as follows:
windchill wt.load.LoadFromFile -d <data file name> -u <username> -p <password>
where:
<data file name> specifies the name of the object file that contains the objects to be loaded. This argument is required.
<username> and <password> are the credentials for the PTC Arbortext Content Delivery administrator. These arguments are optional, but if they are not entered with the command, you are prompted to authenticate when the utility is run.
For example, to load users from a file named Users.xml, complete the following steps:
1. Open the command prompt from <HOME>\SW\SW\Applications\Windchill.ear\bin
2. Open a Windchill shell.
3. Run the following command:
windchill wt.load.LoadFromFile -d Users.xml
4. When prompted to authenticate, provide the credentials of a PTC Arbortext Content Delivery administrator.
* 
This utility is also available from the PTC Arbortext Content Delivery administrator UI. On the administrator page, go to the respective entity which you want to load (user, profiles, or dealers). Click the link at the top-right corner for Load User on the Users page, or Load Profiles on the Profile page, or Load Service Group on the dealers page. Browse to the respective xml files and that data gets loaded.
The following sections include sample load files for loading users, profiles, and service groups:
Loading Users
Loading Profiles
Loading Service Groups
Loading Users
Users from both the external enterprise identity management system (commonly LDAP) configured with PTC Arbortext Content Delivery, as well internal users can be bulk loaded into PTC Arbortext Content Delivery. Internal users are users created within PTC Arbortext Content Delivery for internal systems purposes, which are not present in the external enterprise identity management system.
For more information, see Users.
Load the SampleUsers.xml file by running the following command from a Windchill shell: wt.load.LoadFromFile -d SampleUsers.xml -u <username> -p <password>
The following SampleUsers.xml file shows the load file format for loading users.
<?xml version="1.0"?>
<!DOCTYPE NmLoader SYSTEM "standardX26.dtd">
<NmLoader>
<csvUser handler="wt.load.LoadUser.createUser">
<csvuser></csvuser>
<csvnewUser>mike</csvnewUser>
<csvwebServerID>mike</csvwebServerID>
<csvfullName>Mike Kangas</csvfullName>
<csvLast>SU</csvLast>
<csvLocale></csvLocale>
<csvEmail></csvEmail>
<csvDescription></csvDescription>
<csvTitle></csvTitle>
<csvOrganization></csvOrganization>
<csvStreet1></csvStreet1>
<csvStreet2></csvStreet2>
<csvCity></csvCity>
<csvState></csvState>
<csvCountry></csvCountry>
<csvZipCode></csvZipCode>
<csvignore></csvignore>
<csvpassword></csvpassword>
<csvDirectoryService>com.ptc.ldap-web</csvDirectoryService>
</csvUser>
<csvUser handler="wt.load.LoadUser.createUser">
<csvuser></csvuser>
<csvnewUser>sampleUser</csvnewUser>
<csvwebServerID>sampleUser</csvwebServerID>
<csvfullName>Sample User</csvfullName>
<csvLast>SU</csvLast>
<csvLocale></csvLocale>
<csvEmail>sampleUser@ptc.com</csvEmail>
<csvDescription></csvDescription>
<csvTitle></csvTitle>
<csvOrganization></csvOrganization>
<csvStreet1></csvStreet1>
<csvStreet2></csvStreet2>
<csvCity></csvCity>
<csvState></csvState>
<csvCountry></csvCountry>
<csvZipCode></csvZipCode>
<csvignore></csvignore>
<csvpassword>sampleUser</csvpassword>
<csvDirectoryService></csvDirectoryService>
</csvUser>
</NmLoader>
Note the following information:
The minimum fields that are mandatory for loading the users are: csvnewUser, csvLast, csvfullName, csvEmail, and csvpassword.
While the loader does not require the csvLast (user’s last name) element to be provided, it is a best practice to do so.
The csvDirectoryService element is optional. When it is not provided, the user is added to PTC Arbortext Content Delivery as an internal user. If the user must be added to the external enterprise identity management system (commonly LDAP) which is configured with PTC Arbortext Content Delivery, then the csvDirectoryService element must be populated with the appropriate value.
If you want to delete any users, use the following tag; value can be true or false: <csvShouldDelete>true</csvShouldDelete>
If the same user is loaded again, (keeping csvnewUser and csvpassword values the same) with different values for other fields, the user is updated with the provided values.
Loading Profiles
While loading profiles, you can load details such as name, description, PHNode—the product information, IENode—the information elements, the context of profile for which the profile belongs (for example, "/" for context of OEM dealer and "Dealer_Name" for context of some dealer), user, privilege, and enterpriseAttribute.
The following SampleProfiles.xml file shows the load file format for loading profiles.
<?xml version="1.0"?>
<!DOCTYPE InSObjects SYSTEM "standardX26.dtd">
<InSObjects>
<SCProfile>
<name>P2</name>
<description>Demo profile P2 from loader</description>
<objectContainerPath>/</objectContainerPath>
<PHNode>
<name>0000016616</name>
<value>SN_SedanHybrid_Engine V4</value>
<path>V=1~{"rId":"0000022202","op":["0000022202","0000015163","0000016604", "0000016607","0000022145","0000022144","0000016616"], "nn":289,"ts":1438844494106}
</path>
</PHNode>
<PHNode>
<name>0000022202</name>
<value>SEDAN</value>
<path>V=1~{&quot;rId&quot;:&quot;0000022202&quot;,&quot;op&quot;: [&quot;0000022202&quot;,&quot;0000014982&quot;]}</path>
</PHNode>
<IENode>
<name>Parts List</name>
<value>partsList</value>
<path>infoType</path>
</IENode>
<IENode>
<name>Media</name>
<value>Media</value>
<path>docType</path>
</IENode>
<user>u1</user>
<user>u2</user>
<user>u3</user>
<privilege>Activation</privilege>
<privilege>ORDER_OEM_SUBMITTER</privilege>
<enterpriseAttributes>
<name>facsimileTelephoneNumber</name>
<value>340985034</value>
</enterpriseAttributes>
<enterpriseAttributes>
<name>mail</name>
<value>demo_user@ptc.com</value>
</enterpriseAttributes>
</SCProfile>
<SCProfile>
<name>P1</name>
<description>Demo profile P1 from loader</description>
<objectContainerPath>/</objectContainerPath>
<allPHNode>true</allPHNode>
<allIENode>true</allIENode>
<user>u1</user>
<user>u2</user>
<user>u3</user>
<privilege>Activation</privilege>
<privilege>ORDER_OEM_SUBMITTER</privilege>
<enterpriseAttributes>
<name>facsimileTelephoneNumber</name>
<value>340985034</value>
</enterpriseAttributes>
<enterpriseAttributes>
<name>mail</name>
<value>demo_user@ptc.com</value>
</enterpriseAttributes>
</SCProfile>
</InSObjects>
Note the following information:
For each PHNode element (product hierarchy), you must specify the name, value, and path values. These values are found from the PTC Arbortext Content Delivery system, as follows:
value—Use the name of the specific product hierarchy level from the bread crumb navigation.
path—Use the following steps to determine the path value:
1. In the PTC Arbortext Content Delivery user interface, navigate to the specific product hierarchy level which you want to include in the profile. Do not navigate further down the information structure hierarchy, to ensure that only the relative orientation path ID for the product hierarchy level is included.
2. Copy the string from the browser URL which comes after Product::. For example: Vj0xfnsicklkIjoiMDAwMDAyMjIwMiIsIm9wIjpbIjAwMDAwMjIyMDIiLCIwMDAwMDE0OTgyIiwiMDAwMDAxNjYwMSIsIjAwMDAwMTY2MTAiXSwibm4iOjQ5NCwidHMiOjE0NTk3NzExMjUwNzF9
3. Use an open source decoder (such as https://www.base64decode.org/) to get the required orientation path output. For the URL string in step 2, this required orientation path output is: V=1~{"rId":"0000022202","op":["0000022202","0000014982","0000016601","0000016610"],"nn":494,"ts":1459771125071}
name—Use the last ID number in the “op”:[] section of the orientation path output from step 3.
IENode—Similarly, you can provide the information elements. If you want to provide all the information elements, use: <allIENode>true</allIENode>
objectContainerPath—This field provides information about the dealer who is creating the profile. If the dealer creating the profile is OEM, provide / as the value.For example, <objectContainerPath>/</objectContainerPath>
If the dealer creating the profile is already a loaded dealer, then provide name of the dealer as the value.For example, <objectContainerPath>Service Group</objectContainerPath>
privilege—Privileges can also be assigned to a profile via loader, the possible values are: “ORDER_SUBMITTER”,ACCESS_PRICING_AVAILABILITY "BOOK_PRINT”,"DOWNLOAD_AND_UPDATE_CONTENT”,"SHARE_LISTS,"UPDATE_CONTENT”,"SearchAllParts","Activation","ViewNotes""CreateNotes""ShareNotes""ViewAllFeedback"
For example, <privilege>ORDER_SUBMITTER</privilege>
user—To associate an user to a profile, provide the user’s name.For example, <user>u1</user> This user should be already loaded.
If you want to delete any profiles, use the following tag; value can be true or false: <ShouldDelete>true</ShouldDelete>
Loading Service Groups
While loading a service group, you can provide information such as name, description, logo, user (member users and admin users), and profiles.
The following SampleServiceGroups.xml file shows the load file format for loading service groups.
* 
Service groups can be bulk loaded.
<?xml version="1.0"?>
<!DOCTYPE Dealership SYSTEM "standardX26.dtd">
<Dealerships>
<Dealership>
<name>DEALER_WITH_PROFILE_ASSOCIATED</name>
<description>Dealer with profile and user and admin user associated</description>
<isLoader>true</isLoader>
<administrator>autoDealerAdmin</administrator>
<logo>
<fileName>TestDealerLogo1</fileName>
<fileLocation>codebase.war/wt/icons/TestDealerLogo.jpg</fileLocation>
</logo>
<user>bco1</user>
<profile>
<profileId>BCO Profile</profileId>
</profile>
</Dealership>
</Dealerships>
Note the following information:
The isLoader element must have a value of true when loading service groups.
The value of the fileLocation element for the service group logo must be relative to the Windchill.ear location or absolute path of the accessible location of the logo.
profileId—Name of the profile to map to the service group; can be multiple. For example, <profileId>BCO Profile</profileId>
user—Name of the user to map to the service group; can be multiple.For example, <user>bco1</user>
If you want to delete any service group/dealer, use the following tag; value can be true or false: <ShouldDelete>true</ShouldDelete>