Zendesk® Sunshine's modern cloud based CRM platform is used to identify customer needs and trends. You can use the Zendesk Export Integration connector to export Events data to Zendesk Sunshine.

This topic contains:

Prerequisites

  • Basic knowledge of Treasure Data

  • Zendesk Sunshine account

Limitations

Result output schema must match require columns (name and data type) with a target event.

profile_identifier can be set to a maximum of 20 columns (1 → 20 in a continuously ascending order).

Action

Target

Column required

Column requires at least 1

Column optional

Note

Create

Events for profiles

profile_source(String),
profile_type(String),
event_source(String),
event_type(String),
event_properties(JSON String)

profile_identifier_1(String), profile_identifier_2(String), profile_identifier_3(String), profile_identifier_4(String), profile_identifier_5(String), profile_identifier_6(String),
profile_identifier_7(String), profile_identifier_8(String), profile_identifier_9(String), profile_identifier_10(String), profile_identifier_11(String), profile_identifier_12(String),
profile_identifier_13(String), profile_identifier_14(String), profile_identifier_15(String), profile_identifier_16(String), profile_identifier_17(String), profile_identifier_18(String),
profile_identifier_19(String), profile_identifier_20(String)

profile_name,
profile_created_at,
profile_attributes,
event_description,
event_created_at,
event_received_at

 profile_identifier_* must follow format “type,value”

ex: profile_identifier_1 : “email,example@gmail.com“

Create

Events for a profile ID

profile_id(String),
event_source(String),
event_type(String),
event_properties(JSON String)


event_description,
event_created_at,
event_received_at


Create

Events for a user ID

user_id(String),
profile_source(String),
profile_type(String),
event_source(String),
event_type(String),
event_properties(JSON String)

profile_identifier_1(String), profile_identifier_2(String), profile_identifier_3(String), profile_identifier_4(String), profile_identifier_5(String), profile_identifier_6(String),
profile_identifier_7(String), profile_identifier_8(String), profile_identifier_9(String), profile_identifier_10(String), profile_identifier_11(String), profile_identifier_12(String),
profile_identifier_13(String), profile_identifier_14(String), profile_identifier_15(String), profile_identifier_16(String), profile_identifier_17(String), profile_identifier_18(String),
profile_identifier_19(String), profile_identifier_20(String)

profile_name,
profile_created_at,
profile_attributes,
event_description,
event_created_at,
event_received_at

 profile_identifier_* must follow format “type,value”

ex: profile_identifier_1 : “email,example@gmail.com“


 Zendesk Sunshine Limitations

Rate Limit

The API enforces rate limiting on standard create endpoints. Limits include requests made from the Zendesk Apps framework. The rate limits for each plan type are:


Sunshine Lite

Sunshine Professional

Sunshine Enterprise

Custom objects

500 requests per minute

750 requests per minute

1,000 requests per minute

Profiles

Not included

250 requests per minute

500 requests per minute

Events

Not included

250 requests per minute

500 requests per minute

Profiles Limit

The following table shows profiles hard limits. Availability and limits can vary according to Sunshine plan type.

Category

Limit

Profiles

30,000,000

Profile sources

50

Profile types

2500

Identifiers per profile

20

Profile source character length

40

Profile type character length

40

Identifier source character length

60

Identifier type character length

60

Event Limit

The following table shows events hard limits. Availability and limits can vary according to Sunshine plan type.

Category

Limit

Event sources

50

Event types

2500

Event source character length

40

Event type character length

40


Use the TD Console to Create Your Connection

Create a New Connection

In Treasure Data, you must create and configure the data connection, to be used during export, prior to running your query. As part of the data connection, you provide authentication to access the integration.

1. Open the TD Console.
2. Navigate to Integrations Hub > Catalog.
3. Search and select Zendesk.

4. Click Create.
You are creating an authenticated connection. The following dialog opens.

5. To export event data, type the login URL for Zendesk. For example: https://{your_domain}.zendesk.com.
6. There are different options for Auth method: basic, token, and OAuth.
7. Optionally, for basic authentication, type values for username and password.
8. Optionally, for token, type values for username and token.
9. Optionally, for OAuth, type values for OAuth Access Token.
10. Select Continue.
11. Name your new Zendesk connection.
12. Select Done.

Configure Export Results in Your Data Connection

Create or reuse a query.

Sometimes you need to define the column mapping in the query.

1. Open the TD Console.
2. Navigate to Data Workbench > Queries.
3. Select the query that you plan to use to export data. Each type of resource requires specific columns and exact column names (case sensitive) and data types.
Code examples that can be used to export data:

Events for profiles
SELECT profile_source, profile_type, profile_identifier_1,
event_source, event_type, event_properties
FROM your_table;


Events for profile ID
SELECT profile_id, event_source, event_type, event_properties
FROM your_table;


Events for user id
SELECT user_id, profile_source, profile_type, profile_identifier_1,
event_source, event_type, event_properties
FROM your_table;
4. Select Export Results located at the top of your query editor. 
The Choose Integration dialog opens.
You have two options when selecting a connection to export the results, using an existing connection or creating a new one. These instructions assume you are selecting an existing connection.
5. Type the connection name in the search box to filter.
6. Select your connection.
7. Select one of the following:

8. Optionally, select Skip invalid records.
9. Select Done.  

Optionally Schedule the Job for Export

You can schedule the job to periodically write the output result to the target destination that you defined.

Optionally Configure Export Results in Workflow

See About Using Workflows to Export Data with the TD Toolbelt for more information on using data connectors in a workflow to export data.

Examples of Exporting Events for Profiles

Using Basic Auth:
timezone: UTC

_export:
  td:
    database: sample_datasets

+td-result-into-target:
  td>: queries/sample.sql
  result_connection: your_connections_name
  result_settings:
    login_url: https://{example}.zendesk.com
    auth_method: basic
    username: {username}
    password: {password}
    target: event_profile
    skip_invalid_records: true


Using Auth Token:
timezone: UTC

_export:
  td:
    database: sample_datasets

+td-result-into-target:
  td>: queries/sample.sql
  result_connection: your_connections_name
  result_settings:
    login_url: https://{example}.zendesk.com
    auth_method: token
    username: {username}
    token: {token}
    target: event_profile
    skip_invalid_records: true


Using OAuth Token
timezone: UTC

_export:
  td:
    database: sample_datasets

+td-result-into-target:
  td>: queries/sample.sql
  result_connection: your_connections_name
  result_settings:
    login_url: https://{example}.zendesk.com
    auth_method: oauth
    access_token: {access_token}
    target: event_profile
    skip_invalid_records: true

Examples of Exporting Events for Profile ID

Using Basic Auth
timezone: UTC

_export:
  td:
    database: sample_datasets

+td-result-into-target:
  td>: queries/sample.sql
  result_connection: your_connections_name
  result_settings:
    login_url: https://{example}.zendesk.com
    auth_method: basic
    username: {username}
    password: {password}
    target: event_profile_id
    skip_invalid_records: true


Using Basic Auth
timezone: UTC

_export:
  td:
    database: sample_datasets

+td-result-into-target:
  td>: queries/sample.sql
  result_connection: your_connections_name
  result_settings:
    login_url: https://{example}.zendesk.com
    auth_method: basic
    username: {username}
    password: {password}
    target: event_user_id
    skip_invalid_records: true





  • No labels