Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

Can a newline character be preserved from SOAP response in User Import connection (Workday)?

pj5233
New Contributor III
New Contributor III

When importing users from Workday with the soap connector, there is a field with a formatted address which contains a semicolon and newline html characters (
)  to separate the street, from city, zip, etc.  It looks like this in the response: 
"123 Elm Ave.
Liberty, MO 60192
United States of America"
When imported in to an user customproperty field it strips out those characters and looks like this:

"123 Elm Ave.Liberty, MO 60192United States of America"

I have tried the mapping to the various size customproperties (tiny text, Medium text, and Long text) but it always strips it out.  Is there a way to preserve this or catch in preprocessor before it does and replace with a semi-colon or something?

Here is an example of the mapping of this field in the userimportmappings:

"CUSTOMPROPERTY60":"Worker_Data.Personal_Data.Contact_Data.Address_Data(Usage_Data->Type_Data->Type_Reference->ID=='WORK').@Formatted_Address"

 

 

 

 

 

 

5 REPLIES 5

DixshantValecha
Saviynt Employee
Saviynt Employee

I appreciate you reaching out to the Saviynt forums.

#It seems like the SOAP connector is removing the HTML newline character when importing the data to the custom property field. One solution could be to modify the SOAP connector's preprocessor to replace the HTML newline character with a semicolon or another separator before importing the data.

Here's an example of how to replace the HTML newline character with a semicolon in Python ,Jason :

Python

address = "123 Elm Ave.
Liberty, MO 60192
United States of America"
formatted_address = address.replace('
', ';')
print(formatted_address)

Output:-

123 Elm Ave.;Liberty, MO 60192;United States of America

Json format

import json

address = "123 Elm Ave.
Liberty, MO 60192
United States of America"
formatted_address = address.replace('
', ';')
json_data = json.dumps({'formatted_address': formatted_address})
print(json_data)

Output:-

{"formatted_address": "123 Elm Ave.;Liberty, MO 60192;United States of America"}

#You can modify the JSON structure to match your requirements.

#You can modify the preprocessor code to include this replacement logic and then import the data to the custom property field.

Please let me know if further information is needed on this.

pj5233
New Contributor III
New Contributor III

I was able to use a replace statement in the modifyUserJson preprocessor.  Thank you for your assistance

Can you share modifyUserJson 


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

I have this field going to customproperty46 on the user.  They wanted a comma instead of a semi-colon for the separator.  So I just added customproperty46 to the computed columns and added this to the preprocessorqueries:

"UPDATE NEWUSERDATA SET CUSTOMPROPERTY46 = REPLACE (CUSTOMPROPERTY46, '
', ', ')"

DixshantValecha
Saviynt Employee
Saviynt Employee

Thanks for the update we will mark this as a solution.