zendesk.support

type: meya.zendesk.support.integration
class: ZendeskSupportIntegration
path: /meya/zendesk/support/integration/integration.py
signature: -

Install instructions

API token

https://SUBDOMAIN.zendesk.com/agent/admin/api/settings

  • Log in with the bot agent email
  • Create the bot agent API token

HTTP target

https://SUBDOMAIN.zendesk.com/agent/admin/extensions

  • Create a new HTTP target (note the name for the Trigger step below)
  • Use your webhook URL. (Found via meya webhooks command)
  • Method POST
  • Username "meya"
  • Generate and use your own target password
  • Test target using JSON body: {"test": "RANDOM_STRING"}
  • You should receive a 200 response and "message": "Zendesk Support HTTP target success!"
  • Note: for subsequent tests change the value of RANDOM_STRING to avoid cached responses
  • If successful, create the target

Trigger

https://SUBDOMAIN.zendesk.com/agent/admin/triggers

  • Create a new Trigger
  • Add two "ANY" conditions: "Ticket is Created" and "Ticket
    is Updated"
  • Add an Action "Notify target" pointing to your new HTTP target

Use this JSON body:

{
    "ticket_id": "{{ticket.id}}",
    "updated_at": "{{ticket.updated_at_with_timestamp}}",
    "current_user_id": "{{current_user.id}}"
}

Fields

field

signature

required

type

default

description               

spec

ForwardRef('Spec')

null

Override the original spec for this element

enabled

bool

true

Enables the integration, allowing it to process events and HTTP entries

filter

ZendeskSupportIntegrationFilter

rx_sub: true
rx: true
tx: "\nmeya.event.entry.interactive\nOR meya.csp.event\nOR meya.button.event.click\n
OR meya.form.event.submit\n"
tx_pub: true
rx_unhandled_ticket: false

This allows you to specify any valid GridQL query to filter incoming requests/events and outgoing requests/events.

verify_token

str

null

max_attachment_size

int

null

Controls maximum attachment size supported by the integration in bytes

markdown

list
bool

false

typing

bool

true

When set to 'False', all typing indicators received by the integration will be ignored.

avatar

CspIntegrationAvatar

crop: circle

agent_command_prefix

str

"/"

transcript

CspIntegrationTranscript

count: 25
user_prefix: user
bot_prefix: bot
agent_prefix: agent
note_prefix: 📝

agent

AgentSpec

name:
avatar:

subdomain

str

The subdomain of your Zendesk instance. You'll find this in the actual URL of your Zendesk instance e.g. https://subdomain.zendesk.com/

bot_agent_email

str

The email address of the Zendesk user you created to represent the bot agent. All API calls the integration makes will use this user's Zendesk API token.

bot_agent_api_token

str

The API token of the user you created to represent the bot agent.

target_password

str

The target password you generated. This is used by the integration to authenticate incoming Zendesk Support webhooks.

auto_reopen_ticket

bool
ThreadMode

"agent"

This automatically reopens the linked ticket, if the ticket is in either the 'pending', 'hold' or 'solved' state, and the user sends a new event e.g. a say event or an image event. This setting can either be 'True/False' or it can be a specific thread mode, so when the thread enters this mode and the user sends a new event, then the linked ticket will be reopened.

unlink_ticket_status

list

["closed"]

The set of Zendesk Support ticket statuses that will unlink the Meya thread from the ticket. When the Meya thread is unlinked, then the integration will no longer send events to Zendesk Support.

extract_html_links

bool

true

This will cause the integration to parse out any hyperlinks in an incoming ticket comment, and convert it to a markdown link that can be rendered by messaging integrations such as Orb or Zendesk Sunshine Conversations.

include_text_with_media

bool

false

When set to 'True' the integration will create a Meya media event and use the ticket's comment as the media event's text when the comment has an attachment. When set to 'False' the comment text will appear as a separate Meya say event. This setting is only applicable for ticket comments that have an attachment e.g. an image or a file.

upload_attachments

bool

true

When set to 'True' the integration will upload all Meya media event files to your Zendesk Support instance instead of keeping it on the Meya CDN.

api_timeout

Real

5

The time, in seconds, to wait for a response from the Zendesk Support API.

Examples

Basic

type: meya.zendesk.support.integration
subdomain: STRING
bot_agent_email: STRING
bot_agent_api_token: STRING
target_password: STRING

Full

type: meya.zendesk.support.integration
spec: '?'
enabled: false
filter:
  rx_sub: STRING
  rx: STRING
  tx: STRING
  tx_pub: STRING
  rx_unhandled_ticket: STRING
verify_token: STRING
max_attachment_size: 123
markdown:
  - format|linkify|breaks|typographer
typing: false
avatar:
  crop: circle|square
agent_command_prefix: STRING
transcript:
  count: 123
  user_prefix: STRING
  bot_prefix: STRING
  agent_prefix: STRING
  note_prefix: STRING
agent:
  name: full|first|first_initial|first_last_initial|first_initial_last_initial
  avatar:
    image: STRING
    crop: circle|square
    monogram: full|first|first_initial|first_last_initial|first_initial_last_initial
subdomain: STRING
bot_agent_email: STRING
bot_agent_api_token: STRING
target_password: STRING
auto_reopen_ticket: STRING
unlink_ticket_status:
  - new|open|pending|hold|solved|closed
extract_html_links: false
include_text_with_media: false
upload_attachments: false
api_timeout: 123