Skip to content

DOC 500 zendesk update #2769

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/Vocab/Docs/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
(?:L|l)ookback
(?:P|p)ageviews?\b
(?:P|p)endo
(?:P|p)odfile
(?:P|p)ostgres
(?:R|r)emarketing
(?:U|u)nlinks?\b
Expand Down Expand Up @@ -69,6 +70,7 @@ upsert
US
utm
Vero
Vidora
viewability
WebKit
Wootric
Expand Down
33 changes: 18 additions & 15 deletions src/connections/destinations/catalog/zendesk/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ id: 54521fdc25e721e32a72ef06
2. Search for "Zendesk" in the Catalog, select it, and choose which of your sources to connect the destination to.
3. There are two ways to authenticate your Zendesk account with Segment:
* Use the standard email and password you use to Sign In to your Zendesk account. In the Zendesk settings, add your email in the **Email** setting and your password in the **Password** setting.
* Use Zendesk OAuth with a unique token. Get the corresponding token from your Zendesk account: **Settings > Channels > API** and under the Settings Tab choose the corresponding token from the "Active API Tokens" list. In the Zendesk settings, add your `email/token` in the **Email** setting (i.e. `peter@intech.com/token` - use the actual word token in your email address) and add the actual token in the **Password** setting.
* Use Zendesk OAuth with a unique token. Get the corresponding token from your Zendesk account: **Settings > Channels > API** and under the Settings Tab choose the corresponding token from the "Active API Tokens" list. In the Zendesk settings, add your `email/token` in the **Email** setting (for example, `peter@intech.com/token` - use the actual word token in your email address) and add the actual token in the **Password** setting.
4. Add your Zendesk subdomain in the **Subdomain** setting (not including `.zendesk.com`).

## Identify
Expand All @@ -31,7 +31,7 @@ analytics.identify("97980cfea0067", {
});
```

When you call `identify` we will insert or update a user record in Zendesk. We'll use the user email in `traits.email` to match user records in Zendesk. If there are multiple users matching the email, then no updates are submitted. Note that you must provide a trait for either `name` or `first_name` and `last_name` in order for the `identify` call to send to Zendesk. If you provide a `name`, we will parse this into the `first_name` and `last_name` fields.
When you call `identify`, Segment inserts or updates a user record in Zendesk and uses the user email in `traits.email` to match user records in Zendesk. If there are multiple users matching the email, then no updates are submitted. Note that you must provide a trait for either `name` or `first_name` and `last_name` in order for the `identify` call to send to Zendesk. If you provide a `name`, Segment parses this into the `first_name` and `last_name` fields.

Here's an example:

Expand Down Expand Up @@ -61,7 +61,7 @@ Here's an example:
}
```

By default, Users in Zendesk have many standard attributes associated with a single User record. Segment, at this time, is mapping to a subset of these. If you attempt to send data to a Zendesk attribute that we have not yet mapped, it will create a custom field for this (it will not update the existing attribute).
By default, Users in Zendesk have many standard attributes associated with a single User record. Segment, at this time, is mapping to a subset of these. If you attempt to send data to a Zendesk attribute that are not yet mapped, it will create a custom field for this (it will not update the existing attribute).

Here are the Zendesk User Attributes Segment maps to and their syntax.

Expand All @@ -79,7 +79,7 @@ Here are the Zendesk User Attributes Segment maps to and their syntax.

### Removing Users from a Zendesk Organization Membership on Segment Identify

To remove a user from an organization, navigate to your Zendesk destination settings and click **Enable Removing Users from Organizations** . When this setting is enabled, Segment detects when you pass an identify events with `traits.company.id` where `traits.company.remove: true`, and then sends a request to the Zenedesk API to remove the user from the organization. If you enable the setting in your Zendesk destination settings but do not pass the correct trait values, Segment defaults to the standard `identify` behavior, which creates or updates a user.
To remove a user from an organization, navigate to your Zendesk destination settings and click **Enable Removing Users from Organizations** . When this setting is enabled, Segment detects when you pass an identify events with `traits.company.id` where `traits.company.remove: true`, and then sends a request to the Zendesk API to remove the user from the organization. If you enable the setting in your Zendesk destination settings but do not pass the correct trait values, Segment defaults to the standard `identify` behavior, which creates or updates a user.

Here's an example:
```js
Expand All @@ -105,11 +105,11 @@ Here's an example:

### Zendesk Verification Email at User Creation

To limit identified users from receiving a verification email from Zendesk, simply enable the **"Create Users as Verified"** option in the Zendesk destination settings. We will send `verified` as either true or false for each request based on this setting (you cannot overwrite this on a per-request basis).
To limit identified users from receiving a verification email from Zendesk, simply enable the **"Create Users as Verified"** option in the Zendesk destination settings. Segment sends `verified` as either true or false for each request based on this setting (you cannot overwrite this on a per-request basis).

### Zendesk Custom User Fields

You may map to custom user fields within Zendesk by passing your custom field key-value pair as a trait in the Identify call. When passing traits within the identify event, Segment will first try and map the trait to a known, existing field in Zendesk - either the canned standard fields described above or to a custom field (user_fields). We format the field name from either camelCaseFormat or snake_case_format into snake_case_format. If you're finding that your custom fields are not populating in Zendesk as you would expect check the name formatting with this in mind.
You may map to custom user fields within Zendesk by passing your custom field key-value pair as a trait in the Identify call. When passing traits within the identify event, Segment will first try and map the trait to a known, existing field in Zendesk - either the canned standard fields described above or to a custom field (user_fields). Segment formats the field name from either camelCaseFormat or snake_case_format into snake_case_format. If you're finding that your custom fields are not populating in Zendesk as you would expect check the name formatting with this in mind.

## Track

Expand All @@ -122,15 +122,16 @@ analytics.track('Article Completed', {
});
```

**Important:** You must have a Zendesk [Sunshine plan](https://www.zendesk.com/pricing/?variant=a#platform) to make track calls.
> info ""
> You must have a Zendesk [Sunshine plan](https://www.zendesk.com/pricing/?variant=a#platform) to make track calls.

When you make a Track call, Segment sends data about the user's activity to Zendesk.

We will only send `track` events when the following two conditions are met:
Segment will only send `track` events when the following two conditions are met:

1. The call is listed in the "Events" setting.
2. A `userId` is included.
- **Note:** If the `userId` doesn't match any existing users in Zendesk, we will return an error.
- **Note:** If the `userId` doesn't match any existing users in Zendesk, the destination returns an error.

**Mapping Users to an Email**: To map a Segment track event to a Zendesk Sunshine event by email, add the user's email address in the Track call as `properties.email`. This allows Zendesk to tie the event to the user. If there is no `properties.email`, Segment sends the `userId` as `external_id`. If the email is provided in the track call, a javascript call may look like the example below.

Expand All @@ -143,7 +144,8 @@ analytics.track('Article Completed', {
}
});
```

> warning "Zendesk API Limit"
> Track calls to Zendesk must reference a user identifier of less than 61 characters. While you may create a user with an identifier of greater than 60 characters, track calls that reference that user return a 400 error. This is due to a limitation in the Zendesk Sunshine API.
## Group

If you're not familiar with the Segment Specs, take a look to understand what the [Group method](/docs/connections/spec/group/) does. An example call would look like:
Expand All @@ -158,9 +160,10 @@ analytics.group("0e8c78ea9d97a7b8185e8632", {
});
```

**Important:** To make group calls, you _must_ be an Administrator in Zendesk.
> info ""
> To make group calls, you _must_ be an Administrator in Zendesk.

When you call `group` we will insert or update an organization in Zendesk. We'll use the `groupId` you include in the call to match organization records in Zendesk. If there are multiple organizations matching the name, then no updates are submitted.
When you call `group` Segment inserts or update an organization in Zendesk and uses the `groupId` you include in the call to match organization records in Zendesk. If there are multiple organizations matching the name, then no updates are submitted.

Here's an example:

Expand Down Expand Up @@ -188,9 +191,9 @@ Here's an example:
}
```

Every time you call group, we will also link the organization to the user making the request.
Every time you call group, Segment links the organization to the user making the request.

By default, Organizations in Zendesk have many standard attributes associated with a single Organization record. Segment, at this time, is mapping to a subset of these. If you attempt to send data to a Zendesk attribute that we have not yet mapped, it will create a custom field for this (it will not update the existing attribute).
By default, Organizations in Zendesk have many standard attributes associated with a single Organization record. Segment, at this time, is mapping to a subset of these. If you attempt to send data to a Zendesk attribute that are not yet mapped, it will create a custom field for this (it will not update the existing attribute).

Here are the Zendesk Organization Attributes Segment maps to and their syntax.

Expand All @@ -206,4 +209,4 @@ Here are the Zendesk Organization Attributes Segment maps to and their syntax.

### Zendesk Custom Organization Fields

You may map to custom organization fields within Zendesk by passing your custom field key-value pair as a trait in the Group call. When passing traits within the group event, Segment will first try and map the trait to a known, existing field in Zendesk - either the canned standard fields described above or to a custom field (organization_fields). We format the field name from either camelCaseFormat or snake_case_format into snake_case_format. If you're finding that your custom fields are not populating in Zendesk as you would expect check the name formatting with this in mind.
You may map to custom organization fields within Zendesk by passing your custom field key-value pair as a trait in the Group call. When passing traits within the group event, Segment will first try and map the trait to a known, existing field in Zendesk - either the canned standard fields described above or to a custom field (organization_fields). Segment formats the field name from either camelCaseFormat or snake_case_format into snake_case_format. If you're finding that your custom fields are not populating in Zendesk as you would expect check the name formatting with this in mind.
1 change: 1 addition & 0 deletions vale-styles/Vocab/Docs/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ upsert
US
utm
Vero
Vidora
viewability
WebKit
Wootric
Expand Down