# Gorgias

Zigpoll offers two ways to integrate with Gorgias:

1. **Ticket Creation** — Automatically create Gorgias tickets from survey responses, complete with participant info and all submitted answers.
2. **HTTP Integration** — Display Zigpoll customer data directly within Gorgias tickets using Gorgias's HTTP integration widget.

You can use either or both.

***

## Ticket Creation

Connect your Gorgias account to Zigpoll and automatically create support tickets from survey responses. Each response generates a new ticket in your Gorgias helpdesk, complete with the survey title, participant info, and all submitted answers. If the respondent provides an email address, Zigpoll will set them as the ticket customer so the ticket is linked to their Gorgias profile.

**Step #1: Generate a Gorgias API Key**

1. Log in to your Gorgias helpdesk.
2. Go to **Settings > REST API**.
3. Click **Add API Key**, give it a description (e.g., "Zigpoll"), and click **Create**.
4. Copy the generated API key.

**Step #2: Connect Gorgias in Zigpoll**

1. In Zigpoll: Click Settings -> Manage Integrations -> Enable the Gorgias Integration.
2. Enter your **Subdomain** — this is the part before `.gorgias.com` in your Gorgias URL. For example, if your URL is `mycompany.gorgias.com`, enter `mycompany`.
3. Enter the **Admin Email** — the email address of the Gorgias admin or agent account associated with the API key.
4. Paste the **API Key** you generated in Step 1.

**Step #3: Configure Ticket Creation**

1. Click "Click here to add a ticket configuration."
2. **Select a Survey** — Choose which survey should trigger ticket creation, or select "All Surveys" to create tickets for every survey response.

**Step #4: Configure Ticket Creation Rules**

Choose when tickets should be created:

* **Create a ticket if the survey is partially completed** — A ticket is created for every response, even if the survey is not fully completed.
* **Create a ticket only if the survey is fully completed** — Tickets are only created once the participant finishes the entire survey.
* **Create a ticket only if the respondent submitted an email address** — Tickets are only created when the participant provides an email.
* **Create a ticket only if an open-ended response is submitted** — Tickets are only created when the participant writes a free-text answer.

**Step #5: Save Changes**

Click "Save Changes" to activate the integration.

**That's it.** Zigpoll will now create a new ticket in your Gorgias helpdesk each time a matching survey response is submitted. The ticket will include the survey name, participant details, and all responses.

### Ticket Details

Each ticket created by Zigpoll includes:

* **Subject** — "New Survey Response: {survey title}"
* **Message Body** — Survey title, participant name, all question-and-answer pairs, email address (if provided), and any metadata (UTM parameters, Shopify data, etc.)
* **Customer** — Set to the respondent's email address if available, which automatically creates or matches a Gorgias customer profile
* **Channel** — `api`

### Multiple Configurations

You can add multiple configurations to route different surveys to separate ticket workflows. Click "Click here to add another ticket configuration" to add additional entries. Each configuration has its own survey filter and ticket creation rules.

### Behavior Tab Actions

You can also trigger Gorgias ticket creation from the **Behavior** tab on individual surveys. Add a "create gorgias ticket" action to create tickets based on specific survey logic rules, such as when a particular answer is selected or a condition is met.

***

## HTTP Integration (Display Data in Gorgias)

You can also use Gorgias's HTTP integration to display Zigpoll customer data directly within Gorgias tickets. This is a pull-based integration where Gorgias fetches data from Zigpoll when a ticket is opened.

**Step #1: Get your Gorgias Integration Link and API Key**

1. In Zigpoll: Click Settings -> Manage Integrations -> Enable the Gorgias Integration. Copy the generated Integration URL to your clipboard, you will need it later.
2. Scroll down to API Keys and create an API key. Copy it for later.

**Step #2: Create your Gorgias HTTP Integration**

Once you have your link, you will need to create an HTTP integration within Gorgias so that it knows where to collect the data. Gorgias has documentation for this, so please review their official steps here: [https://developers.gorgias.com/docs/display-third-party-data-within-tickets.](https://developers.gorgias.com/docs/display-third-party-data-within-tickets) In summary, you will want to:

* Within Gorgias, go to the HTTP Integration page: Gorgias -> Settings -> Integrations -> HTTP Integrations.
* Select the 'Add Integration' button at the top right of the page.
* Fill out the name, description, HTTP Method, and Headers, as collected from the previous steps and select 'Ticket created' and 'Ticket message created' options for Triggers and select 'Add Integration.' Paste in the URL from the previous step where it says URL.
* Click Add Header and add a header. Name it **Authorization** and enter your API key from Step 1 for the value.
* Lastly, once you have received a ticket from a user with third party data, enter the ticket and select the gear icon on the right of the page. Drag the new information into the info bar and select 'Save'.
* You should now be able to view Zigpoll customer information directly from Gorgias.

And that's it! Once you have your data feed coming in from Zigpoll you will be able to see satisfaction reports and survey data from your customers along with the rest of your Gorgias data.
