# Gorgias

> Log every Allo call and SMS in Gorgias as a Phone or SMS ticket for the matching customer, and see your Gorgias customers in Allo when they call

The Gorgias integration logs each Allo call as a **Phone** ticket and each SMS as an **SMS** ticket for the matching Gorgias customer. A call shows as a call card with a link to the recording, and the AI summary and transcript go in an internal note that only your agents see. A call and the SMS around it stay in the same ticket.

Your Gorgias customers that have a phone number sync to Allo, edits included, so callers show up with their Gorgias name. If you also use the [Shopify integration](/help/integrations/shopify), callers also show up with their Shopify total spent and last order.

## How to connect

The Gorgias integration connects with your Gorgias domain, your Gorgias login email and a Gorgias REST API key. You need an Allo admin or manager to connect the integration.

<Note>
  The Gorgias REST API is available on every Gorgias Helpdesk plan and during the Gorgias trial. Only Gorgias account owners and admins can see and create API keys.
</Note>

### How to get your Gorgias API key

The API key belongs to one Gorgias user. Allo writes tickets and notes as that user, unless the call is assigned to another agent (see [How calls are synced](#how-calls-are-synced)).

<Steps>
  <Step title="Open the REST API settings">
    In Gorgias, click the gear icon at the bottom left to open **Settings**, then go to **Account** \> **REST API**.
  </Step>
  <Step title="Create the API key">
    In the **API Access & Credentials** section, click **Create API Key** if no key exists yet. If a key already exists, copy it: do not click **Reset**, because a reset stops the old key at once.
  </Step>
  <Step title="Copy your credentials">
    Copy the **Password (API Key)** and note the **Username**, which is your Gorgias login email. You paste both into Allo in the next step.
  </Step>
</Steps>

Your Gorgias domain is the part before `.gorgias.com` in your helpdesk address. For `yourbrand.gorgias.com`, the domain is `yourbrand`. It is also shown in the **Base API URL** on the same page.

### Connect in Allo

<Steps>
  <Step title="Go to Integrations">
    In Allo, go to **Settings** \> **Integrations**.
  </Step>
  <Step title="Find Gorgias">
    Find **Gorgias** in the **Support** section and click **Connect**.
  </Step>
  <Step title="Enter your domain, email and API key">
    Enter your Gorgias domain in the **Gorgias domain** field, your Gorgias login email in the **Gorgias login email** field, and paste the API key in the **API key** field.
  </Step>
  <Step title="Save and connect">
    Click **Save & Connect**. Allo connects the integration with your Gorgias account.
  </Step>
  <Step title="Wait for the customer import">
    Allo imports your Gorgias customers that have a phone number. The integration shows the import in progress until the first sync finishes.
  </Step>
</Steps>

### Choose your support lines (optional)

Support lines decide which Allo lines send calls and SMS to Gorgias. Only calls and SMS on the selected lines are sent. Calls and SMS on any other line are not sent at all, so sales or personal conversations never reach your support inbox.

To send every call and SMS, leave the selection on **All lines**.

To choose support lines, go to **Settings** \> **Integrations** \> **Gorgias**, open **Support lines**, select the lines and click **Save**.

<Note>
  For an inbound call or SMS, the line is the number the customer dialed or texted. For an outbound call or SMS, the line is the number shown to the customer. Call back or reply from a support line if you want it logged in Gorgias.
</Note>

### Create unknown callers in Gorgias (optional)

The **Create unknown callers in Gorgias** setting decides what happens when a caller or SMS sender is not a Gorgias customer yet.

- **On:** Allo creates the caller as a new Gorgias customer, with their phone number and email, and logs the call or SMS on that customer. The new customer is named after the Allo contact, or after the phone number if the Allo contact has no name.
- **Off:** calls and SMS from numbers that are not Gorgias customers are not sent to Gorgias.

## What syncs

**From Gorgias to Allo:**
- Customers that have a phone number, with their name, email and phone numbers

**From Allo to Gorgias:**
- Calls, logged as Phone tickets with a call card and an internal note
- SMS, logged as SMS tickets
- New customers, when **Create unknown callers in Gorgias** is on

**Sync direction:** Two-way. Calls and SMS are sent to Gorgias as they happen. The first sync imports your Gorgias customers that have a phone number, starting with the most recently updated. On large accounts, the first sync can be limited to customers updated in the last 12 months. After that, Allo checks every hour for customers created or changed in Gorgias, so edits made in Gorgias reach Allo.

A customer whose last phone number is removed in Gorgias is removed from Allo at the next sync. Gorgias customers without a phone number are not imported, because Allo cannot match them to a call or SMS. Allo never changes an existing Gorgias customer. Gorgias has no companies or deals, so none are synced.

Allo matches the Gorgias customer by phone number, on the customer's phone channels. Allo looks the number up in its international format, for example `+33612345678`, and in its most common national formats, for example `0612345678` or `(415) 555-1234`.

## How calls are synced

After each call on a support line, Allo creates a Gorgias ticket for the matching customer, or adds the call to the customer's recent Allo ticket (see [How follow-up calls and SMS are grouped in one ticket](#how-follow-up-calls-and-sms-are-grouped-in-one-ticket)). The ticket has:

- The channel **Phone** and the priority **Normal**
- The tags `allo` and `allo-call`
- A title with the call details, for example `Allo Inbound Call to US Support (+18885550100) - Answered - Leo (2m 03s)`

The ticket holds two messages:

- **A call card**, from the customer for an inbound call or from your agent for an outbound call. It shows the call direction and result, the start time (UTC), the duration, the from and to numbers, the Allo line, the Allo user and a link to the call recording.
- **An internal note** with the AI summary, the call tags and the call transcript, with speaker names when available. Missed calls without a voicemail have no internal note.

The ticket is assigned to the Gorgias user whose email matches the Allo user's email, and the call card and internal note are written as that user. If no active Gorgias user has that email, the ticket stays unassigned and the messages are written as the user who connected Allo.

### Ticket status

Every Allo ticket is **Open**, for answered calls, missed calls and voicemails alike, so your team sees each phone conversation in its inbox. Allo never closes a ticket: that stays with your agents.

### How follow-up calls and SMS are grouped in one ticket

Calls and SMS with the same customer share one ticket. A new call or SMS joins the customer's Allo ticket when that ticket is Open and was last updated less than 1 hour before it. This covers the customer calling or texting again, and your team calling back or replying.

When a call or SMS joins an existing ticket:

- Allo adds it to the ticket as new messages.
- Allo renames the ticket after what it holds: `Allo calls with <customer name> on <line name> (<number>)`, `Allo SMS with …` or `Allo calls and SMS with …`.
- Allo adds the `allo-call` or `allo-sms` tag if the ticket does not carry it yet. Tags already on the ticket are kept.
- The 1-hour window restarts from that call or SMS.

Once an agent closes the ticket, the next call or SMS opens a new ticket. Allo only adds calls and SMS to tickets that carry the `allo-call` or `allo-sms` tag. Allo never adds them to a ticket that came from another channel, such as an email or a chat.

<Warning>
  Do not remove the `allo-call` and `allo-sms` tags from Allo tickets. Without them, every call and SMS opens a new ticket.
</Warning>

Use the `allo`, `allo-call` and `allo-sms` tags to filter Allo tickets in Gorgias views, rules and statistics.

## How SMS are synced

After each SMS sent or received on a support line, Allo creates a Gorgias ticket for the matching customer, or adds the SMS to the customer's recent Allo ticket. The ticket has the channel **SMS**, the tags `allo` and `allo-sms`, and a title such as `Allo Inbound SMS to US Support (+18885550100) - Leo`.

Each SMS is one message in the ticket, with its text and the time it was sent: from the customer for an inbound SMS, from your agent for an outbound SMS. Gorgias does not send these messages again: they are logged as already sent.

<Warning>
  Reply to SMS from Allo. A reply written in Gorgias is not sent through Allo.
</Warning>

## Click-to-call

Click-to-call is not available for this integration.

## Troubleshooting

Check the sync status of any call from the **call list on [web.withallo.com](https://web.withallo.com)**. Each call has an integration indicator showing its sync state.

<AccordionGroup>
  <Accordion title="I cannot connect my integration">
    Only **admins** and **managers** of an Allo workspace can connect integrations. If you don't see the option, ask your workspace admin or manager to set it up.

    If Allo rejects your Gorgias details, check these causes:

    - **You are not a Gorgias owner or admin.** Only owners and admins can see and create API keys. Ask one of them to connect Allo, or to give you the admin role.
    - **The domain is wrong.** Enter only the part before `.gorgias.com`, for example `yourbrand`.
    - **The email does not match the API key.** Enter the login email shown as **Username** next to the API key.
    - **The API key was reset.** A reset stops the old key at once. Copy the current key from **Settings** \> **Account** \> **REST API**.
  </Accordion>

  <Accordion title="Call or SMS not synced to Gorgias">
    Check these causes, in this order:

    - **The call or SMS was not on a support line.** Only calls and SMS on your selected support lines are sent to Gorgias. Check **Settings** \> **Integrations** \> **Gorgias** \> **Support lines**, or select **All lines** to send everything.
    - **The customer is not in Gorgias with this phone number.** With **Create unknown callers in Gorgias** off, calls and SMS from unknown numbers are not sent. Add the phone number to the Gorgias customer, or turn the setting on.
    - **The API key stopped working.** The API key belongs to the Gorgias user who connected Allo. If that user leaves your Gorgias account, loses the admin role, or resets the key, Allo still appears connected but requests fail. Disconnect Gorgias in Allo and connect again with a current API key.
    - **Gorgias rate limits.** Gorgias allows about 2 API requests per second for each account, shared with your other Gorgias apps. Allo retries rate-limited requests a few times. If the limit is still reached, the call or SMS is not synced: wait a minute and sync it again from the call list.
  </Accordion>

  <Accordion title="A Gorgias customer does not appear in Allo">
    Check these causes:

    - **The customer has no phone number in Gorgias.** Allo only imports customers with a phone channel. Add the number to the customer in Gorgias; Allo imports the customer at the next hourly sync.
    - **The sync has not run yet.** Allo checks Gorgias every hour. A customer created or changed in Gorgias appears in Allo after the next sync.
    - **The first import is still running.** On a large Gorgias account, the first import can take a while. The integration shows the import in progress until it finishes.
  </Accordion>

  <Accordion title="Duplicate customers">
    With **Create unknown callers in Gorgias** on, Allo first looks for an existing Gorgias customer by email, then by phone number, and only creates a customer when it finds none. A duplicate appears when the same person is saved in Gorgias with a different email and no phone channel. Merge the customers in Gorgias.
  </Accordion>

  <Accordion title="A follow-up call or SMS opened a new ticket">
    A follow-up call or SMS joins an existing ticket only when all three conditions are true:

    - The ticket was created by Allo and still carries the `allo-call` or `allo-sms` tag.
    - The ticket is Open, not Closed.
    - The ticket was last updated less than 1 hour before the new call or SMS.

    If one of these conditions is false, Allo opens a new ticket.
  </Accordion>

  <Accordion title="My customer received an email about an Allo ticket">
    Allo creates its tickets through the Gorgias API, and internal notes are never sent to your customer. An email comes from your own Gorgias setup. Check your Gorgias **Rules** that reply to new tickets, and exclude tickets tagged `allo`.
  </Accordion>

  <Accordion title="Do Allo tickets count toward my Gorgias billing?">
    Gorgias bills per billable ticket: a ticket where at least one message is sent from your helpdesk. Internal notes are not billable, and neither is a ticket with only inbound messages. Outbound calls and SMS are logged as messages from your agent. Check **Settings** \> **Billing & usage** in Gorgias to see how your plan counts them.
  </Accordion>

  <Accordion title="The ticket is unassigned">
    Allo assigns the ticket to the Gorgias user whose email matches the Allo user's email. If the emails differ, or the user is deactivated, the ticket stays unassigned. Use the same email in Allo and Gorgias, or assign Allo tickets with a Gorgias rule on the `allo-call` or `allo-sms` tag.
  </Accordion>
</AccordionGroup>
