> ## Documentation Index
> Fetch the complete documentation index at: https://help.privy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrate Privy and Gorgias

> Route Privy SMS conversations into Gorgias so your support team can reply from the helpdesk inbox they already use.

The Privy integration with Gorgias brings SMS conversations into the same inbox your support team already uses for email and chat tickets.

<Icon icon="comments" /> Inbound SMS replies open Gorgias tickets automatically. Existing tickets thread additional messages from the same customer.

<Icon icon="paper-plane" /> Agent replies in Gorgias are delivered back to the customer as SMS through your Privy phone number.

<Icon icon="shield-check" /> Consent keywords (STOP, HELP, START) are handled by Privy and never clutter your Gorgias inbox.

## Setting up the integration

Connecting Gorgias requires an SMS-capable Privy account. If SMS isn't set up yet, [complete Toll-Free Verification](https://help.privy.com/docs/learn/compliance/toll-free-verification) first. The Gorgias connection will be unavailable until SMS is ready.

To connect Privy with your Gorgias account:

* Navigate to your **Settings** in the lower left corner of your dashboard.
* Head to your [Integrations page](https://dashboard.privy.com/settings/integrations), which can be found near the bottom of the left side menu.
* Locate the **Gorgias** integration and click to open it.
* Enter your Gorgias subdomain. This is the part before `.gorgias.com` in your account URL (for example, `mystore` for `https://mystore.gorgias.com`).

<img width="500" src="https://mintcdn.com/privy/24SCkC-fq_OgfSs_/new-images/integrations/gorgias/gorgias-connect-dialog.png?fit=max&auto=format&n=24SCkC-fq_OgfSs_&q=85&s=8f6ad91e5cf0d4a03e41ebb91bf60f5f" alt="Gorgias integration connect dialog with the subdomain input and Connect button" data-path="new-images/integrations/gorgias/gorgias-connect-dialog.png" />

* Click **Connect**. You'll be redirected to Gorgias to authorize the connection.
* On Gorgias's consent screen, click **Authorize** to grant Privy access.

<img width="400" src="https://mintcdn.com/privy/24SCkC-fq_OgfSs_/new-images/integrations/gorgias/gorgias-oauth-consent.png?fit=max&auto=format&n=24SCkC-fq_OgfSs_&q=85&s=fcc287751b5709b337062278c9ed792c" alt="Gorgias OAuth consent screen showing the permissions Privy requests" data-path="new-images/integrations/gorgias/gorgias-oauth-consent.png" />

Once authorized, Privy registers the webhooks Gorgias needs to send agent replies back. No additional configuration is required.

<img width="500" src="https://mintcdn.com/privy/24SCkC-fq_OgfSs_/new-images/integrations/gorgias/gorgias-connected.png?fit=max&auto=format&n=24SCkC-fq_OgfSs_&q=85&s=2c15afa5494cb6da450d110e5b69db61" alt="Connected Gorgias integration in Privy showing the connected store identifier" data-path="new-images/integrations/gorgias/gorgias-connected.png" />

## How it works

After connecting, every SMS conversation between your customers and your Privy phone number flows through Gorgias.

### Inbound SMS becomes a Gorgias ticket

When a customer texts your Privy SMS number:

* Privy creates a Gorgias customer record (if one does not already exist) using the customer's phone number.
* A new Gorgias ticket is opened with the customer's message as the first entry.
* If Privy already knows the customer's name, that name is set on the Gorgias customer record so agents see who they are talking to.

Subsequent messages from the same customer thread onto the open ticket, keeping the conversation in one place.

### Agent replies go back as SMS

When an agent replies in Gorgias:

* Gorgias notifies Privy via webhook.
* Privy delivers the reply as SMS to the customer through your existing Privy phone number.
* Replies are only sent to customers who have opted into SMS. If a reply can't be delivered, Privy posts an internal note on the ticket so the agent knows.

### Ticket status stays in sync

When an agent closes, solves, or reopens a ticket in Gorgias, Privy mirrors the status on the conversation record. Conversation analytics and segmentation in Privy reflect the latest state without manual updates.

### When a customer opts out

If a customer texts a consent keyword like **STOP**, Privy unsubscribes them from SMS immediately and posts an internal note on the active Gorgias ticket so agents see the change in context. The customer's reply itself isn't forwarded to Gorgias; only the note explaining what happened.

By default, Privy then closes the ticket so it doesn't sit in your open queue. If you prefer to leave the ticket open for follow-up via email, you can change this behavior in the Gorgias integration settings:

* Open the **Gorgias** integration from your [Integrations page](https://dashboard.privy.com/settings/integrations).
* Under **When a customer sends "STOP"**, choose either **Close the ticket** (default) or **Leave the ticket open**.

The setting saves automatically and applies to all future opt-outs.

<img width="500" src="https://mintcdn.com/privy/24SCkC-fq_OgfSs_/new-images/integrations/gorgias/gorgias-stop-dropdown.png?fit=max&auto=format&n=24SCkC-fq_OgfSs_&q=85&s=08b954ca23fb22e42a181973ef20aa19" alt="Gorgias integration settings showing the 'When a customer sends STOP' dropdown" data-path="new-images/integrations/gorgias/gorgias-stop-dropdown.png" />

### When an agent opts a customer out

If a customer asks to stop receiving messages in conversation without sending the literal **STOP** keyword, an agent can opt them out by including `#optout` (or `#opt-out`, case-insensitive) anywhere in their reply.

When Privy sees the hashtag in an agent reply:

* The customer is marked as unsubscribed from SMS.
* The reply is not sent as SMS — the customer doesn't receive the agent's message.
* Privy posts an internal note on the ticket explaining what happened, and updates the ticket status per the "When a customer sends STOP" setting above.

If the customer can't be opted out (they're already unsubscribed, never confirmed SMS, or don't have a Privy customer record), Privy posts a note on the ticket explaining why so the agent has feedback in-thread.

### When a reply can't be delivered

If an agent sends a reply to a customer who has opted out, never confirmed their SMS subscription, or doesn't have a Privy customer record on file, Privy doesn't send the SMS. Instead, it posts an internal note on the ticket explaining why the reply was blocked so the agent gets feedback in-thread and can follow up another way.

## Disconnecting the integration

To disconnect your Privy and Gorgias integration:

* Navigate to your **Settings** in the lower left corner of your dashboard.
* Head to your [Integrations page](https://dashboard.privy.com/settings/integrations), which can be found near the bottom of the left side menu.
* Locate the **Gorgias** integration and click **Edit Integration**.
* Click **Disconnect** to confirm your decision.

When you disconnect, Privy removes the webhooks installed on your Gorgias account and revokes the OAuth tokens so the integration is fully torn down on both sides. Reconnecting later starts fresh.

If you need assistance with managing your Privy and Gorgias integration, please contact our support team at [support@privy.com](mailto:support@privy.com).
