SegmentUpdated a year ago
Segment's software and APIs collect, clean, and control your customers' data.
How it works
You can send data about your tickets in Segment by adding Gorgias as a Source on your Segment account. By doing so, you can understand if customers who contacted support in the last year are generating more revenue.
Setup instructions
First, add Gorgias as a Source to Segment:
- In your Segment account, click on "Sources"
- Click "Add Source"
- In the Server section, click "HTTP API"
- Click "Connect"
- Type in "Gorgias" as a nickname & SQL schema name, then click "Create source"
- Open your newly created Gorgias source
- Locate "Write Key" under Installation and copy it
- Go to http://decodebase64.com/ and paste the "Write Key" value under "ASCII Plain Text"
- After pasting the value, make sure you add a colon character (
:
) at the end of the string - Copy the resulting text that shows up in the "Base64" section

Nice job! Now you can send data to Segment! Next, we need Gorgias to notify Segment when a ticket is created.
How to notify Segment when a ticket is created
- In your Gorgias account, click on "Integrations," then click "HTTP Integration," then click "Add HTTP Integration"
- Use the following configuration, and click "Add Integration"
1Integration name: Send info to segment on Ticket created2Description: Segment3Trigger: Ticket created4URL: https://api.segment.io/v1/track5HTTP Method: POST6Headers: Key: Authorization, Value: Basic "Paste Base64 code from Setup Instructions (step 10) here –without the quotes"7Request Body (JSON):8 {9 "timestamp": "{{ticket.created_datetime}}",10 "properties": {11 "subject": "{{ticket.subject}}",12 "ticket_id": "{{ticket.id}}",13 "status": "{{ticket.status}}",14 "assignee": "{{ticket.assignee_user}}",15 "channel": "{{ticket.channel}}",16 "name": "{{ticket.customer.name}}",17 "tags": "{{ticket.tags}}"18 },19 "userId": "{{ticket.customer.email}}",20 "event": "Ticket created"21 }
Congratulations! Every time a ticket is created, data about the ticket will be sent to Segment. You can use the sent data in other apps.
Please note: this integration is available to all customers but will only be supported for Advanced and Enterprise plan customers. While any plan can set up the integration following the instructions, due to the manual work it requires on our end, if you are on the Basic or Pro plan we will not be able to provide support in setting it up or fixing any issues with it should they arise.
Was this article helpful?
Yes
No