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

# Connect Zapier <> Emotive

> Learn how to connect Zapier <> Emotive to streamline your business.

This article will provide the benefits with integrating your solutions with Zapier and Emotive. It will also include instructions on how to setup the integrations as long as they are available in Zapier.

## Authentication

* Reach out to Emotive Support [**here**](https://emotive.zendesk.com/hc/en-us/requests/new?tf_1500003013922) to receive your token to integrate with Zapier.

## Features of connecting Zapier

Examples of Zaps that you can create to help streamline your business:

* Send Profile Properties to Emotive
* Manage customer conversations in your Helpdesk

## Send Profile Properties to Emotive

First, you will need to create a Zap to select your app event & trigger. This is the information that will be sent to Emotive.

Next, add the app event for creating profile properties\*\*.\*\*

1. Select Emotive in the *App Event* field.
2. Select your action event as **Creating Profile Properties** and click **Continue**.
3. Connect your Emotive account by inputting the token received from Emotive Support.
4. Input the following data into the fields:
   1. Phone
   2. First Name
   3. Last Name
   4. Email
   5. Source = (type in the value of where the data is coming from, e.g. Shopify).
5. Manually input a custom property (e.g. order\_count).
6. Value = the custom property that you are looking to send over.
7. Type = the data type (e.g. number).

### Updating Profile Properties

We can also modify profile data.

* We send in properties for customer "X"
  * key = membership
  * type = string
  * value = VIP

* Customer "X" then cancels membership
  * Send new properties for customer "X"
  * key = membership
  * type = string
  * value = ""

<Note>
  You will need to create new Zaps for different profile property values.
</Note>

## Helpdesk

Below is a table showing the different triggers and actions available when integrating your helpdesk via Zapier.

| Type    | Name                               | Description                                                                                            |
| ------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------ |
| Trigger | New Ticket                         | Webhook that needs to be called when a new ticket needs to be created on CS Platform                   |
| Trigger | Create Ticket                      | Webhook that needs to be called when an existing ticket needs to be updated on CS Platform             |
| Action  | Add external Ticket ID on creation | Callback for ticket creation which is used to add external\_ticket\_id to existing ticket record to DB |
| Action  | Update Ticket                      | Callback for ticket updation which is used to track any change on a ticket on CS Platform              |

### Create a new ticket

* \*\*Source: \*\*Helpdesk
* **Destination**: CS platform
* **Destination 2**: Helpdesk

Whenever a ticket is created on Helpdesk, Helpdesk will send a request to the Zapier webhook with ticket data. This request will activate the \_create\_ticket \_trigger.

This trigger will map data and call Freshdesk Create Ticket API.

Once ticket was created on CS platform, send a request to helpdesk API with external\_ticket\_id and external\_user\_id.

<u>Requirements:</u>

* Add prefix `["Emotive"]` to the subject field

### Update existing ticket

* **Source**: Helpdesk
* **Destination**: CS Platform

Users can not have more than one open ticket on the helpdesk. When Helpdesk receives a ticket to create, if the user already has an open ticket - this ticket will be updated instead. (Create or Update ticket).

Ticket update means creating a TicketEvent record and sending data to zapier’s \*\*UPDATE \*\*ticket webhook. This webhook will activate the \_update\_ticket \_trigger. The **update** trigger will pass data to the CS platform to create a ticket note.

<u>Zapier Filters:</u>

* Add prefix: `(from:emotive)\n` to the ticket event message

**Requirements**

* An external ticket id is required to pass this flow. ID retrieved by **CS Ticket Create Callback**

### Close conversation in Emotive

* **Source**: CS Platform
* **Destination**: Helpdesk

CS platform will send all ticket updates. Zapier will use a filter to deliver helpdesk tickets close event.

<u>Zapier filters:</u>

* Prefix `["Emotive"]` to the subject field
* Map CS Ticket status to helpdesk status “closed”

### Send ticket note to Emotive

* Source: CS Platform
* Destination: Helpdesk

Zapier subscribed to CS Platform ticket note creation. Once a note was created, zapier will apply a filter to filter Emotive tickets.

Filters:

* Prefix `["Emotive"]` to the subject field
* The ticket note is not private
* Note message does not start with prefix (from:emotive)
