Gorgias logo
Gorgias logo

All articles

SegmentUpdated 7 months ago

This integration is available to all clients to attempt, but setup and troubleshooting help is only supported for the Advanced and Enterprise plans due to the manual work it requires on our end.


Segment's
 software and APIs collect, clean, and control your customers' data - 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.



Steps

Add Gorgias as a Source to Segment

1. In your Segment account, click on Sources.

2. Click Add Source.

3. In the Server section, click HTTP API.

4. Click Connect.

5. Type in Gorgias as a nickname and SQL schema name, then click Create source.

6. Open your newly created Gorgias source.

7. Locate Write Key under Installation and copy it.

8. Go to http://decodebase64.com/ and paste the Write Key value under ASCII Plain Text.

9. After pasting the value, make sure you add a colon character (:)  at the end of the string.

10. Copy the resulting text that shows up in the Base64 section.

Notify Segment when a ticket is created

1. Go to Settings -> App Store -> HTTP integration.

2. Click Add HTTP Integration.

3. Use the following configuration, and click Add Integration.

Integration name: Send info to Segment on Ticket Created
Description: Segment
Trigger: Ticket created
URL: https://api.segment.io/v1/track
HTTP Method: POST

Headers: Key: Authorization, Value: Basic Paste Base64 code from Setup Instructions (step 10) here
Request Body (JSON):
   {
        "timestamp": "{{ticket.created_datetime}}",
        "properties": {
            "subject": "{{ticket.subject}}",
            "ticket_id": "{{ticket.id}}",
            "status": "{{ticket.status}}",
            "assignee": "{{ticket.assignee_user}}",
            "channel": "{{ticket.channel}}",
            "name": "{{ticket.customer.name}}",
            "tags": "{{ticket.tags}}"
        },
        "userId": "{{ticket.customer.email}}",
        "event": "Ticket created"
   }

Every time a ticket is created, data about the ticket will be sent to Segment, so you can use it in other apps.

Was this article helpful?
Yes
No