Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Workday - email writeback - Dynamic Worker_Reference

Houssem93
New Contributor II
New Contributor II

Hello,

 

I configurated a Workday connector (Workday_Hybrid_OAUTH(Workday)) to write back the email to Workday.

The following UPDATE_USER_PAYLOAD is working fine for "Internals":

<bsvc:Change_Work_Contact_Information_Request
xmlns:bsvc="urn:com.workday/bsvc"
bsvc:version="${API_VERSION}">
<bsvc:Business_Process_Parameters>
<bsvc:Auto_Complete>true</bsvc:Auto_Complete>
<bsvc:Run_Now>true</bsvc:Run_Now>
<bsvc:Discard_On_Exit_Validation_Error>true</bsvc:Discard_On_Exit_Validation_Error>
</bsvc:Business_Process_Parameters>
<bsvc:Change_Work_Contact_Information_Data>
<bsvc:Person_Reference>
<bsvc:ID bsvc:type="Employee_ID">${user.employeeid}</bsvc:ID>
</bsvc:Person_Reference>
<bsvc:Event_Effective_Date>${CURRENT_PROV_TIMESTAMP}</bsvc:Event_Effective_Date>
<bsvc:Person_Contact_Information_Data>
<bsvc:Person_Email_Information_Data bsvc:Replace_All="false">
<bsvc:Email_Information_Data bsvc:Delete="false">
<bsvc:Email_Data>
<bsvc:Email_Address>${user.email}</bsvc:Email_Address>
<bsvc:Email_Comment>New Email</bsvc:Email_Comment>
</bsvc:Email_Data>
<bsvc:Usage_Data bsvc:Public="true">
<bsvc:Type_Data bsvc:Primary="true">
<bsvc:Type_Reference>
<bsvc:ID bsvc:type="Communication_Usage_Type_ID">WORK</bsvc:ID>
</bsvc:Type_Reference>
</bsvc:Type_Data>
<bsvc:Comments>New Primary email</bsvc:Comments>
</bsvc:Usage_Data>
</bsvc:Email_Information_Data>
</bsvc:Person_Email_Information_Data>
</bsvc:Person_Contact_Information_Data>
</bsvc:Change_Work_Contact_Information_Data>
</bsvc:Change_Work_Contact_Information_Request>

 

I want to update the <bsvc:Person_Reference> to put type="Employee_ID" when the worker is an internal and put "Contingent_Worker_ID" when the worker is an external.

I've tried the two following syntaxes but I am always getting a SOAP validation error of my request (see the attached logs) :

1st syntax: <bsvc:Worker_Reference> <bsvc:ID bsvc:type=\"'+(user.employeetype != 'Internal'?('Contingent_Worker_ID') : 'Employee_ID')+'\">'+user?.username+'</bsvc:ID> </bsvc:Worker_Reference>

2nd syntax: <bsvc:ID bsvc:type=\"${if((user?.employeeType.contains('Internal'))){'Employee_ID'} else {'Contingent_Worker_ID'}}\">${user.employeeid}</bsvc:ID> 

 

> Can you provide me the right syntax to implement please ? 

Thanks for your help !

N.B: We are on 24.7 version but it wasn't suggested in the Product Version list.

 

4 REPLIES 4

rushikeshvartak
All-Star
All-Star

Refer https://forums.saviynt.com/t5/identity-governance/how-to-use-conditions-in-soap-connector-response-m...

 

<bsvc:Change_Work_Contact_Information_Request
xmlns:bsvc="urn:com.workday/bsvc"
bsvc:version="${API_VERSION}">
<bsvc:Business_Process_Parameters>
<bsvc:Auto_Complete>true</bsvc:Auto_Complete>
<bsvc:Run_Now>true</bsvc:Run_Now>
<bsvc:Discard_On_Exit_Validation_Error>true</bsvc:Discard_On_Exit_Validation_Error>
</bsvc:Business_Process_Parameters>
<bsvc:Change_Work_Contact_Information_Data>
<bsvc:Person_Reference>
<bsvc:ID bsvc:type="${user.employeeType == 'Internal' ? 'Employee_ID' : 'Contingent_Worker_ID'}">${user.employeeid}</bsvc:ID>
</bsvc:Person_Reference>
<bsvc:Event_Effective_Date>${CURRENT_PROV_TIMESTAMP}</bsvc:Event_Effective_Date>
<bsvc:Person_Contact_Information_Data>
<bsvc:Person_Email_Information_Data bsvc:Replace_All="false">
<bsvc:Email_Information_Data bsvc:Delete="false">
<bsvc:Email_Data>
<bsvc:Email_Address>${user.email}</bsvc:Email_Address>
<bsvc:Email_Comment>New Email</bsvc:Email_Comment>
</bsvc:Email_Data>
<bsvc:Usage_Data bsvc:Public="true">
<bsvc:Type_Data bsvc:Primary="true">
<bsvc:Type_Reference>
<bsvc:ID bsvc:type="Communication_Usage_Type_ID">WORK</bsvc:ID>
</bsvc:Type_Reference>
</bsvc:Type_Data>
<bsvc:Comments>New Primary email</bsvc:Comments>
</bsvc:Usage_Data>
</bsvc:Email_Information_Data>
</bsvc:Person_Email_Information_Data>
</bsvc:Person_Contact_Information_Data>
</bsvc:Change_Work_Contact_Information_Data>
</bsvc:Change_Work_Contact_Information_Request>


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Houssem93
New Contributor II
New Contributor II

It's working as expected. Thanks a lot ! 

KP18
New Contributor
New Contributor

Hi @Houssem93 ,

Could you please let me know how it works. I also have the same requirement. Could you please help me what are the things needs to be configured.

Regards,

KP

musthak_ahamad
Regular Contributor
Regular Contributor

am trying to use the same json for my hybrid  workday feed , error logs  attached

i have the same requirement too  am  i missing something here?