# Configuring Zendesk Service Desk

In SailPoint, configure the following items for your Zendesk Service Desk integration:

- [Ticket Creation](<#ticket-creation>)
- [Status Mapping](<#status-mapping>)
- [Requester Source](<#requester-source>)

On the Summary page, you can review the general settings and parameters for the connectivity and authentication.

## Ticket Creation

In a centralized approach spanning many users and resources to strengthen IT controls and provide proof of compliance to auditors and executive management, you can create a ticket for your integration based on your requirements. A ticket has all the relevant data filed for further processing.

The information provided in this section is used to create the payload from SailPoint to create a ticket on the managed Zendesk instance. You can customize this information by adding fields as required.

> [!IMPORTANT]
>
> SailPoint recommends that you include the Apache Velocity variables as needed to meet your specific use cases.

> [!IMPORTANT]
>
> Currently, Zendesk Service Desk supports only the Incident ticket type.

> [!NOTE]
>
> **Screenshot**
>
> [![Ticket Creation](<https://documentation.sailpoint.com/connectors/service_desk_integrations/zendesk/help/img/ticket_creation.png>)](<https://documentation.sailpoint.com/connectors/service_desk_integrations/zendesk/help/img/ticket_creation.png>)

1. Enter a **Subject** for the ticket. For example:

   ```text
   SailPoint Access Request $!plan.arguments.identityRequestId #if($plan.arguments.identityName) for the user $plan.arguments.identityName #end
   ```
2. Enter the numeric ID of the user who submitted the ticket in the **Submitter ID** field. For example:

   ```text
   $!{plan.arguments.opened_by|'Default_Account_ID'}
   ```

   In the example above, replace `Default_Account_ID` with the service account's ID for the Zendesk user from [Requester Source](<#requester-source>) on SailPoint.
3. Enter the description of the requirement that generated the ticket in the **Body** field. For example:

   ```text
   #foreach($req in $plan.requests) #if($req.operation == 'Create') Create Account on application $req.resource #else For $req.id in application $req.resource #end #if($req.items) $newline #foreach($item in $req.items) #if ($item.name == '*disabled*' && $item.value == 'true') Disable Account. $newline #elseif ($item.name == '*disabled*' && $item.value == 'false') Enable Account. $newline #elseif ($item.name == '*locked*' && $item.value == 'false') Unlock Account. $newline #else $!item.Operation $item.name: $item.value $newline #end #end #else $newline $!req.Operation Account #end $newline #end
   ```
4. Enter the **Priority** to indicate the urgency of the ticket. Accepted values are `urgent`, `high`, `normal`, or `low`.
5. Enter `Incident` as the ticket **Type**. This is currently the only supported ticket type.
6. Enter the numeric ID, or an Apache Velocity variable, of the user requesting support through the ticket into the **Requestor ID** field. For example:

   ```text
   $!{plan.arguments.opened_by|'Default_Account_ID'}
   ```

   In the example above, replace `Default_Account_ID` with the service account's ID for the Zendesk user from [Requester Source](<#requester-source>) on SailPoint.
7. To add a field, select **Add Field**. Select the field type and enter the required information based on the type. Options are Single Value, Multi Valued Field, or Grouped Key-Value Pairs.

   For example, to add a custom attribute such as `custom_attr` in the request to the Zendesk managed system, add the field using the Single Value type. The corresponding value can be either static or dynamic. For the dynamic value, use Apache Velocity Template expressions.

   You can also customize the ticket fields based on your requirements by setting up a Before Provisioning rule to generate ticket fields. The default rule name is *Sample Before Provisioning Rule for SDIM*. You must contact SailPoint Services to create a *Before Provisioning* rule for your integration. You can use this [service desk integration update patch](<https://developer.sailpoint.com/apis/beta/?_gl=1*17v7874*_ga*MTc0NTQzNTEyOS4xNTY2NDU4MDA1*_ga_SS72Z4HXJM*MTYxMDUyMTE2Ni41OS4xLjE2MTA1Mjc4NTEuMA..&amp;_ga=2.138651699.1641019313.1621231234-1745435129.1566458005#operation/patchServiceDeskIntegration>) to add that rule for multiple integrations.

   [![Add Field](<https://documentation.sailpoint.com/connectors/service_desk_integrations/zendesk/help/img/add_field.gif>)](<https://documentation.sailpoint.com/connectors/service_desk_integrations/zendesk/help/img/add_field.gif>)

#### Advanced Properties

To add advanced properties to the details of the ticket, select **Advanced Properties**.

> [!NOTE]
>
> **Screenshot**
>
> [![Advanced Properties](<https://documentation.sailpoint.com/connectors/service_desk_integrations/zendesk/help/img/ticket_creation_advanced.png>)](<https://documentation.sailpoint.com/connectors/service_desk_integrations/zendesk/help/img/ticket_creation_advanced.png>)

1. Enter the basic JSON root element of the request ticket in the **Request Root Element** field. For example:

   ```text
   Ticket
   ```
2. Enter the type of the **Request Root Element**. For example:

   ```text
   JSONObject
   ```
3. Enter the resource used for the request ticket in the **Resource** field. Do not include the base URL for the instance in the value. Provide only the remaining directories for the endpoint. For example:

   ```text
   /api/v2/tickets
   ```
4. Enter the JSON path expression that indicates the location of the ticket number in the **Response Element** field. For example:

   ```text
   $.ticket.id
   ```

> [!NOTE]
>
> The ticket number generated on the Service Desk system for the corresponding provisioning action can be seen under **Search \> Account Activity** details of the identity. For more information, refer to [Account Activity Using Search](<https://documentation.sailpoint.com/saas/help/search/index.html#account-activity>).

## Status Mapping

Map the status of the incident in SailPoint to the corresponding Zendesk status. To add another row for status mapping, select **Add Status**. Customize the status map to meet your needs by adding or deleting as needed.

> [!NOTE]
>
> **Screenshot**
>
> [![Status Mapping](<https://documentation.sailpoint.com/connectors/service_desk_integrations/zendesk/help/img/status_mapping.png>)](<https://documentation.sailpoint.com/connectors/service_desk_integrations/zendesk/help/img/status_mapping.png>)

> [!IMPORTANT]
>
> Each status must have at least one mapped value. For more information, refer to [Get the time check configuration of queued service desk integration module tickets](<https://developer.sailpoint.com/docs/api/get-status-check-details-v-1/>) and [Update the time check configuration of queued SDIM tickets](<https://developer.sailpoint.com/docs/api/update-status-check-details-v-1/>).

### Identity Security Cloud Status Options

- Committed
- Queued
- Failed

### Zendesk Service Desk Status Options

- New
- Pending
- Solved
- Closed
- Open

#### Advanced Properties

To add more details to the status mapping, select **View Advanced Properties**.

1. Enter the resource used for the request ticket in the **Resource** field. Do not include the base URL for the instance in the value. Provide only the remaining directories for the endpoint. For example:

   ```text
   /api/v2/tickets/$ticketId
   ```
2. Enter the JSON path in the **Response Element** field for the status mapping. For example:

   ```text
   $.ticket.status
   ```

## Requester Source

> [!NOTE]
>
> **Screenshot**
>
> [![Requester Source](<https://documentation.sailpoint.com/connectors/service_desk_integrations/zendesk/help/img/requester_source.png>)](<https://documentation.sailpoint.com/connectors/service_desk_integrations/zendesk/help/img/requester_source.png>)

Select the source name that aggregated the ticketing system's users.
