12 Users

This chapter provides developers with formats for user requests sent to the Customer Engagement application. The following type of request is supported:

Overview

The primary purpose of the user request is to create or update user records.

Add/Update User

The purpose of this action is to either create or update a user record.

  • If the user does not exist in Customer Engagement, this request adds a user record.

  • If the user exists in Customer Engagement, this request updates the user record.

Fields

The elements in the table below are the elements/attributes that may be used in an Add/Update User request. The sample request shows the placement of these elements/attributes. Not all of these elements/attributes need to be used in any one request.

XML Tag Comments

<User Action=” ”>

Action: Add - Add the user. Update - Make changes to an existing user. Note that Customer Engagement will automatically add a user that does not already exist, and will update an existing user, regardless of the Action setting.

<UserId>

Login ID of the new user. This field is used to determine whether a user exists.

<UserName>

Name of the user.

<RetailLocationId>

ID of the retail location to which the user is assigned.

<Email>

User email address.

<LanguageCode>

ISO-639 code for the user’s language.

<CountryCode>

ISO-3166 code for the user’s country.

<ManagerUserId>

ID of the user’s manager.

<ManagerFlag>

Indicates whether the user is a manager.

<UserRole

Configures a role for the user. Include one of these elements for each role being configured.

RoleCode=” ”

RoleCode: Name of the role.

Action=” ”>

Action: Add - Add the role and its related permissions to the user. Delete - Remove the role and its related permissions from the user.

<UserOrganization

Configures a user organization for the user. Include one of these elements for each user organization being configured.

UserOrganizationName=” ”

UserOrganizationName: Name of the user organization.

Action=” ”>

Action: Add - Add the user to the user organization. Delete - Remove the user from the user organization.

Example

An Add/Update User request should appear similar to the example below. The user data included will vary according to each particular request.

If you are processing more than one user record in a batch file, multiple <User> sections should be used.

<UserMaintenance>  <User Action="Add">    <UserId><USERID></UserId>    <UserName><EXAMPLE_USER></UserName>    <RetailLocationId><ID></RetailLocationId>    <Email><USERID>@<TNS_ALIAS></Email>    <LanguageCode>en</LanguageCode>    <CountryCode>US</CountryCode>    <ManagerUserId><USER_ID></ManagerUserId>    <ManagerFlag>false</ManagerFlag>    <UserRole RoleCode="AccountAdmin" Action="Add"/>    <UserRole RoleCode="CustomerMaintenance" Action="Add"/>    <UserOrganization UserOrganizationName="EXAMPLE1" Action="Add"/>    <UserOrganization UserOrganizationName="EXAMPLE2" Action="Add"/>  </User>  <User Action="Update">    <UserId><USERID></UserId>    <UserName><EXAMPLE_USER></UserName>    <RetailLocationId>00002</RetailLocationId>    <Email><USERID>@<TN_ALIAS></Email>    <LanguageCode>en</LanguageCode>    <CountryCode>PH</CountryCode>    <ManagerUserId><USERID></ManagerUserId>    <ManagerFlag>false</ManagerFlag>    <UserRole RoleCode="AccountAdmin" Action="Delete"/>    <UserRole RoleCode="CustomerMaintenance" Action="Add"/>    <UserOrganization UserOrganizationName="EXAMPLE1" Action="Delete"/>    <UserOrganization UserOrganizationName="EXAMPLE2" Action="Add"/>  </User></UserMaintenance>

Batch Processing Errors

The following table contains a list of errors that may occur and possible causes:

Error Cause

INVALID_COUNTRY_CODE

Country code is not valid.

INVALID_LANGUAGE_CODE

Language code is not valid.

INVALID_RELATE_ROLE

Role does not exist.

INVALID_USER_ORGANIZATION

User organization does not exist.

RETAIL_LOCATION_ID_INVALID

Location ID does not exist.

USER_COUNTRY_REQUIRED

No country code was included.

USER_EMAIL_REQUIRED

No email address was included.

USER_ID_UNSPECIFIED

No user ID was included.

USER_LANGUAGE_REQUIRED

No language code was included.

USER_NAME_REQUIRED

No user name was included.

Batch File Response

A complete copy of the incoming request is placed in the /complete/[Fileset Name]/archived directory.

Each <User> block in the request that was not successfully processed is placed in a file with _failures appended to the original filename and saved in the /complete/[Fileset Name]/failed directory.

You may be able to determine the reason for the failure by using the Batch Import Review pages (see Introduction).