cancel
Showing results for 
Search instead for 
Did you mean: 

IPS conditional mapping of personal vs. business email from SF User to IAS User email

SAPSupport
Employee
Employee
0 Kudos

Hello,

I am seeking advice for implementing a customer requirement for using personal email of workers who do not have a domain account and therefore no business email assigned as the (unique) email of the related IAS user.

In SF we have the user field "email" for storing the email type (B) Business and another field "custom02" for storing the email type (P) Personal. HRIS Sync mapping is configured accordingly.

How does the JSON code in the IPS Transformation Template of the source system (SF) need to look like to have a conditional mapping in place to fullfil following requirement described as pseudo code:

IF SFuser.email is not NULL

           THEN map SFuser.email to target path $.emails

ELSE map SFuser.custom02 to target path$.emails

 


------------------------------------------------------------------------------------------------------------------------------------------------
Learn more about the SAP Support user and program here.
View Entire Topic
SAPSupport
Employee
Employee
0 Kudos

Email of the SF user is set to $.emails by the following default transformation:

            {
                "sourcePath": "$.emails",
                "targetPath": "$.emails",
                "optional": true,
                "preserveArrayWithSingleElement": true
            },

so, you just need to add logic for empty email like:

{
 "condition": "$.emails EMPTY true",
 "sourcePath": "$['urn:ietf:params:scim:schemas:extension:successfactors:2.0:User']['customFields'][?(@.customFieldName == 'custom02')]['value']",
 "targetPath": "$.emails[0].value"
}

Please note this works only if user data returned by SF SCIM API is like below:

{
...
 "emails": [],
 "urn:ietf:params:scim:schemas:extension:successfactors:2.0:User": {
  "customFields": [
                    {
                        "value": "testuser@bestrun.com",
                        "customFieldName": "custom02",
                        "display": "Customizable Field 2"
                    }
                ]
 }

...
}

If format of returned data is different than above, the transformation won't work and you need to make change according to actual data.

You can use steps in the following KBA to check data returned by SF SCIM API:

3309225 - How to check user data returned by SuccessFactors SCIM API(Version 2) for IPS trouble shooting using POSTMAN REST client