I have a service requests that asks the user to provide some information in custom fields along with "Site" from a dropdown list and "Department" from a dropdown list. Once the request is submitted it will also create another incident filled with variables the user provided. I'm trying to have the newly generated incident populate site_id & department_id from a variable that was submitted in custom field. This is what my JSON payload looks like:
{
"incident": {
"requester_name": "{{requester_email}}",
"priority": "Medium",
"due_at": "Jan 01,2025",
"site_id": "{{Office}}",
"department_id": "{{Organization ID}}",
"request_variables_attributes" :[
{
{{Office}} and {{Organization ID}} are the custom fields the user has to pick from a dropdown list, but the site_id & department_id is not being populated. I would like to have these populated by what the user inputs so that when the incident is generated, people are able to sort by site_id & department_id.
I see that site_id, department_id is a system field rather than a custom field. Is it possible to have it be tied to a {{variable}}? I saw that you could map the IDs, but how would that work if the system_id and department_id needs to be populated by user input? I am new to APIs by the way.. what is the best way to approach this?