Recent searches


No recent searches

How to set "source":{"from":{"address":"","name":""},"to":{"name":"","address":""} using a HTML form

Answered


Posted Mar 07, 2021

Hello, Im trying to generate new ticket in our Zendesk service using our WhatsApp Service account thru the Zendesk API.

So far, i set all the mandatory values and im able to create the ticket in Zendesk , but I cannot figure out how to set Email from and Name of the requester.

Im using an HTML FORM to capture the customer data and pass it to JSON. (Im not good with JSON.) Even when Im capturing the Customer Name and Email, once the ticket was created in Zendesk, Im not able to see their name.

Hope yo can understand my request.

Thank you.


0

1

1 comment

Official

image avatar

Amy Dee

Zendesk Customer Care

Hi Enrique! You can set the requester's name and email with the "Requester" parameter. We have an example in the "Creating a ticket with a new requester" section of our Creating and updating tickets guide. That guide also has a section for setting custom ticket fields.

The payload in your screenshot should look something like this:

{
  "ticket": {
    "priority": "high",
    "subject":   "test",
    "group_id": 360001776011,
    "tags": ["mexico"],
    "comment":   { "body": "test" },
    "requester": { "name": "test", "email": "atenciononline.mx@example.com" },
    "custom_fields": [{"id": 1234, "value": "Mexico"}]
  }
}

There are a few other changes here, besides using "requester" instead of "source": the group_id is a number without quotes around it, tags are listed in square brackets, the description is a comment body, and the "Market" field is in a custom_fields array. This should get you closer to the results you describe.

I hope this helps!

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post