Skip to main content
Version: 2.2.3

importUserV2

This method allows adding/editing:

  • General user data;
  • Department and position (ID # and name);
  • Relationship between Department/Position/Team/Access group;
  • Relationship between user and domain controller;

If the user already exists - existing user ID -, the information will be edited and replaced for the information present in the request.

  • If a value of '1' is entered in the UpdateType attribute, the attributes of the list type will be replaced with the ones found in the request; if no value or 0 is entered, the values will be added to those already recorded in the system.

The only difference between the importUserV2 and the importUser method is that, before performing the operation previously carried out by the importUser method, the system will create or update the departments and positions mentioned in the DeptPosArray field.

For editing, the standard documented below must be followed.

Java class
Requestweb/wwwroot/ws/java/administration/ImportUserV2RequestType.java
Returnweb/wwwroot/ws/java/administration/ImportUserV2ResponseType.java

Request:

IDRequiredDescription
UserIdXUser ID.
UserNameXUser's name.
UserLoginXName the user inserts to log in to the system.
UserPasswordXUser's password.
UserCounterSignUser's countersign.
UserLanguageEnter the user's language code, in accordance with the "Database Encoding" column of the Localization section, in the System Requirements document.
IsActiveEnabled user (1 - Enabled, 0 - Disabled).
IsEnabledBlocked user (1 - Blocked, 0 - Unblocked).
NumMaxConnectionsUser's maximum number of connections.
UserPhoneUser's phone #.
UserEmailXUser's e-mail address.
LeaderIdLeader's ID #.
UserPhotoUser's image in binary format 64.
UserDomainIdX¹User's unique ID # in the domain controller.
DomainIdX²ID # of the AD domain registered in SoftExpert Suite and to which the user is linked. (Used when synchronizing user data with Domain controller).
AccGroupIdArrayList of access group identifiers, separated by commas if you wish to add more than one.
DeptPosArrayList with the identifiers and names of the user's departments and positions. Each position on this list (array) represents a department and a position that will have the following fields:
DEPARTMENTID: String; Department ID #;
DEPARTMENTNAME: String; Department title;
POSITIONID: String; Position ID #;
POSITIONNAME: String; Position title;
FGDEFAULT: Integer; Use as default: [1 - Yes, 2 - No];
TeamIdArrayList of team identifiers, separated by commas if you wish to add more than one team.
UpdateTypeDefinition on how the list of values of the AccGroupIdArray, DeptPosArray, and TeamIdArray parameters will be considered in user import:
â–ª When the user is saved, if 0 is entered, the values entered in the AccGroupIdArray, DeptPosArray, and TeamIdArray parameters will be added to the values already defined in a previous record of the user.
â–ª When the user is saved, if 1 is entered, the values entered in the AccGroupIdArray, DeptPosArray, and TeamIdArray parameters will replace the values already defined in a previous record of the user.
Note: If no value is entered, the system will consider the value 0 by default.
info
  • X¹ - Required if the DomaindId field is filled in.
  • X² - Required if the UserDomaindId field is filled in.
info

Information about the list with the user's departments and positions (DeptPosArray field):

  • For editing cases, the user's current default department/position can be changed only if the UpdateType parameter is defined with the value 1;
  • The filling of the DeptPosArray parameter will always define the user's default department/position;
  • If the FGDEFAULT parameter of the DeptPos field is filled in an item from the list, it will have to be filled in the other items as well;
  • If the FGDEFAULT parameter of the DeptPos field is not filled in any of the items from the list, the first item will be considered the user's default department/position.
  • If the FGDEFAULT parameter of the DeptPos field is filled with the same value (1 or 2) in all items from the list, the first item will be considered the user's default department/position.
caution

To find out what the domain controller ID # is, you must select the return of the OID column from the following SQL:

â–ª select OID, * from ADAUTHLDAPCONFIG

If it is necessary to link the user with AD via web service, we recommend disabling user synchronization. To do that, simply access the Configuration > Authentication screen, go to the General options tab, and uncheck the "Enable synchronization scheduling" option.

caution

You can only insert or edit one user at a time through this method. This means that it is not possible to update a list of users by sending a single request.

Request structure:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:admin">
<soapenv:Header/>
<soapenv:Body>
<urn:importUserV2>
<!--You may enter the following 19 items in any order-->
<urn:UserId>?</urn:UserId>
<urn:UserName>?</urn:UserName>
<urn:UserLogin>?</urn:UserLogin>
<urn:UserPassword>?</urn:UserPassword>
<!--Optional:-->
<urn:UserCounterSign>?</urn:UserCounterSign>
<!--Optional:-->
<urn:UserLanguage>?</urn:UserLanguage>
<!--Optional:-->
<urn:IsActive>?</urn:IsActive>
<!--Optional:-->
<urn:IsEnabled>?</urn:IsEnabled>
<!--Optional:-->
<urn:NumMaxConnections>?</urn:NumMaxConnections>
<!--Optional:-->
<urn:UserPhone>?</urn:UserPhone>
<!--Optional:-->
<urn:UserEmail>?</urn:UserEmail>
<!--Optional:-->
<urn:LeaderId>?</urn:LeaderId>
<!--Optional:-->
<urn:UserPhoto>cid:1016152952596</urn:UserPhoto>
<!--Optional:-->
<urn:UserDomainId>?</urn:UserDomainId>
<!--Optional:-->
<urn:DomainId>?</urn:DomainId>
<!--Optional:-->
<urn:AccGroupIdArray>?</urn:AccGroupIdArray>
<!--Optional:-->
<urn:DeptPosArray>
<!--Zero or more repetitions:-->
<urn:DeptPos>
<!--You may enter the following 5 items in any order-->
<urn:DepartmentID>?</urn:DepartmentID>
<urn:DepartmentName>?</urn:DepartmentName>
<urn:PositionID>?</urn:PositionID>
<urn:PositionName>?</urn:PositionName>
<urn:FgDefault>?</urn:FgDefault>
</urn:DeptPos>
</urn:DeptPosArray>
<!--Optional:-->
<urn:TeamIdArray>?</urn:TeamIdArray>
<!--Optional:-->
<urn:UpdateType>?</urn:UpdateType>
</urn:importUserV2>
</soapenv:Body>
</soapenv:Envelope>

Return:

IDDescription
UserIDID of the added or edited user.
StatusRequest response status.
DetailRequest details.
CodeDescription
59Language not supported by the database
60Inexistent language