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

Sav4Sav REST connector multiple user update json condition

PeterRaja
New Contributor
New Contributor

Hi Team,

I have a requirement to trigger new hire email notification when 21 days account creation and reminder email notification 7 days prior to start date and one day before welcome email notification to user and credentials email notification to manager.

I am drying to achieve this using user update rule and task pass through via sav4sav rest connect updateuserjson. but i need to know how to use multiple calls or multiple conditions to achieve all my usecases on above. Using below json i can complete one of the usecase on above but not all.

Please help as soon as possible, i am on almost deadline now. Thanks in advance!

{
"actions": {
"Update Login": {
"call": [
{
"name":"call1",
"connection":"userAuth",
"url":"https://XXXXXXXX.saviyntcloud.com/ECM/api/v5/updateUser",
"httpMethod":"POST",
"httpContentType":"application/json",
"httpParams":"{\"username\": \"${user?.username}\",\"customproperty56\": \"True\"}",
"httpHeaders":{
"Authorization":"${access_token}",
"Content-Type":"application/json"
},
"successResponses":{
"message":"User Updated Successfully",
"statusCode":[
200,
201
]
}
}
]
}
}
}

 

Regards,

Peter

5 REPLIES 5

rushikeshvartak
All-Star
All-Star

Add 

Below tags in JSON

"conditions": {
            "daysSinceAccountCreation": 21
          },


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

PeterRaja
New Contributor
New Contributor

Thanks Rushikeshvartak. It is working now but it is triggering for all the attribute that are part of the sav4sav updateuser json logic..
I am sharing below updateuser json which i am using.

{
"actions": {
"Update Login": {
"call": [
{
"name":"JoinerReminerEmail",
"connection":"userAuth",
"httpMethod":"POST",
"httpContentType":"application/json",
"httpParams":"{\"username\": \"${user?.username}\",\"customproperty56\": \"True\"}",
"httpHeaders":{
"Authorization":"${access_token}",
"Content-Type":"application/json"
},
"conditions": {
 
"daysBeforeStartDate": 7
 
},
"successResponses":{
"message":"User Updated Successfully",
"statusCode":[
200,
201
]
}
},
{
"name":"JoinerWelcomeEmail",
"connection":"userAuth",
"httpMethod":"POST",
"httpContentType":"application/json",
"httpParams":"{\"username\": \"${user?.username}\",\"customproperty55\": \"True\"}",
"httpHeaders":{
"Authorization":"${access_token}",
"Content-Type":"application/json"
},
"conditions": {
 
"daysBeforeStartDate": 1
 
},
"successResponses":{
"message":"User Updated Successfully",
"statusCode":[
200,
201
]
}
},
{
"name":"JoinerCredsEmail",
"connection":"userAuth",
"httpMethod":"POST",
"httpContentType":"application/json",
"httpParams":"{\"username\": \"${user?.username}\",\"customproperty54\": \"True\"}",
"httpHeaders":{
"Authorization":"${access_token}",
"Content-Type":"application/json"
},
"conditions": {
 
"daysBeforeStartDate": 1
 
},
"successResponses":{
"message":"User Updated Successfully",
"statusCode":[
200,
201
]
}
},
{
"name":"Leaver14dayreminderEmailManager",
"connection":"userAuth",
"httpMethod":"POST",
"httpContentType":"application/json",
"httpParams":"{\"username\": \"${user?.username}\",\"customproperty53\": \"True\"}",
"httpHeaders":{
"Authorization":"${access_token}",
"Content-Type":"application/json"
},
"conditions": {
 
"daysBeforeEndDate": 14
 
},
"successResponses":{
"message":"User Updated Successfully",
"statusCode":[
200,
201
]
}
},
{
"name":"Leaver1dayreminderEmailManager",
"connection":"userAuth",
"httpMethod":"POST",
"httpContentType":"application/json",
"httpParams":"{\"username\": \"${user?.username}\",\"customproperty52\": \"True\"}",
"httpHeaders":{
"Authorization":"${access_token}",
"Content-Type":"application/json"
},
"conditions": {
 
"daysBeforeEndDate": 1
 
},
"successResponses":{
"message":"User Updated Successfully",
"statusCode":[
200,
201
]
}
},
{
"name":"Leaver14dayreminderEmailUser",
"connection":"userAuth",
"httpMethod":"POST",
"httpContentType":"application/json",
"httpParams":"{\"username\": \"${user?.username}\",\"customproperty51\": \"True\"}",
"httpHeaders":{
"Authorization":"${access_token}",
"Content-Type":"application/json"
},
"conditions": {
 
"daysBeforeEndDate": 14
 
},
"successResponses":{
"message":"User Updated Successfully",
"statusCode":[
200,
201
]
}
},
{
"name":"LeaversamedayEmailmanager",
"connection":"userAuth",
"httpMethod":"POST",
"httpContentType":"application/json",
"httpParams":"{\"username\": \"${user?.username}\",\"customproperty50\": \"True\"}",
"httpHeaders":{
"Authorization":"${access_token}",
"Content-Type":"application/json"
},
"conditions": {
 
"daysBeforeEndDate": 0
 
},
"successResponses":{
"message":"User Updated Successfully",
"statusCode":[
200,
201
]
}
},
{
"name":"LeaverDISEmail",
"connection":"userAuth",
"httpMethod":"POST",
"httpContentType":"application/json",
"httpParams":"{\"username\": \"${user?.username}\",\"customproperty49\": \"True\"}",
"httpHeaders":{
"Authorization":"${access_token}",
"Content-Type":"application/json"
},
"conditions": {
 
"daysBeforeEndDate": 0
 
},
"successResponses":{
"message":"User Updated Successfully",
"statusCode":[
200,
201
]
}
},
{
"name":"LeaverFTSEmail",
"connection":"userAuth",
"httpMethod":"POST",
"httpContentType":"application/json",
"httpParams":"{\"username\": \"${user?.username}\",\"customproperty48\": \"True\"}",
"httpHeaders":{
"Authorization":"${access_token}",
"Content-Type":"application/json"
},
"conditions": {
 
"daysBeforeEndDate": 0
 
},
"successResponses":{
"message":"User Updated Successfully",
"statusCode":[
200,
201
]
}
}
]
}
}
}
 
It is working but for all cp values are updated even if it trigger one cp value which is not expected and triggering all the emails at once.

Other attributes are nulled ? Screenshot from user update history


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

PeterRaja
New Contributor
New Contributor

They should be null and untouched but this update is marking them as True.

PeterRaja_0-1721650649815.pngPeterRaja_1-1721650672082.png

 

PeterRaja_2-1721650693950.png

 

You need to add callcondition logic each json should be called during specific logic /condition

Refer https://forums.saviynt.com/t5/tag/callcondition/tg-p 


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