Discussions

Ask a Question

I am getting an error "Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://xxxxx.gorgias.com/api/messages?limit=100&order_by=created_datetime:desc&ticket_id=57587433')"

I am pulling a certain load of data from the API, I have been getting this error once in a while, can someone explain why this keeps happening to me?
ANSWERED

[feature request] Add Large Delete Button next to Close Button

There are times when we just want delete a ticket instead of close it. The current 3-step process would be made much more intuitive and reduce storage data if a large red "Delete" button was added to right of the "Close" button. The clicks that button, gets a prompt to confirm, and the ticket goes into the trash where it lives for 30 days before it's permanently deleted.
ANSWERED

Adding customize macros

How can we send styled HTML macros by adding HTML?
ANSWERED

How to Get Salesforce Info Into a Widget

There is a development project which is very important to me, but I am running into problems when I try implementing it. I will describe to you what I need, and I am hoping you can help me make this happen. I keep information about my customers and about their interactions with our reps in software called Salesforce. I would like for that information to be visible in a widget associated with any ticket belonging to that customer. You have detailed instructions for how to do that in two places - in your dev docs you show how to do it using the api and also in your non-dev docs where you show how to do it with Zapier. In both places, the first step is to access the data in the third party app using Gorgias's HTTP integrations. Here's my problem: The HTTP integrating tool that comes with Gorgias is only configured to work using basic authentication. I can't get information from Salesforce using basic authentication. I need to use OAuth. Therefore, I cannot do that through Gorgias. I have to do it on my own. Supposing I have a way to access that information on my own, through Zapier or otherwise... how do I then get that information into Gorgias without using your out-of-the box HTTP integration?
ANSWERED

LiveChat integration to automate responses

Hi my name is Rem from ResolveAI I have a client who is using Gorgias Live Chat, but wants to automate responses using ResolveAI AI chatbots. Curious if you provide Live Chat integration API where our chatbots can "listen" and "reply" to communications through your live chat? Thanks, Rem
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(); }) ```