Skip to main content
Solved

Output mapping wildly inconsistent

  • October 15, 2025
  • 1 reply
  • 30 views

 We are unable to leverage the output mapping in a way that provides consistent results to our users. Our use case is extremely simple. We are connected to a ServiceNow app for tracking issues. The sysparm_query pulls in a record number, il_status, severity, description (issue_detail), opened_by, assignee (responsible_user), and resolution (going_to_do). The testing and validation of the http action passed as expected. 

Using simple mode for the action activity within our conversational process returns inconsistent results so we switched to data mapper. We are unable to return any reasonably formatted response. Below is the Response Schema from my HTTP Action and then the Data Mapper. Any thoughts on what we are doing wrong? This is preventing us from moving forward with our plugin.

Response Schema:

{
"type": "object",
"properties": {
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"il_status": {
"type": "object",
"properties": {
"display_value": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"number": {
"type": "object",
"properties": {
"display_value": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"issue_detail": {
"type": "object",
"properties": {
"display_value": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"going_to_do": {
"type": "object",
"properties": {
"display_value": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"opened_by": {
"type": "object",
"properties": {
"display_value": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"severity": {
"type": "object",
"properties": {
"display_value": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"responsible_department": {
"type": "object",
"properties": {
"display_value": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"responsible_user": {
"type": "object",
"properties": {
"display_value": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
}
}
}
}

Data Mapper

RENDER():
args:
rows:
MAP():
converter:
Diagnosis:
COALESCE():
items:
- item.going_to_do
- "' '"
Issue_Detail:
COALESCE():
items:
- item.issue_detail
- "' '"
Logger: item.opened_by
Number: item.number
Responsible_User: item.responsible_user
Severity: item.severity
Status: item.il_status
items: response.result
template: |-
{{#rows}}
• **{{Number}}**
_{{Issue_Detail}}_
Severity: {{Severity}}
Status: {{Status}}
Responsible User: {{Responsible_User}}
Logger: {{Logger}}
{{#Diagnosis}}Diagnosis: {{Diagnosis}}{{/Diagnosis}}
{{/rows}}

 

Best answer by Kevin Mok

HI ​@Scott.Megargee - Have you tried just returning the list of objects instead of wrapping it inside a string like this:

MAP():
converter:
Diagnosis:
COALESCE():
items:
- item.going_to_do
- "' '"
Issue_Detail:
COALESCE():
items:
- item.issue_detail
- "' '"
Logger: item.opened_by
Number: item.number
Responsible_User: item.responsible_user
Severity: item.severity
Status: item.il_status
items: response.result

 

1 reply

Kevin Mok
Forum|alt.badge.img+1
  • Community Manager
  • Answer
  • October 16, 2025

HI ​@Scott.Megargee - Have you tried just returning the list of objects instead of wrapping it inside a string like this:

MAP():
converter:
Diagnosis:
COALESCE():
items:
- item.going_to_do
- "' '"
Issue_Detail:
COALESCE():
items:
- item.issue_detail
- "' '"
Logger: item.opened_by
Number: item.number
Responsible_User: item.responsible_user
Severity: item.severity
Status: item.il_status
items: response.result