HTTP integrations

Updated 2 days ago ​by Romain Lapeyre

HTTP integrations allow you to connect any third-party app to Gorgias.

There are two main uses for HTTP integrations: 

  • To trigger an action in a third-party app when a ticket is created or updated 
  • To get customer data from a third-party to populate the user profile

You can use Gorgias variables to pass data to other apps, such as the customer’s email, with the {ticket.requester.email} variable

Connecting your own back-office

Most support teams use a custom back-office, or admin, to look up customer profiles and perform actions on them. With Gorgias, you can automatically fetch customer data when a ticket is created, and display it next to tickets.

In order to connect your back-office, you’ll need an endpoint from which Gorgias can fetch customer data given the address of a customer.

For example, you can have an endpoint such as:

GET https://company.com/api/users?email={email}

Which would return customer data like this:

{
   "order":{
      "id":4759226956,
      "name":"#1002",
      "note":"",
      "tags":"",
      "token":"56710ab7e3ebc4d1e16078290a1536ac"
      }
}

Once you have an endpoint such as the one above, follow these steps to fetch data on each ticket:

  1. In Gorgias, creat an "HTTP Integration"
  2. Use the "GET" method and your back-office URL. It should look like this: https://company.com/api/users?email={ticket.requester.email}
    1. Optional: use a header to pass the API key. For instance: "Authorization, Basic 5Nmy9Z1loPr0M45TVBVRqoKyccj1jI03aGAZEx2fkO4"
  3. Select a trigger
  4. Click "Save"

When a ticket is created or updated, Gorgias will automatically pull customer information from your back-office and display it in the sidebar to the right of your tickets.

To edit the sidebar, click on the gear icon. Drag and drop items and personalize labels in the "Manage widgets" page.

Manage widgets

Slack

When a new ticket is created, you can connect Slack to post a notification in the Slack channel of your choice.

Gorgias notifications in Slack

  1. In Slack, click on "Apps & integrations"
  2. In the top right, click "Build" to add a custom integration
  3. Click "Incoming WebHooks"
  4. Select the channel where you want to see notifications of new tickets, then click "Add Incoming WebHooks Configuration"
  5. Copy the Webhook URL
  6. In Gorgias, create an "HTTP Integration"
  7. Paste the Webhook URL from Slack into the URL
  8. Paste the code below into the body (to pass the ticket information to Slack)
  9. Select "Ticket Created" as a trigger
  10. Click "Add Integration"

Slack notification in Gorgias

Here’s the Request Body (JSON) that you can paste:

{
    "text": "New ticket <https://{ticket.account.domain}.gorgias.io/app/ticket/{ticket.id}|*{ticket.subject}*> from *{ticket.requester.name}*",
    "attachments": [
        {
            "text": "{ticket.first_message.body_text}",
            "title": "{ticket.subject}",
            "title_link": "https://{ticket.account.domain}.gorgias.io/app/ticket/{ticket.id}"
        }
    ]
}

Magento

We're currently integrating with Magento 2 in beta. 

You can:

  • Display customer profiles next to tickets
  • Display orders
  • Insert Magento variables in macros
  • Perform actions (cancel orders, refund payments, etc.)

To enable the Magento integration, please book a 10 minute setup call with us here. Below is a screenshot of how customer & order info will appear:

WooCommerce

When you receive a message, you can display the customer profile and the last orders from WooCommerce in Gorgias. Then, you can also perform actions in WooCommerce from Gorgias itself, such as editing an order.

  1. In the "General" tab of your WooCommerce admin, click "enable the REST API" 
  2. In the API tab, ensure that the permissions for the API are set to "Read/Write"
  3. Send the "Consumer Key" and the "Consumer Secret" to "support@gorgias.io," and we'll finish the setup for you!
Note that "enable the REST API" may be under a different tab based on your version of WooCommerce

Woocommerce keys

Prestashop

When you receive a message, you can display the customer profile and the last orders from Prestashop in Gorgias. You can also perform actions in Prestashop from Gorgias itself (such as editing an order).

  1. In your Prestashop admin, click "advanced settings"
  2. Click "Webservice"
  1. Click "Enable"
  2. In the top right, click the "+" icon
  3. Generate an API key, and set all the permissions to "Read" except for "Order & Customer." Set "Order & Customer" to "Read & Write"
  4. Click "Save"
  5. Send your API key to support@gorgias.io along with the URL of your store, and we’ll finish the setup for you!

SendOwl

When you receive a support request, Gorgias can pull up orders from SendOwl and display them.

  1. In your SendOwl account, get your "API Key" and "API Secret"
  2. Go to this website, and paste {your_api_key}:{your_api_secret} from step one in the ASCII Plain Text. For example: HLYmpHWgo1AW9dk:0HvI00Br3S2gXd7
  3. Under the Base64 section, a new code will appear (it should look like this: IEhMWW1wSFdnbzFBVzlkas6MEh2STAwQnIzUzJnWGQ3w==)
  4. Copy the code that has appeared 
  5. In your Gorgias account, click "Integrations," then click "HTTP integrations"
  6. Click "Add new HTTP integration"
  7. Use the following variables for your HTTP Integration:
  8. Add 2 headers:
    • Header 1
      • Key: Authorization
      • Value: Basic {the_code_from_step3}
    • Header 2
      • Key: Accept
      • Value: application/json
  9. Click "Add integration"
  10. Now, go to a ticket, click on the settings wheel in the top right and drag & drop the "data" element into the sidebar. 

Nice job! If you need any help, book a 10 minute help session with us

Shipstation

You can display order information from Shipstation, like the order number, the tracking status, or the shipping method.

  1. In your Shipstation acount, click "Settings"
  2. Send the "API key" and the "API secret" to support@gorgias.io, and we’ll finish the setup for you!

ShippingEasy

You can display ShippingEasy next to support tickets. It's already included in the data Shopify sends to Gorgias, so you need to edit your Shopify widget to display ShippingEasy data.

  1. Go to a ticket of a customer who has Shopify orders
  2. Click on the Settings wheel at the top right
  3. Drag the shipping easy data into the order

If you need help here, ping us on the support! 

Yotpo

Display the reviews a customer left on your Shopify store next to support tickets.

  1. In your Yotpo Admin page, click "Settings" under the profile icon
  2. Click "Store Settings"
  3. Scroll down to "API Credentials," then copy the "APP Key"
  4. In your Gorgias account, click on "Integrations," then click "HTTP Integrations," then click "Add HTTP Integration"
  5. Copy the config below. Ensure that you replace the APP key in the URL:
Integration name: Get reviews left by the user
Description: Yotpo
Trigger: Ticket created & Ticket updated
URL: https://api.yotpo.com/products/{Your Yotpo APP key}/yotpo_global_reviews/reviews?user_reference={ticket.requester.integrations.shopify.customer.id}

Nice job! Now you’ll see reviews next to tickets.

LoyaltyLion

LoyaltyLion is a digital loyalty framework that gives ecommerce stores innovative ways to engage and retain customers.

If you're using LoyaltyLion for your loyalty program, you can connect it to Gorgias to display information next to support tickets. 

Benefits of integrating LoyaltyLion

  • When a customer contacts you, display their profile from LoyaltyLion
  • Award points to customers using macros
  • Insert the referral URL as a variable in a macro 


Setup instructions

  1. In your LoyaltyLion account, click on "Settings"
  2. Send the "token" and the "secret" to support@gorgias.io, and we’ll finish the setup for you!

Swell Rewards

Swell Rewards is a popular loyalty program for e-commerce. You can display how many points customers have next to tickets, and award points with macros. 

Here's how to connect Swell to Gorgias:

  1. Go to your Swell account
  2. Under the Settings page, copy the merchant_id and the api_key
  3. Go to Gorgias, and head to Integrations -> HTTP integrations  -> Add new HTTP integration
  4. Copy the configuration below, replace the merchant_id & api_key in the URL with the values from step 2, and click Add integration
Integration name: Get customer reviews
Description: Swell
Trigger: Ticket created & ticket updated
URL: https://www.swellrewards.com/api/v2/customers?customer_email={ticket.requester.email}&merchant_id={merchant_id}&api_key={api_key}Nice! You've added the integration. Now head to a ticket to configure the Swell widget. 
  1. Go to a ticket from a customer who left a customer review
  2. Click the settings wheel at the top right
  3. If there's a review for this customer, you'll be able to drag & drop the content & create a widget.

If you have trouble adding the integration, book a 5min setup call here and we'll add the integration with you.

Mailchimp

You can display customer's attributes from Mailchimp, along with the list the customer is a member of. 

To connect Mailchimp, follow the steps below: 

  1. Go to your Mailchimp account, click on your profile, then on Account and Profile . Detailed instructions here
  2. Copy the API key
  3. Go to your Gorgias account, to Integrations -> HTTP Integrations
  4. Create an HTTP Integration with the config below
Integration name: Pull Mailchimp data
URL: https://us12.api.mailchimp.com/3.0/search-members?query={ticket.requester.email}
HTTP Method: GET
Headers: Authorization, apikey {your api key from setp 2}

You're all set. Now, head to a new tickets, click the settings wheel to build your Mailchimp widget. If you need further help with setup, book a 5min call here.

Salesforce

When you receive a message, you can display customer information from the associated contact in Salesforce.

  1. In Salesforce, click "Setup" in the top right corner of your screen
  2. In Quickfind, type "Apps"
  3. Under "Build," mouse over "Create," and open "Apps"
  4. In the Connected Apps section, click "New"
  5. Enter "Gorgias" as the "Connected App Name" and "App Name," and support@gorgias.io as the Contact email
  6. Select "Enable OAuth" Settings
  7. Enter https://gorgias.io as the Callback URL.
  8. Click "Access and manage your data (api)" and click "Add" to add it to the list of Selected OAuth Scopes
  9. Click "Save," then click "Continue"
  10. Click on "Click to reveal" on the Consumer Secret
  11. Send the "Consumer Key" and the "Consumer secret" to support@gorgias.io
  12. Create an account for support@gorgias.io, and we’ll finish the setup for you!
Salesforce keys

Segment

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.

First, add Gorgias as a Source to Segment:

  1. In your Segment account, click on "Sources"
  2. Click "Add Source"
  3. At the end of the list in the server section, click "HTTP API"
  4. Click "Connect"
  5. Type in "Gorgias" as a nickname & SQL schema name, then click "Create source"
  6. Open your newly created Gorgias source
  7. Locate the "Write Key" under installation and copy it
  8. Go to http://decodebase64.com/ and paste the "Write Key" under "ASCII Plain Text"
  9. Copy the text that shows up in the "Base64" section

Write key in segment

Nice job! Now you can send data to Segment! Next, we need Gorgias to notify Segment when a ticket is created.

  1. In your Gorgias account, click on "Integrations," then click "HTTP Integration," then click "Add HTTP Integration"
  2. 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: Authorization, Basic {paste Base64 code from step 9 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.requester.name}",
            "tags": "{ticket.tags}"
        },
        "userId": "{ticket.requester.email}",
        "event": "Ticket created"
    }

Nice job! Every time a ticket is created, data about the ticket will be sent to Segment. You can use the sent data in other apps.

Zapier

Using Zapier, you can trigger a zap when a ticket is created and/or updated.

  1. Create a zap in Zapier and choose a "webhook" as a trigger
  2. In your Gorgias account, click on "Integrations," then click "HTTP Integration," then click "Add HTTP Integration"
  3. Click "POST", then use the webhook URL from Zapier. You can pass arguments from Gorgias to Zapier using headers\
  4. Select a "Trigger" of your choice

Nice job! When the integration is triggered, your zap will run.


How did we do?