Click HERE to see how Saviynt Intelligence is transforming the industry. |
06/29/2023 09:41 AM
Hi All,
We are using the below if else condition for ticket creation and it was working fine before we upgraded to 23.5 version but right now it just bypasses the if condition and irrespective of anything it is always passing the else value. Any suggestion on how to resolve this?
{
"call": [{
"name": "call1",
"connection": "acctAuth",
"url": "xxx",
"httpMethod": "xxx",
"httpParams": "{\"ticket\":[{\"eeid_c\":\"${user.employeeid}\",\"Subject\":\"${if((reqAttrs?.ApplicationType)=='Admin Right - MAC'){endpoint.customproperty1 +' ' + user.firstname +' ' + user.lastname} else {endpoint.customproperty6+' ' +user.firstname+' ' +user.lastname}}\", \"Cust_Category_c\":\"${if((reqAttrs?.ApplicationType)=='Admin Right - MAC'){endpoint?.customproperty2} else{endpoint?.customproperty7}}\", \"Item_c\":\"${if((reqAttrs?.ApplicationType)=='Admin Right - MAC'){endpoint?.customproperty3}else{endpoint?.customproperty8}}\", \"Cust_Type_c\":\"${if((reqAttrs?.ApplicationType)=='Admin Right - MAC'){endpoint?.customproperty4} else{endpoint?.customproperty9}}\", \"Description\":\"${if((reqAttrs?.ApplicationType)=='Admin Right - MAC'){endpoint?.customproperty5}else{endpoint?.customproperty10}}\"}]}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"ticketidPath": "CaseNumber",
"successResponses": {
"statusCode": [
200,
201
]
}
}]
}
Solved! Go to Solution.
07/02/2023 10:58 PM
Hi @agupta1
You can use Account Column customproperty populating in the Dynamic Attribute at the endpoint level and then you will be able to access its value in your create ticket JSON for now.
Sample:
{
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "xxx",
"httpMethod": "xxx",
"httpParams": "{\"ticket\":[{\"eeid_c\":\"${user.employeeid}\",\"Subject\":\"${if((reqAttrs?.customproperty20)=='Admin Right - MAC'){endpoint.customproperty1 +' ' + user.firstname +' ' + user.lastname} else {endpoint.customproperty6+' ' +user.firstname+' ' +user.lastname}}\", \"Cust_Category_c\":\"${if((reqAttrs?.customproperty20)=='Admin Right - MAC'){endpoint?.customproperty2} else{endpoint?.customproperty7}}\", \"Item_c\":\"${if((reqAttrs?.customproperty20)=='Admin Right - MAC'){endpoint?.customproperty3}else{endpoint?.customproperty8}}\", \"Cust_Type_c\":\"${if((reqAttrs?.customproperty20)=='Admin Right - MAC'){endpoint?.customproperty4} else{endpoint?.customproperty9}}\", \"Description\":\"${if((reqAttrs?.customproperty20)=='Admin Right - MAC'){endpoint?.customproperty5}else{endpoint?.customproperty10}}\"}]}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"ticketidPath": "CaseNumber",
"successResponses": {
"statusCode": [
200,
201
]
}
}
]
}
Also as you mentioned that the same dynamic attribute was working prior to the 23.5 version then, I will recommend creating a Service ticket to Saviynt with the evidence that the same was working earlier.