Is possible to get a ticket from phone number with Zendesk Data Actions?

Hello, I'm trying to get a ticket from Zendesk (using Zendesk Custom Data Actions) by the Phone Number, but no matter which entered parameters, It will always return a empty ticket or a fail.

I'm using this Request URL Template:
/api/v2/search.json?query=${esc.url("type:ticket customer_phone_number:${esc.quote}${input.PHONE_NUMBER}${esc.quote}")}

This response:

{
  "translationMap": {
    "id": "$.results[0].id"
  },
  "translationMapDefaults": {},
  "successTemplate": "${ticket}"
}

This Input Contract:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Phone Number Request",
  "description": "A phone number-based request.",
  "type": "object",
  "required": [
    "PHONE_NUMBER"
  ],
  "properties": {
    "PHONE_NUMBER": {
      "type": "string",
      "description": "The phone number used for the query."
    }
  }
}

This Output Contract:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Ticket",
  "description": "A Zendesk ticket ID.",
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "description": "The ID of the Zendesk ticket."
    }
  }
}

And no matter which modification I do, It always fail.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.