Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Salesforce Error in creating user = Error parsing JSON

cdavis2
Regular Contributor
Regular Contributor

I am getting an error when I test the provisioning for salesforce. Below is the JSON I am using.

{
"Username": "${user.email}.qa"
"Alias": "${user.firstname.toString().substring(0,1)}${user.lastname.toString().substring(0,4)}",
"LastName": "${user.lastname}",
"FirstName": "${user.firstname}",
"CompanyName": "${user.orgunitid}",
"Department": "${user.departmentname}",
"Title": "${user.title}",
"Street": "${user.street}",
"City": "${user.city}",
"State": "${user.state}",
"PostalCode": "${user.customproperty19}",
"Country": "${user.country}",
"Email": "${user.email}",
"EmailPreferencesAutoBcc": true,
"EmailPreferencesAutoBccStayInTouch": false,
"EmailPreferencesStayInTouchReminder": true,
"Phone": "${user.secondaryPhone}",
"MobilePhone": "${user.phonenumber}",
"CommunityNickname": "${user.lastname}",
"IsActive": true,
"TimeZoneSidKey": "America/New_York",
"LocaleSidKey": "en_US",
"ReceivesInfoEmails": true,
"ReceivesAdminInfoEmails": true,
"EmailEncodingKey": "ISO-8859-1",
"LanguageLocaleKey": "en_US",
"EmployeeNumber": "${user.employeeid}",
"ProfileId":"${profileId}",
"UserPermissionsMarketingUser": false,
"UserPermissionsOfflineUser": false,
"UserPermissionsAvantgoUser": false,
"UserPermissionsCallCenterAutoLogin": false,
"UserPermissionsMobileUser": false,
"UserPermissionsSFContentUser": false,
"UserPermissionsInteractionUser": false,
"UserPermissionsSupportUser": false,
"ManagerId": "${managerAccount==null?'':managerAccount.accountID}",
}

9 REPLIES 9

jsatish
Regular Contributor
Regular Contributor

@cdavis2  - Can you try with below.

{
"Username": "${user.email}.qa",
"Alias": "${user.firstname.toString().substring(0,1)}${user.lastname.toString().substring(0,4)}",
"LastName": "${user.lastname}",
"FirstName": "${user.firstname}",
"CompanyName": "${user.orgunitid}",
"Department": "${user.departmentname}",
"Title": "${user.title}",
"Street": "${user.street}",
"City": "${user.city}",
"State": "${user.state}",
"PostalCode": "${user.customproperty19}",
"Country": "${user.country}",
"Email": "${user.email}",
"EmailPreferencesAutoBcc": true,
"EmailPreferencesAutoBccStayInTouch": false,
"EmailPreferencesStayInTouchReminder": true,
"Phone": "${user.secondaryPhone}",
"MobilePhone": "${user.phonenumber}",
"CommunityNickname": "${user.lastname}",
"IsActive": true,
"TimeZoneSidKey": "America/New_York",
"LocaleSidKey": "en_US",
"ReceivesInfoEmails": true,
"ReceivesAdminInfoEmails": true,
"EmailEncodingKey": "ISO-8859-1",
"LanguageLocaleKey": "en_US",
"EmployeeNumber": "${user.employeeid}",
"ProfileId":"${profileId}",
"UserPermissionsMarketingUser": false,
"UserPermissionsOfflineUser": false,
"UserPermissionsAvantgoUser": false,
"UserPermissionsCallCenterAutoLogin": false,
"UserPermissionsMobileUser": false,
"UserPermissionsSFContentUser": false,
"UserPermissionsInteractionUser": false,
"UserPermissionsSupportUser": false,
"ManagerId": "${managerAccount==null?'':managerAccount.accountID}"
}

cdavis2
Regular Contributor
Regular Contributor

I took out the .qa in the username apparently it does not like that at the end. Also how do I properly pass over the federation identifier. 

jsatish
Regular Contributor
Regular Contributor

You can use something like this as a Federation Identifier. 

"FederationIdentifier": "${user?.getSystemUserName()}"

${user?.getSystemUserName()} - This can be replaced with your specific value. 

cdavis2
Regular Contributor
Regular Contributor

I added the value to both the create and modify sections on the connector. Now when I submit an update to pass the federation identifier I am getting the following error. Error in updating UserAccount: INVALID_OR_NULL_FOR_RESTRICTED_PICKLISTmessage: Email Encoding: bad value for restricted picklist field: ISO-88591

The error you're encountering, "INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST," indicates that a value you're trying to assign to a restricted picklist field is not valid. In this case, it looks like the error is related to the "Email Encoding" field and the value "ISO-88591."

Here are the steps to troubleshoot and resolve this issue:

  1. Verify Picklist Values:

    • Go to Salesforce Setup.
    • Navigate to the object in question (likely the User object in this case).
    • Find the "Email Encoding" field and check its available picklist values.
    • Ensure that "ISO-88591" is an allowed value. It seems like there might be a typo; it should be "ISO-8859-1".
  2. Correct the Value:

    • If "ISO-88591" is incorrect, update it to "ISO-8859-1" or another valid value from the picklist.
  3. Update Your Connector Configuration:

    • Ensure that the connector you're using to update Salesforce is sending the correct value.
    • Update the connector to use "ISO-8859-1" or the appropriate value from the picklist.
  4. Review Integration Code/Configuration:

    • If you have custom code or middleware that interacts with Salesforce, review it to ensure it’s passing the correct value.
    • Look for any hard-coded values or mappings that might need updating.
  5. Test the Update:

    • After making these changes, test the update process again to ensure the error is resolved.

Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

So I confirmed with the Salesforce Team and they did say ISO-8859-1 is on the picklist. When you say update the connector is that the connector in Saviynt. If so how do I update that config?

cdavis2
Regular Contributor
Regular Contributor

I was able to correct it to the -1 and it worked. Lastly I need to pass the federation in all lower case does anyone have the JSON to properly set it to lowercase.

rushikeshvartak
All-Star
All-Star

Could you kindly provide a detailed snapshot of the information extracted from the logs, encompassing errors and other pertinent functionality details encountered during the execution of this process? Your assistance in furnishing this information would greatly aid in the analysis and resolution of any issues .


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

SumathiSomala
All-Star
All-Star

@cdavis2 Share the error logs

 

Regards,
Sumathi Somala
If this reply answered your question, please Accept As Solution and give Kudos.