and more in a single search tool across platforms. Read the announcement here. |
04/19/2024 12:27 AM - edited 04/19/2024 12:31 AM
Hi Team,
We trying to implement a ServiceNow/ITSM connection with the Saviynt. We are having some issues while passing the ticket description in CreateTicketJSON. It passes the code value while filtering the tasktype in the condition.
Expectation: Subject will be Access Card : CREATE - [UserDisplayName] [TaskAccountName] if tasktype==3
Sample:
"httpParams": "{\"values\": {\"First_Name\": \"Lotus\",\"Last_Name\": \"Integration User\",\"Description\": \"{if(task.tasktype==3){${endpoint.customproperty6} : ${endpoint.customproperty7} - ${user.displayname} ${task.accountName}}}\",\"Detailed_Description\": \"This is Service Ticket\",\"Affected_Current_Site\": \"Head Office\",\"Assigned Support Company\": \"Lotus's\",\"Assigned Support Organization\": \"EUC\",\"Assigned Group\": \"THL3 IT Security Identity Mgmt\",\"Impact\": \"3000\",\"Urgency\": \"3000\",\"Reported Source\": \"API\",\"Service_Type\": \"Service\",\"Product Categorization Tier 1\": \"Hardware Software Services\",\"Product Categorization Tier 2\": \"Microsoft Application\",\"Product Categorization Tier 3\": \"Microsoft Outlook - Calendar\"}}",
I have tried to add the $ before if condition but it passes as below
\"Description\": \"${if(task.tasktype==3){${endpoint.customproperty6} : ${endpoint.customproperty7} - ${user.displayname} ${task.accountName}}}\",
Need your assistance to resolve it.
Solved! Go to Solution.
04/19/2024 11:39 AM
Please share full json. You are using one of the unsupported variable
04/21/2024 11:55 PM
PFA the full CreateTicketJSON
{
"call": [
{
"name": "call1",
"connection": "ITSMAuth",
"showResponse": true,
"url": "https://abc.xyz.com/api/v2/ticket",
"httpMethod": "POST",
"httpParams": "{\"values\": {\"First_Name\": \"Lotus\",\"Last_Name\": \"Integration User\",\"Description\": \"{if(task.tasktype==3){${endpoint.customproperty6} : ${endpoint.customproperty7} - ${user.displayname} ${task.accountName}}}\",\"Detailed_Description\": \"This is Service Ticket\",\"Affected_Current_Site\": \"Head Office\",\"Assigned Support Company\": \"Lotus's\",\"Assigned Support Organization\": \"EUC\",\"Assigned Group\": \"THL3 IT Security Identity Mgmt\",\"Impact\": \"3000\",\"Urgency\": \"3000\",\"Reported Source\": \"API\",\"Service_Type\": \"Service\",\"Product Categorization Tier 1\": \"Hardware Software Services\",\"Product Categorization Tier 2\": \"Microsoft Application\",\"Product Categorization Tier 3\": \"Microsoft Outlook - Calendar\"}}",
"httpHeaders": {
"Authorization": "${access_token}",
"contentType": "application/json"
},
"httpContentType": "application/json",
"ticketidPath": "values.Incident Number",
"successResponses": {
"statusCode": [
200,
201
]
}
}
]
}
And how can I know which attributes are not supported in SV?
Please help me with this.
04/22/2024 02:02 AM - edited 04/22/2024 02:05 AM
you can find variable exposed in below link
04/23/2024 03:24 AM
Refer a sample :
04/22/2024 11:00 PM
As per your suggestion, I have verified the JSON but didn't find any issue with the query.
Could you please help me with the unsupported variable that I am using?
04/22/2024 11:07 PM
Does hardcoded JSON works ?
04/26/2024 03:36 AM
Hi @Manu269
Thanks for your support it helped me a lot. I have successfully implemented the JSON and it is working as expected.
I need some more help on this. I am unable to pass the user details in a listing manner. But unable to get with \\n . And date format as MM-DD-YYYY (no need to have a timestamp)
Expectation:
PFA the full JSON
{
"call": [
{
"name": "call1",
"connection": "ITSMHWAuth",
"showResponse": true,
"url": "https://abc.xyz.com/api/v2/ticket",
"httpMethod": "POST",
"httpParams": "{\"values\": {\"First_Name\": \"Lotus\",\"Last_Name\": \"Integration User\",\"Description\": \"${if(task?.tasktype==3){' New Joiner HW - '+user.displayname+' - '+task.accountName+' '} else if(task.tasktype==14){' TERMINATED HW - '+user.displayname+' - '+task.accountName+' '} }\",\"Detailed_Decription\": \" ${if(task?.tasktype==3){' Request Type: Laptop Setup \\n StartDate: '+user.startdate+' '} else if(task.tasktype==14){' TERMINATED HW - '+user.displayname+' - '+task.accountName+' '} }\",\"Affected_Current_Site\": \"Head Office\",\"Assigned Support Company\": \"Lotus's\",\"Assigned Support Organization\": \"EUC\",\"Assigned Group\": \"THL3 IT Security Identity Mgmt\",\"Impact\": \"4000\",\"Urgency\": \"4000\",\"Reported Source\": \"API\",\"Service_Type\": \"Service\",\"Product Categorization Tier 1\": \"Hardware Software Services\",\"Product Categorization Tier 2\": \"Microsoft Application\",\"Product Categorization Tier 3\": \"Microsoft Outlook - Calendar\"}}",
"httpHeaders": {
"Authorization": "${access_token}",
"contentType": "application/json"
},
"httpContentType": "application/json",
"ticketidPath": "values.Incident Number",
"successResponses": {
"statusCode": [
200,
201
]
}
}
]
}
OUTPUT:
Please help me with this
04/26/2024 08:27 AM
You need new line ?
04/26/2024 08:37 AM
Yes, I need the next value in new line.
04/26/2024 12:24 PM
use \\\\n
04/29/2024 04:24 AM
Thanks for your support. I have used '\\\\n' and could able to get the result in new line.
04/30/2024 01:44 AM - edited 04/30/2024 01:51 AM
I am facing issues while populating a few attributes mentioned below over the ITSM from the Saviynt side.
Job Title: [JobDescription]
Department: [DepartmentName]
Work Level: [CustomProperty3]
Line Manager Name: [Owner DisplayName]
Line Manager Email: [Owner Email]
Location: [Location]
PFA the full JSON.
{
"call": [
{
"name": "call1",
"connection": "ITSMHWAuth",
"showResponse": true,
"url": "https://itservicedesk.lotuss.com/api/v2/ticket",
"httpMethod": "POST",
"httpParams": {
"values": {
"First_Name": "Lotus",
"Last_Name": "Integration User",
"Description": "${if(task?.tasktype==3){' New Joiner HW - '+user.displayname+' - '+task.accountName+' '} else if(task.tasktype==14){' TERMINATED HW - '+user.displayname+' - '+task.accountName+' '} }",
"Detailed_Decription": "${if(task?.tasktype==3){'Request Type: Laptop Setup \\\\n Start Date: '+user.startdate+' \\\\n End Date: '+user.enddate+' \\\\n Employee Name: '+user.displayname+' \\\\n Employee ID: '+user.employeeid+' \\\\n Email Address: '+user.email+' \\\\n Employee Type: '+user.employeeType+' \\\\n Job Title: '+user.jobdescription+' \\\\n Department: '+user.departmentname+' \\\\n Work Level: '+user.customproperty3+' \\\\n Line Manager Name: '+user.owner.displayname+' \\\\n Line Manager Email: '+user.owner.email+' \\\\n Location: '+user.location+' '} else if(task.tasktype==14){' TERMINATED HW - '+user.displayname+' - '+task.accountName+' '} }",
"Affected_Current_Site": "Head Office",
"Assigned Support Company": "Lotus's",
"Assigned Support Organization": "EUC",
"Assigned Group": "THL3 IT Security Identity Mgmt",
"Impact": "4000",
"Urgency": "4000",
"Reported Source": "API",
"Service_Type": "Service",
"Product Categorization Tier 1": "Hardware Software Services",
"Product Categorization Tier 2": "Microsoft Application",
"Product Categorization Tier 3": "Microsoft Outlook - Calendar"
}
},
"httpHeaders": {
"Authorization": "${access_token}",
"contentType": "application/json"
},
"httpContentType": "application/json",
"ticketidPath": "values.Incident Number",
"successResponses": {
"statusCode": [
200,
201
]
}
}
]
}
Could you please help me with this?
04/30/2024 09:00 PM
Please create new thread