Adding ticket requester seems to ALWAYS add a new user | Community
Skip to main content

Adding ticket requester seems to ALWAYS add a new user

  • September 12, 2023
  • 3 replies
  • 0 views

Development

We're trying to build a Zendesk/phone integration.

I've set up an Api request chain in our React app that does the following:

1. When agent picks up it'll search for an existing user with the caller's phone number
2. This will call: "/api/v2/search.json?query=role:end-user phone:*+1234567890
3. The result will go through in a .then() that creats a ticket.
4. Creating a ticket I fill the "requester" object with
{
    ticket: {
        subject: phoneNumber,
        comment: { {{ some body we cooked up }} },
        requester_id: zendeskUser.id <-- do you add this???
        requester: { <-- OR do we add this???
            id: zendeskUser.id,
            requester_id: zendeskUser.id <-- should this be here???
            name: zendeskUser.name
        },
        tags: ['inbound'],
        priority: 'normal'
    }
}

While this works -meaning: it'll create a new ticket and set the requester to the phoneNumber calling- , I always end up with a new user. Eventhough the phone number search actually finds a user.

Why?

an

3 replies

Development
  • Author
  • September 12, 2023

Posting to either: /api/v2/voice/channels/tickets.json or /api/v2/tickets.json doesn't seem to matter at all. Even when you fill the requester_id in the ticket object, it'll create a new user.


Hey Cobbler Team,
 
Is the phone number on the end-user's profile set as a direct line?

Development
  • Author
  • September 26, 2023

Hi @christopher53,

Not explicitly. It's set as "requester_id" (if we've found a user) or set as object with the "name" and "phone" keys set the the inbound phone number.

It also seems to work fine, if you're not testing and there is some time between picking up inbound calls from the same number.

 

Some questions regarding the link you sent:
1. What if "Talk" is disabled?
Our own softphone handles all calling traffic. We just try to create a new ticket in Zendesk using ZAF.
2. If we use the "/api/v2/calls" endpoint to create a Call Record, the documentation states: "If ticket_id is omitted, a new ticket is created and automatically associated with the call record before adding the voice comment.".
We omit the ticket_id, but Zendesk isn't creating a new ticket?