Discussions

Ask a Question
ANSWERED

Duplicate tags from using the POST /api/tickets endpoint

Hello, When using the POST /api/tickets and adding the tags object (just the name) sometimes for the same name a new tag is created, even if in the account a tag with that name already exists. Why does this happen?
ANSWERED

How do I get the phone numbers (and CustomerChannels generally) that are a part of a customer object?

I need a way to get the phone numbers (and CustomerChannels generally) that are in a customer object. The high level view of the whole thing I am trying to do is that on our website we are going to have a contact us/schedule a call form for our customers to use to get in touch with us. I know you guys have a contact us form type thing out of the box, but we need one that has a specific, possibly required, phone number field so we’re looking into making a custom one. Once the customer has inputted all the necessary information there are a few things I need to do in Gorgias. First I need to see if a customer exists under the email they gave (https://developers.gorgias.com/reference/get_api-customers). If there isn’t a customer I need to make one (https://developers.gorgias.com/reference/post_api-customers). Second I need to add the phone number that they inputted into that Gorgias customer object (https://developers.gorgias.com/reference/put_api-customers-id). Third I need to make a ticket with all the information that was given in the custom form (https://developers.gorgias.com/reference/post_api-tickets). The phone number needs to be in the customer object and not just a part of the ticket text so that the support agent can then call the customer from inside Gorgias. The second step is where I think the main problem is. From what I can tell, I have no way to know if that given phone number is already a part of that Gorgias customer. If I try to just blindly update the Gorgias customer with the phone number (https://developers.gorgias.com/reference/put_api-customers-id), two problems could occur. The first problem is if the phone number was already a part of the Gorgias customer object the PUT request returns a 400 error and the message “phone number is already associated with another user” which is very unhelpful. The error message is just false. The phone number isn’t associated with another user, but with this user. The PUT returning an error code also seems a bit misleading, because there wasn’t error. Nothing was updated in the customer object, which since there was nothing to update is a success. The second problem with blindly sending a PUT request with the phone number to the customer object is that it will override all the preexisting CustomerChannels. If the customer already has two email addresses and a phone number in their customer object and I blindly make a PUT request with the new phone number being the only CustomerChannel in the request, those other email addresses and phone numbers are going to be deleted. There is no way to see which CustomerChannels are already in the customer object so that I can include them in the PUT request.
ANSWERED

How custom widget template works?

Hi, I want to create a custom widget that displays on the ticket page. I need to scrap details from the tickets' messages and wish to say in the right panel.
ANSWERED

How to send SMS to customer via gorgias APIs?

How do we send SMS to customer via gorgias APIs?

Advanced chat customization events not triggering

I'm following the instructions in [the Gorgias documentation](https://docs.gorgias.com/en-US/advanced-customization-new-chat-81792) to customize a chat widget using the Gorgias customization API. My intention is to programmatically open a chat widget and then run some custom code after it has been opened. According to the documentation, the `widget:opened` event should fire anytime the widget is opened. Unfortunately, it appears that programmatically opening the widget using `GorgiasChat.open()` does *not* fire this event. I am able to observe that the `widget:opened` event *is* properly firing if I manually click the Gorgias button. So how can I go about running code on my widget when the Gorgias Chat window opens programmatically? I need to run custom CSS on the widget itself, so need a way of programmatically knowing when it opens so I can run the javascript code to do so. ``` GorgiasChat.init().then(function() { GorgiasChat.on('widget:opened', function() { // this only fires when manually opening the widget, and is not firing when programmatically opening it like below console.log("widget opened"); }); GorgiasChat.open(); }) ```
ANSWERED

What event is triggered when deleting a ticket from gorgias platform?

When support agent manually deletes a ticket on gorgias platform, does the action trigger `Ticket updated` event? I am asking this question because I am configuring `HTTP integration`, there are 3 events listed below can trigger a HTTP request and we expect to close a support session in our system when the ticket is deleted: - Ticket created - Ticket updated - Ticket message created Thanks, Junsheng
ANSWERED

API query params

I hope that API List tickets interfaces can have such an updated_datetime query parameter; In addition, can you provide an interface for querying message, not ticket, but directly based on the time range
ANSWERED

Template documentation

Hi there! Is there any documentation on the type and template field of the widgets? https://developers.gorgias.com/reference/post_api-widgets All I can see is that there are multiple types, but nowhere it lists the possibilities of how a widget template is made. I am aware there are some examples, but those are only very basic If I e.g. look at the shopify widgets, it seems that there are some possibilities which are not in the documentation or any example. Thanks a lot in advance!
ANSWERED

Is the phone number property going to be included in the customer object in future?

We would like to update customer phone numbers via the API. Is this possible?
ANSWERED

Facebook comment reply

If we want to reply to a Facebook ad comment via the Gorgias API, do you have an example API call that would work? If not, can you point me to the correct Rest API endpoint to use? I'm currently getting the error, "Failed to add this message to the ticket".