Originally asked by Champ Yarbrough on 17 February 2021 (original question)
We need to populate the custom Zendesk Field called:
T Applications from a ServiceNow Field called “product_name” to a Zendesk custom field called “T Applications”
The below example is from SN “CS1234567” and Zendesk “1234”
Incoming data from ServiceNow looks like this:
},
"location_street_address": "1521 Pier J Avenue",
"impact": "2 - Medium",
"location_confluence_page": "",
"cause": "",
"location_state": "CA",
"product_name": "EDI",
"close_notes": "",
"account_is_affiliate": "true",
"number": "CS1234567",
The incoming Sync on the Zendesk looks like this:
//issue.customFields.“T Applications”.value = replica.t_application
issue.customFields.“T Applications”.value = replica.product_name
def productMap = [
“Buoy” : “Buoy”,
“Zendesk” : “Zendesk”,
“…”:“…”
]
def t = productMap[replica.“product_name”]
//def productName = productMap[replica.product_name] ?: replica.product_name
issue.customFields.“t Applications”.value = t //productName // commented out because this line is only blanking out the application field
//debug.error(“t = ${replica.“product_name”}, result = ${t_application}”)
//debug.error(“Priority = ${replica.priority.name}”)
But the Application never populates.