and more in a single search tool across platforms. Read the announcement here. |
08/28/2023 12:58 PM
Hi Team,
Can we update the 'Owneronterminate' user attribute with 'Manager' value present on user profile using UpdateUserJSON of SAV4SAV REST connector type?
If yes, could you please share the sample JSON here?
Thanks,
08/28/2023 08:23 PM
{
"updateUserQry": [
"update users set owneronterminate=(select case when (owneronterminate!=manager OR owneronterminate is NULL or owneronterminate='') then manager else owneronterminate end) where userkey = ${user.id}"
]
}
08/29/2023 01:35 AM
Hi, shared query is not working, task is processing successfully where Owneronterminate field is not getting updated.
Also, Json format is different for REST based Sav4Sav.
09/25/2023 01:44 AM
Hi @Sanjeevini, were you able to achieve the needed? We are also interested in an example query for UpdateUserJSON in SAV4SAV Rest connector.
09/25/2023 02:24 AM
Please find below a sample JSON.
{
"actions": {
"Update Login": {
"call": [
{
"name": "updateusercp",
"connection": "userAuth",
"url": "https://<<TENANT-URL>>/ECM/api/v5/updateUser",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"username\": \"${user?.username}\",\"customproperty12\": \"Updating\"}",
"httpHeaders": {
"Authorization": "${access_token}",
"Content-Type": "application/json"
},
"successResponses": {
"message": "User Updated Successfully",
"statusCode": "200,201"
}
}
]
}
}
}
09/25/2023 02:44 AM
Hi @amit_krishnajit,
thank you for the provided example. Could you please share an example of SQL queries embedded into the JSON?
For example, how to use the below query in the SAV4SAV REST Connection?
UPDATE users u
SET u.customproperty7 CASE
WHEN EXISTS
(SELECT 1
FROM users
WHERE employeeclass = 'Production Employee'
AND statuskey = '1'
AND manager = u.userkey) THEN 'Y'
ELSE 'N'
END;
11/10/2023 06:53 AM
I don't think you can do a SQL query in the provisioning JSONs of REST connector. What is your requirement?
10/30/2023 06:34 AM
Hi,
Have a follow-up question on this thread, can we have an if-else condition in SAV4SAV REST Connection? if yes, could you please share the sample JSON?
Thanks,
11/10/2023 06:56 AM
Yes, you can.
${'Emp'.equals(user?.employeeType) ? 'DWD00L91' : 'CCD00K92'}