最近搜索


没有最近搜索

Creating a ticket for a customer



已于 2021年2月19日 发布

I'd like to programmatically create a ticket for a user.

When I use the Create Ticket API with the Oauth token, and the user as the requester, they get a ticket that says "Created on your behalf", and includes the name of the agent that created the API token, which is not what we want.

I'd like to submit tickets that come in with the user as submitter directly.


0

4

4 条评论

image avatar

Greg Katechis

Zendesk Developer Advocacy

Hi Ozzie! it looks like you're probably using the Tickets API, instead of the Requests API. The Requests API will allow you to make tickets on behalf of your end-users and will have their information set as the Requester. Take a look at this article to help you see how this works!

0


Got it. It looks like the requests API requires me to either pass a user's email address if they are an actual user, or create an anonymous request.

Is there a way to just pass an email address, and have the request be linked to a user if one exists but be anonymous if no user with that email exists?

Thanks,

0


image avatar

Greg Katechis

Zendesk Developer Advocacy

Yes, you could definitely do that! The one thing that you would need to do, however, is ensure that you are also including a `name` attribute since that is required for anonymous requests. If you don't have the user's name, you could simply pass in the email address that they provide as the name as well before sending the request to your instance.

0


@..., were you able to create a ticket through the request API using an OAuth token on behalf of a user using their email address?

Edit. Never mind, I managed it about 30 seconds after posting :)

{
"request": {
"subject": "Test",
"comment": { "body": "Some question" },
"requester": {"email": "customer@example.com"}
}
}

0


请先登录再写评论。

找不到所需的内容?

新建帖子