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

# ServiceTitan

> What Hatch's ServiceTitan integration is, how it works, and where to begin. 

### What does the ServiceTitan integration do?

Hatch offers a native integration with ServiceTitan that you can activate within the App Marketplace (located in your Hatch workspace). This integration syncs contact data from ServiceTitan to Hatch, and can also sync Hatch events to ServiceTitan.

While active, the ServiceTitan integration will sync new and updated ServiceTitan data every 15 minutes. It will also sync Hatch events back to ServiceTitan as soon as they occur (if you have enabled this feature).

To get started, open the App Marketplace in your Hatch workspace and follow the setup instructions below.

### How do you set up the integration?

#### **Requirements**

You will need the following to set up the integration:

* Hatch account with manager privileges
* ServiceTitan account with admin privileges on your tenant

#### **Setup Steps**

Hatch now has an official ServiceTitan App! All users are required to utilize our official ServiceTitan application over a personal application (as per their API terms of use). The Hatch app automatically provides us with the permissions to read or update data in your ServiceTitan tenant. The scopes requested by our app cover all of the possible use cases in Hatch. For reference, the scopes are listed below in the [FAQ](/integrations/crm-field-management-systems/servicetitan-integration#faq) section.

**The following is the set of steps required to activate the integration:**

<Note>
  Before you begin, consider reviewing ServiceTitan's documentation around [ managing client IDs and secrets](https://developer.servicetitan.io/docs/get-going-manage-client-id-and-secret/). However, all of the necessary information is included in the instructions below.
</Note>

1. This first step is manual and will need to be completed in order to proceed with the rest of the setup steps. In order to make the Hatch app available for activation within your ServiceTitan instance, we will need to add your **ServiceTitan Tenant ID** to *our* ServiceTItan application. Please send your Tenant ID over to your onboarding representative to complete.
   1. \_If you're unsure where to find your Tenant ID, you can find it in ServiceTitan via ***Settings → Integrations → API Application Access***
2. Once the Hatch app has been activated for your tenant, you may proceed with setup. In Hatch, open the **App Marketplace**.
3. Under the **CRMs** filter, click the **Connect** button for ServiceTitan.
4. Proceed through the setup until you reach the connection configuration screen.
5. Open the ServiceTitan instance that you want to connect to your Hatch workspace and navigate to **Settings** → **Integrations** → **API Application Access**.
6. Click the **Connect New App** button, accept the terms and conditions (if prompted), and select **Hatch** from the list of apps.
7. With **Hatch** selected, click **Connect**.
8. Scroll to the bottom of the screen that appears.
9. In the *restriction by booking provider* option, choose **No Restriction**.
   1. This simply allows Hatch to post Bookings in ServiceTitan without restriction to a specific booking provider id.
10. Click **Allow Access**.
11. On the resulting **Application Details** screen, copy/paste the **Tenant ID** and the **Client ID** into the associated fields on the Hatch configuration screen.
12. Click the **Generate** button next to **Client Secret** and then click **Yes, Continue** to generate the secret.
13. Copy/paste the **Client Secret** into the associated field on the Hatch setup screen.
14. You may now close any open ServiceTitan pages. All of the remaining steps are completed in Hatch.
15. If you are an Enteprise Hub customer, enable the Enterprise toggle, and enter the Enterprise Hub URL for this tenant ID
16. Enable the opportunity models you would like to sync with Hatch
    1. *additionally select which related objects to include in the data model*
17. Configure your push communications preferences.
18. Make sure to complete the full setup and click **Finish** in order to officially activate your Hatch integration.
    1. *If successfully activated, the integration will begin syncing your last 90 days of data.*

#### How to upgrade the ServiceTitan app

If an application is configured with incorrect scopes or an upgrade to the scopes is required to access new information, you will need to first edit the application in the ServiceTitan dev portal, and then upgrade the connected app within ServiceTitan.

**Upgrade the connected Hatch app to the new version:**

1. Login to your Service Titan account
2. Manage API Application Access page: `<https://go.servicetitan.com/#/Settings/Api-Apps>`
3. In the Hatch App, you should see a message informing about the scope update.
   ![Untitled (3)](https://www.usehatchapp.com/hs-fs/hubfs/Untitled%20\(3\).png?width=688\&height=157\&name=Untitled%20\(3\).png)
4. Click the "upgrade version" button and confirm.

#### Configuration Options

These options can be set during the integration setup:

**Enterprise Hub Toggle:**

* If you are authenticating via Enterprise Hub, enable the Enterprise Hub toggle
* If enabled, enter the Enterprise Hub URL associated with this tenant

**Choose the ServiceTitan data that syncs to Hatch:**

* Choose which opportunity models the integration should sync from ServiceTitan, and subsequently which data objects to include with the model. We will go into further detail regarding the data objects further down in this article in the section "**What ServiceTitan data is available in Hatch?**"
* Configure a filter for placeholder emails: if your org utilizes placeholder emails within your ServiceTitan, this filter will prevent contacts from merging in Hatch based on the shared information

**Push Events and Communications:**

* **Choose where outgoing campaign messages should sync** — if/where Hatch should create ServiceTitan notes for outgoing campaign message events
* **Sync message content for outgoing campaign messages** — if the message content should be included in notes created for outgoing campaign message events
* **Choose where incoming messages & calls should sync** — if/where Hatch should create ServiceTitan notes for incoming messages & calls
* **Sync message content for incoming messages & calls** — if the message content should be included in notes created for incoming messages & calls
* **Choose where outgoing manual messages & calls should sync** — if/where Hatch should create ServiceTitan notes for outgoing manual messages & calls
* **Sync message content for outgoing manual messages & calls** — if the message content should be included in notes created for outgoing manual messages & calls

#### Configuration Best Practices

* **We recommend utilizing the object selector feature in the data configuration to select only the information necessary for your campaigns**. While the integration can sync a wide range of information that might seem relevant, it can also make it more difficult to pick out the pieces that are truly important and useable with your campaign strategies. Now you can customize what you want to sync. Read more about this feature [here](/integrations/crm-field-management-systems/servicetitan-integration#what-servicetitan-data-is-available-in-hatch).

### When does Hatch sync data to/from ServiceTitan?

#### ServiceTitan → Hatch

ServiceTitan data can be sync’d to Hatch in the following scenarios. These options are configured during the [integration setup](/integrations/crm-field-management-systems/servicetitan-integration#setup-steps).

<Note>
  Keep in mind that syncs occur every 15 minutes for Job and Membership data. Completed calls sync instantly using ServiceTitan webhooks.
</Note>

* When a Job record is created or updated in ServiceTitan, Hatch syncs the Job record along with any associated data (see below for specific fields)
* When a Membership record is created or updated in ServiceTitan, Hatch syncs the Membership record along with any associated data (see below for specific fields)
* When a call is completed, Hatch syncs a record along with any associated data

#### Hatch → ServiceTitan

**Automatically Book Jobs**

Users of Hatch AI can benefit from our calendar integration to automatically book jobs on your schedule. Learn more about how our ServiceTitan scheduler bot in our dedicated [calendar integration](/getting-started/hatch-assistant/hatch-assistant-servicetitan-calendar-integration) article.

**Sync Communications**

Hatch events and/or communications can be sync’d to ServiceTitan in the following scenarios. These options are configured during the integration setup.

<Note>
  Keep in mind that push communications occur instantaneously. There must be a ServiceTitan record in Hatch at the time of the sync in order for it to succeed.
</Note>

* When a Hatch campaign sends a text/email/voicemail to a contact, Hatch creates a Note for the event on the associated Job, Customer, or Location
* When a contact calls or sends a text/email/voicemail to a Hatch workspace, Hatch creates a Note for the event on the associated Job, Customer, or Location
* When a Hatch user calls or sends a text/email to a contact, Hatch creates a Note for the event on the associated Job, Customer, or Location
* When events occur within a Hatch campaign, Hatch creates a Note for the event on the associated Job, Customer, or Location
  * A contact is launched (added) to a Hatch campaign
  * A contact is sent the first message of a Hatch campaign
  * A contact is removed from a Hatch campaign before it has ended
  * A contact completed a Hatch campaign

Below is an example of push communications and push events sent to ServiceTitan Job Notes:

#### ![image (32)](https://www.usehatchapp.com/hs-fs/hubfs/image%20\(32\).png?width=605\&height=818\&name=image%20\(32\).png)

### How is ServiceTitan data stored in Hatch?

#### Opportunity Models

There are two types of Hatch opportunities that the ServiceTitan integration creates:

* **Job Opportunity** — Created from ServiceTitan Job records, this is the primary opportunity type in our ServiceTitan integration. Additional related data is also included (see below).
* **Membership Opportunity** — These opportunities are created from ServiceTitan Membership records. Additional related data is also included (see below).
* **Inbound Call Opportunity** — These opportunities are created when a inbound call is completed in ServiceTitan.

#### Opportunity Creation & Update

<Note>
  When an **opportunity** is generated that doesn’t match an existing **contact** , a new **contact** will be created. A new **opportunity** will be added to an existing **contact** if a match is found.
</Note>

The integration will replace an existing Hatch opportunity when:

* The sync’d Hatch External ID matches the existing opportunity’s Hatch External ID (see below for how the External ID is mapped)

The integration will create an additional (new) Hatch opportunity when:

* The sync’d Hatch External ID does not match the existing opportunity’s Hatch External ID (see below for how the External ID is mapped)

### What ServiceTitan data is available in Hatch?

#### Selecting Object Resources

The latest version of our integration allows you to select the resources that are most relevant to your campaigns, instead of syncing all possible data by default. This customizability allows you (and your integration) to operate more efficiently.

Each opportunity model has a certain set of required objects that are needed in order for some aspect of Hatch to function. The additional resources are optional. We have defaulted the configuration with the most commonly used optional resources, but users can select or deselect as needed.

The resources available with a **Job opportunity** are:

* **Estimates** — Necessary in order to utilize a sales follow-up strategy.

* **Appointments** — Useful for appointment confirmation or canceled-appointment campaigns.

* **Appointment Assignments** — Can only be enabled if Appointments is selected. Useful if you want technician information in your campaigns.

* **Cancel Reasons** — Useful for canceled-appointments campaigns.

* **Tag Types** — Useful for segmenting audiences based on existing ServiceTitan tags.

* **Campaigns** — Useful for segmenting audiences based on existing ServiceTitan campaign attribution.

* **Zones** — Useful for location-based targeting.

* **Employees & Technicians (Sold By)** — Necessary if you need the estimate or membership Sold By information.

* **Invoices** — Necessary for accounts-receivable campaigns or post-completion review/referral targeting.
  The resources available with a **Membership opportunity** are:

* **Recurring Services & Events** — Aggregates the latest, next, and full list of recurring service events plus an unused-services count.

* **Tag Types** — Same as above, applied to the membership's customer.

* **Zones** — Adds zone metadata to the membership's location and recurring location.

* **Employees & Technicians (Sold By)** — Adds the membership's soldBy info.

* **Payment Type** — Adds payment type metadata.

#### Available Resource Fields

The following fields are available in the **Job opportunity** details:

| Resource                      | Field Name                                               | Data Type                               |
| ----------------------------- | -------------------------------------------------------- | --------------------------------------- |
| Job                           | `job:id`                                                 | Number                                  |
| Job                           | `job:jobNumber`                                          | String                                  |
| Job                           | `job:jobStatus`                                          | String                                  |
| Job                           | `job:priority`                                           | String                                  |
| Job                           | `job:noCharge`                                           | Boolean                                 |
| Job                           | `job:notificationsEnabled`                               | Boolean                                 |
| Job                           | `job:createdOn`                                          | Date                                    |
| Job                           | `job:modifiedOn`                                         | Date                                    |
| Job                           | `job:completedOn`                                        | Date                                    |
| Job                           | `job:customFields:{name}`                                | String                                  |
| Customer                      | `customer:id`                                            | Number                                  |
| Customer                      | `customer:name`                                          | String                                  |
| Customer                      | `customer:type`                                          | String                                  |
| Customer                      | `customer:active`                                        | Boolean                                 |
| Customer                      | `customer:doNotService`                                  | Boolean                                 |
| Customer                      | `customer:contacts:#:id`                                 | Number                                  |
| Customer                      | `customer:contacts:#:type`                               | String (Email, Phone, MobilePhone, Fax) |
| Customer                      | `customer:contacts:#:value`                              | String                                  |
| Customer                      | `customer:contacts:#:phoneSettings:doNotText`            | Boolean                                 |
| Customer                      | `customer:tagTypes:#:id`                                 | Number                                  |
| Customer                      | `customer:tagTypes:#:name`                               | String                                  |
| Customer                      | `customer:tagTypes:#:active`                             | Boolean                                 |
| Customer                      | `customer:customFields:{name}`                           | String                                  |
| Business Unit                 | `businessUnit:id`                                        | Number                                  |
| Business Unit                 | `businessUnit:name`                                      | String                                  |
| Business Unit                 | `businessUnit:officialName`                              | String                                  |
| Business Unit                 | `businessUnit:active`                                    | Boolean                                 |
| Job Type                      | `jobType:id`                                             | Number                                  |
| Job Type                      | `jobType:name`                                           | String                                  |
| Campaign                      | `campaign:id`                                            | Number                                  |
| Campaign                      | `campaign:name`                                          | String                                  |
| Campaign                      | `campaign:active`                                        | Boolean                                 |
| Location                      | `location:id`                                            | Number                                  |
| Location                      | `location:name`                                          | String                                  |
| Location                      | `location:active`                                        | Boolean                                 |
| Location                      | `location:address:street`                                | String                                  |
| Location                      | `location:address:unit`                                  | String                                  |
| Location                      | `location:address:city`                                  | String                                  |
| Location                      | `location:address:state`                                 | String                                  |
| Location                      | `location:address:zip`                                   | String                                  |
| Location                      | `location:address:country`                               | String                                  |
| Location                      | `location:address:latitude`                              | Number                                  |
| Location                      | `location:address:longitude`                             | Number                                  |
| Zone                          | `location:zone:id`                                       | Number                                  |
| Zone                          | `location:zone:name`                                     | String                                  |
| Tag Types                     | `tagTypes:#:id`                                          | Number                                  |
| Tag Types                     | `tagTypes:#:name`                                        | String                                  |
| Tag Types                     | `tagTypes:#:active`                                      | Boolean                                 |
| Appointments                  | `appointments:#:id`                                      | Number                                  |
| Appointments                  | `appointments:#:appointmentNumber`                       | String                                  |
| Appointments                  | `appointments:#:status`                                  | String                                  |
| Appointments                  | `appointments:#:start`                                   | Date                                    |
| Appointments                  | `appointments:#:end`                                     | Date                                    |
| Appointments                  | `appointments:#:arrivalWindowStart`                      | Date                                    |
| Appointments                  | `appointments:#:arrivalWindowEnd`                        | Date                                    |
| Appointments                  | `appointments:#:specialInstructions`                     | String                                  |
| Appointments                  | `appointments:#:createdOn`                               | Date                                    |
| Appointments                  | `appointments:#:modifiedOn`                              | Date                                    |
| Appointment Assignments       | `appointments:#:appointmentAssignments:#:id`             | Number                                  |
| Appointment Assignments       | `appointments:#:appointmentAssignments:#:technicianId`   | Number                                  |
| Appointment Assignments       | `appointments:#:appointmentAssignments:#:technicianName` | String                                  |
| Appointment Assignments       | `appointments:#:appointmentAssignments:#:assignedById`   | Number                                  |
| Appointment Assignments       | `appointments:#:appointmentAssignments:#:assignedOn`     | Date                                    |
| Appointment Assignments       | `appointments:#:appointmentAssignments:#:status`         | String                                  |
| Appointment Assignments       | `appointments:#:appointmentAssignments:#:isPaused`       | Boolean                                 |
| Cancel Reasons                | `cancelReasons:#:reasonId`                               | Number                                  |
| Estimates                     | `estimates:#:id`                                         | Number                                  |
| Estimates                     | `estimates:#:name`                                       | String                                  |
| Estimates                     | `estimates:#:summary`                                    | String                                  |
| Estimates                     | `estimates:#:active`                                     | Boolean                                 |
| Estimates                     | `estimates:#:subtotal`                                   | Number                                  |
| Estimates                     | `estimates:#:status:value`                               | Number                                  |
| Estimates                     | `estimates:#:status:name`                                | String (Open, Sold, etc.)               |
| Estimates                     | `estimates:#:soldOn`                                     | Date                                    |
| Estimates                     | `estimates:#:createdOn`                                  | Date                                    |
| Estimates                     | `estimates:#:modifiedOn`                                 | Date                                    |
| Estimates                     | `openEstimates`                                          | Number (count)                          |
| Estimates                     | `openEstimatesSubtotal`                                  | String (decimal)                        |
| Estimates                     | `soldEstimates`                                          | Number (count)                          |
| Estimates                     | `soldEstimatesSubtotal`                                  | String (decimal)                        |
| Sold By (Employee/Technician) | `estimates:#:soldBy:id`                                  | Number                                  |
| Sold By (Employee/Technician) | `estimates:#:soldBy:name`                                | String                                  |
| Sold By (Employee/Technician) | `estimates:#:soldBy:email`                               | String                                  |
| Sold By (Employee/Technician) | `estimates:#:soldBy:active`                              | Boolean                                 |
| Invoices                      | `invoices:#:id`                                          | Number                                  |
| Invoices                      | `invoices:#:summary`                                     | String                                  |
| Invoices                      | `invoices:#:referenceNumber`                             | String                                  |
| Invoices                      | `invoices:#:invoiceDate`                                 | Date                                    |
| Invoices                      | `invoices:#:dueDate`                                     | Date                                    |
| Invoices                      | `invoices:#:subTotal`                                    | Number                                  |
| Invoices                      | `invoices:#:total`                                       | Number                                  |
| Invoices                      | `invoices:#:balance`                                     | Number                                  |
| Invoices                      | `invoices:#:invoiceType:id`                              | Number                                  |
| Invoices                      | `invoices:#:invoiceType:name`                            | String                                  |
| Invoices                      | `invoices:#:customer:id`                                 | Number                                  |
| Invoices                      | `invoices:#:customer:name`                               | String                                  |
| Invoices                      | `invoices:#:termName`                                    | String                                  |
| Invoices                      | `invoices:#:depositedOn`                                 | Date                                    |
| Invoices                      | `invoices:#:createdOn`                                   | Date                                    |
| Invoices                      | `invoices:#:modifiedOn`                                  | Date                                    |
| Invoices                      | `invoices:#:adjustmentToId`                              | Number                                  |
| Invoices                      | `invoices:#:projectId`                                   | Number                                  |
| Invoices                      | `invoices:#:employeeInfo:id`                             | Number                                  |
| Invoices                      | `invoices:#:employeeInfo:name`                           | String                                  |
| Invoices                      | `invoices:#:employeeInfo:modifiedOn`                     | Date                                    |
| Invoices                      | `invoices:#:assignedTo:id`                               | Number                                  |
| Invoices                      | `invoices:#:assignedTo:name`                             | String                                  |
| Invoices                      | `invoices:#:sentStatus`                                  | String                                  |
| Invoices                      | `invoices:#:reviewStatus`                                | String                                  |
| Invoices                      | `invoices:#:syncStatus`                                  | String                                  |
| Invoices                      | `invoices:#:items:#:id`                                  | Number                                  |
| Invoices                      | `invoices:#:items:#:displayName`                         | String                                  |
| Invoices                      | `invoices:#:items:#:membershipTypeId`                    | Number                                  |
| Invoices                      | `invoices:#:items:#:serviceDate`                         | Date                                    |
| Invoices                      | `invoices:#:items:#:modifiedOn`                          | Date                                    |
| Invoices                      | `invoices:#:customFields:#:name`                         | String                                  |
| Invoices                      | `invoices:#:customFields:#:value`                        | String                                  |

The following fields are available in the **Membership opportunity** details:

| Resource                      | Field Name                                                                           | Data Type |
| ----------------------------- | ------------------------------------------------------------------------------------ | --------- |
| Membership                    | `membership:id`                                                                      | Number    |
| Membership                    | `membership:status`                                                                  | String    |
| Membership                    | `membership:followUpStatus`                                                          | String    |
| Membership                    | `membership:active`                                                                  | Boolean   |
| Membership                    | `membership:from`                                                                    | Date      |
| Membership                    | `membership:to`                                                                      | Date      |
| Membership                    | `membership:followUpOn`                                                              | Date      |
| Membership                    | `membership:cancellationDate`                                                        | Date      |
| Membership                    | `membership:nextScheduledBillDate`                                                   | Date      |
| Membership                    | `membership:billingFrequency`                                                        | String    |
| Membership                    | `membership:renewalBillingFrequency`                                                 | String    |
| Membership                    | `membership:duration`                                                                | Number    |
| Membership                    | `membership:renewalDuration`                                                         | Number    |
| Membership                    | `membership:initialDeferredRevenue`                                                  | Number    |
| Membership                    | `membership:memo`                                                                    | String    |
| Membership                    | `membership:createdOn`                                                               | Date      |
| Membership                    | `membership:modifiedOn`                                                              | Date      |
| Customer                      | `customer:id`                                                                        | Number    |
| Customer                      | `customer:name`                                                                      | String    |
| Customer                      | `customer:type`                                                                      | String    |
| Customer                      | `customer:active`                                                                    | Boolean   |
| Customer                      | `customer:doNotService`                                                              | Boolean   |
| Customer                      | `customer:contacts:#:id`                                                             | Number    |
| Customer                      | `customer:contacts:#:type`                                                           | String    |
| Customer                      | `customer:contacts:#:value`                                                          | String    |
| Customer                      | `customer:contacts:#:phoneSettings:doNotText`                                        | Boolean   |
| Customer                      | `customer:tagTypes:#:id`                                                             | Number    |
| Customer                      | `customer:tagTypes:#:name`                                                           | String    |
| Customer                      | `customer:tagTypes:#:active`                                                         | Boolean   |
| Customer                      | `customer:customFields:{name}`                                                       | String    |
| Business Unit                 | `businessUnit:id`                                                                    | Number    |
| Business Unit                 | `businessUnit:name`                                                                  | String    |
| Business Unit                 | `businessUnit:officialName`                                                          | String    |
| Business Unit                 | `businessUnit:active`                                                                | Boolean   |
| Membership Type               | `membershipType:id`                                                                  | Number    |
| Membership Type               | `membershipType:name`                                                                | String    |
| Membership Type               | `membershipType:active`                                                              | Boolean   |
| Membership Type               | `membershipType:discountMode`                                                        | String    |
| Membership Type               | `membershipType:locationTarget`                                                      | String    |
| Membership Type               | `membershipType:revenueRecognitionMode`                                              | String    |
| Membership Type               | `membershipType:createdOn`                                                           | Date      |
| Membership Type               | `membershipType:modifiedOn`                                                          | Date      |
| Location                      | `location:id`                                                                        | Number    |
| Location                      | `location:name`                                                                      | String    |
| Location                      | `location:active`                                                                    | Boolean   |
| Location                      | `location:address:street`                                                            | String    |
| Location                      | `location:address:unit`                                                              | String    |
| Location                      | `location:address:city`                                                              | String    |
| Location                      | `location:address:state`                                                             | String    |
| Location                      | `location:address:zip`                                                               | String    |
| Location                      | `location:address:country`                                                           | String    |
| Location                      | `location:address:latitude`                                                          | Number    |
| Location                      | `location:address:longitude`                                                         | Number    |
| Zone                          | `location:zone:id`                                                                   | Number    |
| Zone                          | `location:zone:name`                                                                 | String    |
| Recurring Location            | `recurringLocation:id`                                                               | Number    |
| Recurring Location            | `recurringLocation:name`                                                             | String    |
| Recurring Location            | `recurringLocation:active`                                                           | Boolean   |
| Recurring Location            | `recurringLocation:address:street`                                                   | String    |
| Recurring Location            | `recurringLocation:address:unit`                                                     | String    |
| Recurring Location            | `recurringLocation:address:city`                                                     | String    |
| Recurring Location            | `recurringLocation:address:state`                                                    | String    |
| Recurring Location            | `recurringLocation:address:zip`                                                      | String    |
| Recurring Location            | `recurringLocation:address:country`                                                  | String    |
| Recurring Location            | `recurringLocation:address:latitude`                                                 | Number    |
| Recurring Location            | `recurringLocation:address:longitude`                                                | Number    |
| Recurring Location            | `recurringLocation:zone:id`                                                          | Number    |
| Recurring Location            | `recurringLocation:zone:name`                                                        | String    |
| Sold By (Employee/Technician) | `soldBy:id`                                                                          | Number    |
| Sold By (Employee/Technician) | `soldBy:name`                                                                        | String    |
| Sold By (Employee/Technician) | `soldBy:email`                                                                       | String    |
| Sold By (Employee/Technician) | `soldBy:active`                                                                      | Boolean   |
| Payment Type                  | `paymentType:id`                                                                     | Number    |
| Payment Type                  | `paymentType:name`                                                                   | String    |
| Recurring Service Aggregation | `recurringServiceAggregation:unusedServicesCount`                                    | Number    |
| Recurring Service Aggregation | `recurringServiceAggregation:latestRecurringServiceEvent:date`                       | Date      |
| Recurring Service Aggregation | `recurringServiceAggregation:latestRecurringServiceEvent:status`                     | String    |
| Recurring Service Aggregation | `recurringServiceAggregation:latestRecurringServiceEvent:membershipId`               | Number    |
| Recurring Service Aggregation | `recurringServiceAggregation:latestRecurringServiceEvent:locationRecurringServiceId` | Number    |
| Recurring Service Aggregation | `recurringServiceAggregation:latestRecurringServiceEvent:jobType:id`                 | Number    |
| Recurring Service Aggregation | `recurringServiceAggregation:latestRecurringServiceEvent:jobType:name`               | String    |
| Recurring Service Aggregation | `recurringServiceAggregation:nextRecurringServiceEvent:date`                         | Date      |
| Recurring Service Aggregation | `recurringServiceAggregation:nextRecurringServiceEvent:status`                       | String    |
| Recurring Service Aggregation | `recurringServiceAggregation:nextRecurringServiceEvent:membershipId`                 | Number    |
| Recurring Service Aggregation | `recurringServiceAggregation:nextRecurringServiceEvent:locationRecurringServiceId`   | Number    |
| Recurring Service Aggregation | `recurringServiceAggregation:nextRecurringServiceEvent:jobType:id`                   | Number    |
| Recurring Service Aggregation | `recurringServiceAggregation:nextRecurringServiceEvent:jobType:name`                 | String    |
| Recurring Service Aggregation | `recurringServiceAggregation:recurringServiceEvents:#:date`                          | Date      |
| Recurring Service Aggregation | `recurringServiceAggregation:recurringServiceEvents:#:status`                        | String    |
| Recurring Service Aggregation | `recurringServiceAggregation:recurringServiceEvents:#:membershipId`                  | Number    |
| Recurring Service Aggregation | `recurringServiceAggregation:recurringServiceEvents:#:locationRecurringServiceId`    | Number    |
| Recurring Service Aggregation | `recurringServiceAggregation:recurringServiceEvents:#:jobType:id`                    | Number    |
| Recurring Service Aggregation | `recurringServiceAggregation:recurringServiceEvents:#:jobType:name`                  | String    |

The following fields are available in the **Inbound Call opportunity** details:

| Resource | Field Name                                  | Data Type         |
| -------- | ------------------------------------------- | ----------------- |
| Call     | `call:id`                                   | Number            |
| Call     | `call:eventId`                              | String            |
| Call     | `call:webhookId`                            | String            |
| Call     | `call:direction`                            | String (Inbound)  |
| Call     | `call:callType`                             | String            |
| Call     | `call:from`                                 | String (phone)    |
| Call     | `call:to`                                   | String (phone)    |
| Call     | `call:duration`                             | String (HH:MM:SS) |
| Call     | `call:durationInSeconds`                    | Number            |
| Call     | `call:receivedOn`                           | Date              |
| Call     | `call:modifiedOn`                           | Date              |
| Call     | `call:recordingUrl`                         | String            |
| Call     | `call:voiceMailUrl`                         | String            |
| Call     | `call:reason:id`                            | Number            |
| Call     | `call:reason:name`                          | String            |
| Call     | `call:reason:lead`                          | Boolean           |
| Call     | `call:reason:active`                        | Boolean           |
| Call     | `call:agent:id`                             | Number            |
| Call     | `call:agent:externalId`                     | String            |
| Call     | `call:agent:name`                           | String            |
| Call     | `call:createdBy:id`                         | Number            |
| Call     | `call:createdBy:name`                       | String            |
| Call     | `call:campaign:id`                          | Number            |
| Call     | `call:campaign:name`                        | String            |
| Call     | `call:campaign:active`                      | Boolean           |
| Call     | `call:campaign:source`                      | String            |
| Call     | `call:campaign:otherSource`                 | String            |
| Call     | `call:campaign:medium`                      | String            |
| Call     | `call:campaign:otherMedium`                 | String            |
| Call     | `call:campaign:businessUnit`                | String            |
| Call     | `call:campaign:dnis`                        | String            |
| Call     | `call:campaign:createdOn`                   | Date              |
| Call     | `call:campaign:modifiedOn`                  | Date              |
| Call     | `call:campaign:category:id`                 | Number            |
| Call     | `call:campaign:category:name`               | String            |
| Call     | `call:campaign:category:active`             | Boolean           |
| Customer | `call:customer:id`                          | Number            |
| Customer | `call:customer:name`                        | String            |
| Customer | `call:customer:email`                       | String            |
| Customer | `call:customer:type`                        | String            |
| Customer | `call:customer:active`                      | Boolean           |
| Customer | `call:customer:balance`                     | Number            |
| Customer | `call:customer:doNotMail`                   | Boolean           |
| Customer | `call:customer:doNotService`                | Boolean           |
| Customer | `call:customer:hasActiveMembership`         | Boolean           |
| Customer | `call:customer:importId`                    | Number            |
| Customer | `call:customer:mergedToId`                  | Number            |
| Customer | `call:customer:createdBy`                   | Number            |
| Customer | `call:customer:createdOn`                   | Date              |
| Customer | `call:customer:modifiedOn`                  | Date              |
| Customer | `call:customer:address:street`              | String            |
| Customer | `call:customer:address:streetAddress`       | String            |
| Customer | `call:customer:address:unit`                | String            |
| Customer | `call:customer:address:city`                | String            |
| Customer | `call:customer:address:state`               | String            |
| Customer | `call:customer:address:zip`                 | String            |
| Customer | `call:customer:address:country`             | String            |
| Customer | `call:customer:address:latitude`            | Number            |
| Customer | `call:customer:address:longitude`           | Number            |
| Customer | `call:customer:contacts:#:id`               | Number            |
| Customer | `call:customer:contacts:#:type`             | String            |
| Customer | `call:customer:contacts:#:value`            | String            |
| Customer | `call:customer:contacts:#:memo`             | String            |
| Customer | `call:customer:contacts:#:active`           | Boolean           |
| Customer | `call:customer:contacts:#:modifiedOn`       | Date              |
| Customer | `call:customer:phoneSettings:#:phoneNumber` | String            |
| Customer | `call:customer:phoneSettings:#:doNotText`   | Boolean           |
| Customer | `call:customer:memberships:#:id`            | Number            |
| Customer | `call:customer:memberships:#:active`        | Boolean           |
| Customer | `call:customer:memberships:#:status`        | String            |
| Customer | `call:customer:memberships:#:from`          | Date              |
| Customer | `call:customer:memberships:#:to`            | Date              |
| Customer | `call:customer:memberships:#:locationId`    | Number            |
| Customer | `call:customer:memberships:#:type:id`       | Number            |
| Customer | `call:customer:memberships:#:type:name`     | String            |
| Customer | `call:customer:memberships:#:type:active`   | Boolean           |
| Customer | `call:customer:customFields:#:typeId`       | Number            |
| Customer | `call:customer:customFields:#:name`         | String            |
| Customer | `call:customer:customFields:#:value`        | String            |
| Tenant   | `call:__tenantInfo:id`                      | Number            |
| Tenant   | `call:__tenantInfo:name`                    | String            |

#### Standard Field Mapping

Hatch standard fields are mapped from ServiceTitan detail fields as detailed below.

**Job Opportunity**

<Note>
  The base object of this opportunity model is the ServiceTitan **Job**. Therefore, (as an example) the **id** field would indicate the ID of the ServiceTitan **Job** record.
</Note>

In Job opportunities, the following Hatch standard fields are mapped from ServiceTitan detail fields:

| Hatch Standard Field                                                                                                          | ServiceTitan Detail Field                                                                                    |
| ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| **Email**                                                                                                                     | The value of the first item in the **customer:contacts** list that has **type** equal to **email**           |
| **External ID**                                                                                                               | **id**                                                                                                       |
| **External Contact ID**                                                                                                       | **customer:id**                                                                                              |
| **External Created At**                                                                                                       | **createdOn**                                                                                                |
| **External Updated At**                                                                                                       |                                                                                                              |
| *(used for Hatch opportunity sorting)*                                                                                        | *The most recent date within these fields:*                                                                  |
| **modifiedOnappointments:1:modifiedOn**                                                                                       |                                                                                                              |
| **estimates:1:modifiedOn**                                                                                                    |                                                                                                              |
| **First Name**                                                                                                                | *If there is no comma in**customer:name** :*                                                                 |
| The first word in the **customer:name** value                                                                                 |                                                                                                              |
| *If there is a comma in**customer:name** :*                                                                                   |                                                                                                              |
| All text after the first comma in the **customer:name** value                                                                 |                                                                                                              |
| **Last Name**                                                                                                                 | *If there is no comma in the **customer:name** value:*                                                       |
| Everything after the first word in the **customer:name** value                                                                |                                                                                                              |
| *If there is a comma in the **customer:name** value:*                                                                         |                                                                                                              |
| All text before the first comma in the **customer:name** value                                                                |                                                                                                              |
| **Phone**                                                                                                                     | The **value** of the first item in the **customer:contacts** list that has **type** equal to **mobilePhone** |
| *IF ABOVE IS MISSING:* The **value** of the first item in the **customer:contacts** list that has **type** equal to **phone** |                                                                                                              |

**Membership Opportunity**

<Note>
  The base object of this opportunity model is the ServiceTitan **Membership**. Therefore, (as an example) the **id** field would indicate the ID of the ServiceTitan **Membership** record.
</Note>

In Membership opportunities, the following Hatch standard fields are mapped from ServiceTitan detail fields:

| Hatch Standard Field                                                                                                      | ServiceTitan Detail Field                                                                                |
| ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| **Email**                                                                                                                 | The value of the first item in the **customer:contacts** list that has **type** equal to **email**       |
| **External ID**                                                                                                           | **id**                                                                                                   |
| **External Contact ID**                                                                                                   | **customer:id**                                                                                          |
| **External Created At**                                                                                                   | **createdOn**                                                                                            |
| **External Updated At**                                                                                                   |                                                                                                          |
| *(used for Hatch opportunity sorting)*                                                                                    | **modifiedOn**                                                                                           |
| **First Name**                                                                                                            | *If there is no comma in**customer:name** :*                                                             |
| The first word in the **customer:name** value                                                                             |                                                                                                          |
| *If there is a comma in**customer:name** :*                                                                               |                                                                                                          |
| All text after the first comma in the **customer:name** value                                                             |                                                                                                          |
| **Last Name**                                                                                                             | *If there is no comma in the **customer:name** value:*                                                   |
| Everything after the first word in the **customer:name** value                                                            |                                                                                                          |
| *If there is a comma in the **customer:name** value:*                                                                     |                                                                                                          |
| All text before the first comma in the **customer:name** value                                                            |                                                                                                          |
| **Phone**                                                                                                                 | The value of the first item in the **customer:contacts** list that has **type** equal to **mobilePhone** |
| *IF ABOVE IS MISSING:* The value of the first item in the **customer:contacts** list that has **type** equal to **phone** |                                                                                                          |

**Inbound Call Opportunity**

| Hatch Standard Field | ServiceTitan Detail Field                                                       |
| -------------------- | ------------------------------------------------------------------------------- |
| Email                | `call:customer:email`                                                           |
| External ID          | `call:webhookId`                                                                |
| External Contact ID  | `call:customer:id`                                                              |
| External Created At  | `call:receivedOn`                                                               |
| External Updated At  | `call:modifiedOn`                                                               |
| First Name           | Same comma/space split rule as Job & Membership applied to `call:customer:name` |
| Last Name            | Same comma/space split rule as Job & Membership applied to `call:customer:name` |
| Phone                | `call:from`                                                                     |
| Status               | `call:callType`                                                                 |

#### Creating a Job

You can create ServiceTitan jobs directly in Hatch, eliminating tab-switching, manual re-entry, and lost context. If the ServiceTitan integration is enabled,
the "Create a Job" button will appear on the right when selecting a contact, within the "Quick Actions" section. When creating a job,
you will need to select a customer and location, and provide the required information.

<img src="https://mintcdn.com/usehatchapp/Y2NTimZIYT6M293B/images/integrations/crm-field-management-systems/servicetitan-create-job.png?fit=max&auto=format&n=Y2NTimZIYT6M293B&q=85&s=60e30fa3db1892dd2fe5f659d87f9e4f" alt="" width="520" height="778" data-path="images/integrations/crm-field-management-systems/servicetitan-create-job.png" />

### What are the limitations of the integration?

* The ServiceTitan API does not provide information related to the Job's "Opportunity", so Hatch is unable to target audiences based on the follow-up date or status.

### Recommended targeting for audiences

We have a [template library](/getting-started/audience-builder/audience-templates) to help get you started on building audiences. These are what we've found works best to accomplish common use cases. Feel free to use these as a starting point for your own campaigns, but it's always wise to evaluate what targeting strategy works best with your internal processes.

#### Speed to Lead (Removal Rules)

The goal in mind here is to remove contacts from the STL campaign when a job (appointment) has been scheduled in ServiceTitan. There are a couple ways to achieve this:

<img src="https://mintcdn.com/usehatchapp/v_VMk57hRIk0rCvf/images/integrations/crm-field-management-systems/ST-appt-removal-rules.png?fit=max&auto=format&n=v_VMk57hRIk0rCvf&q=85&s=d84774dba9dfe263e1577769b7997c78" alt="ST appt removal rules" width="688" height="231" data-path="images/integrations/crm-field-management-systems/ST-appt-removal-rules.png" />

### FAQ

<AccordionGroup>
  <Accordion title="Where can I find additional resources to assist with building ServiceTitan campaigns?">
    Check out our blog posts! Here are some examples:

    <ul>
      <li><a href="https://www.usehatchapp.com/blog/recurring-services-integration" target="_blank">Improve retention with recurring services integration</a></li>
      <li><a href="https://www.usehatchapp.com/blog/servicetitan-call-status" target="_blank">Create an abandoned call campaign to re-engage callers</a></li>
    </ul>
  </Accordion>

  <Accordion title="What API scopes are required by the integration, and are we able to customize them?">
    The scopes are standardized via our official ServiceTitan application so they are not able to be customized. If there are any scopes your organization does not wish Hatch to have access to, many of the features are optional and can be turned off. In that case, the integration would not access the related scopes.<br /><br />

    <b>The following <u>Read</u> scopes are required:</b>

    <ul>
      <li>Accounting: <b>Invoices, Invoice Items, Payment Types</b>, <b>Tax Zones</b></li>
      <li>CRM: <b>Booking Provider Tags</b>, <b>Bookings</b>, <b>Customers</b>, <b>Leads</b>, <b>Locations</b>, <b>Tags</b></li>
      <li>Dispatch: <b>Appointment Assignments</b>, <b>Capacity</b>, <b>Non-Job Appointments</b>, <b>Zones</b></li>
      <li>Job Planning and Management: <b>Appointments</b>, <b>Job Cancel Reasons</b>, <b>Job Hold Reasons</b>, <b>Jobs</b>, <b>Job Types</b></li>
      <li>Memberships: <b>Customer Memberships</b>, <b>Membership Types</b>, <b>Recurring Service Events</b>, <b>Recurring Services</b>, <b>Recurring Service Types</b></li>
      <li>Marketing: <b>Campaigns</b>, <b>Campaign Categories</b></li>
      <li>Sales & Estimates: <b>Estimates</b></li>
      <li>Settings: <b>Business Units</b>, <b>Employees</b>, <b>Tag Types</b>, <b>Technicians</b>, <b>User Roles</b></li>
    </ul>

    <b>The following <u>Write</u> scopes are required:</b>

    <ul>
      <li>CRM: <b>Customers</b>, <b>Leads</b>, <b>Locations</b></li>
      <li>Dispatch: <b>Capacity</b></li>
      <li>Marketing: <b>Campaigns</b></li>
      <li>Job Planning and Management: <b>Jobs, Appointments</b></li>
    </ul>
  </Accordion>
</AccordionGroup>
