Create a new Zendesk Support ticket.
Here is an example of a simple ticket creation flow that first asks the
user for their name, email, and phone number, and then creates a ticket:
triggers:
- keyword: zendesk_support_ticket_create
when: true
steps:
- ask: Link user?
buttons:
- text: Yes
result: true
- text: No
result: false
- flow_set: link_user
- if: (@ flow.link_user )
then:
jump: link_ticket
else:
next:
- flow_set:
link_ticket: false
- jump: name
- (link_ticket)
- ask: Link ticket?
buttons:
- text: Yes
result: true
- text: No
result: false
- flow_set: link_ticket
- (name)
# Start "prechat" mode to collect sensitive details, all user responses will be encrypted
- mode: prechat
- say: Name?
- type: text_input
required: true
label: Name
icon: (@ config.icon.person )
quick_replies:
- text: Skip (generate)
result:
- flow_set: name
- say: Email?
- type: email_address_input
required: true
quick_replies:
- text: Skip (blank)
result:
- flow_set: email
- say: Phone?
- type: text_input
required: true
label: Phone
icon: (@ config.icon.phone )
quick_replies:
- text: Skip (blank)
result:
- flow_set: phone
- say: Subject?
- type: text_input
required: true
label: Ticket subject
quick_replies:
- text: Skip (generate)
result:
- flow_set: subject
- say: Comment?
- type: text_input
required: true
label: Ticket comment
quick_replies:
- text: Skip (use transcript)
result:
- flow_set: comment
# Done "prechat" mode
- mode:
- (create)
- note: This is a note before ticket creation
- say: Creating or updating user...
- type: meya.zendesk.support.component.user.create_or_update
integration: integration.zendesk.support
link: (@ flow.link_user )
name: (@ flow.name )
email: (@ flow.email )
phone: (@ flow.phone )
- say: User (@ flow.result.id ) created or updated
- say: Creating ticket...
- type: meya.zendesk.support.component.ticket.create
integration: integration.zendesk.support
link: (@ flow.link_ticket )
requester_id: (@ flow.result.id )
subject: (@ flow.subject )
comment: (@ flow.comment )
ticket_form_id: (@ vault.zendesk.support.ticket_form_id )
brand_id: (@ vault.zendesk.support.brand_id )
- say: Ticket (@ flow.result.id ) created
- note: This is a note after ticket creation
- end
Element details
type: meya.zendesk.support.component.ticket.create
class: ZendeskSupportTicketCreateComponent
path: /meya/zendesk/support/component/ticket/create.py
signature: -
Fields
field | description | required | signature | default | type |
---|---|---|---|---|---|
spec | Override the original spec for this element. | ○ | ○ | null | Spec |
integration | The reference path to the Zendesk Support integration file. See the integration reference paths documentation for more information. | ◉ | ○ | ZendeskSupportIntegrationRef | |
requester_id | The user who requested this ticket. | ○ | ○ | null | int |
subject | The value of the subject field for this ticket. | ○ | ○ | null | str |
comment | Add a comment to the ticket. | ○ | ○ | null | str |
comment_attachments | A list of file URLs to attach to the comment. These fileswill be downloaded from the source and then uploaded to Zendesk to ensure they are secured by Zendesk's security policies and user access rights. Be careful not to attach too many large files that take long to download and upload, as this could exceed the component timeout and cause the component to fail. If any file fails to download or upload, the component will log the exception in your app's logs. The file size limit is 50MB per attachment. There is a 10s timeout per file download and a 10s timeout per file upload. | ○ | ○ | null | list |
comment_public | Controls whether the ticket is public or not. | ○ | ○ | null | bool |
tags | An array of tags to add to the ticket. | ○ | ○ | null | list |
custom_fields | An array of the custom field objects consisting of IDs and values. | ○ | ○ | null | list |
ticket_type | The type of this ticket. Allowed values are problem , incident , question , or task . | ○ | ○ | null | str |
status | The state of the ticket. Allowed values are new , open , pending , hold , solved , or closed . | ○ | ○ | null | ZendeskSupportTicketStatus |
priority | The urgency with which the ticket should be addressed. Allowed values are urgent , high , normal , or low . | ○ | ○ | null | str |
assignee_id | The agent currently assigned to the ticket. | ○ | ○ | null | int |
group_id | ○ | ○ | null | int | |
external_id | An ID you can use to link Zendesk Support tickets to local records. | ○ | ○ | null | str |
ticket_form_id | The ID of the ticket form to render for the ticket. | ○ | ○ | null | int |
brand_id | The ID of the brand this ticket is associated with. | ○ | ○ | null | int |
context | Send context data with this component's event. | ○ | ○ | {} | dict |
sensitive | ○ | ○ | true | bool | |
triggers | Activate these dynamic triggers when the component runs. Check the component triggers guide for more info. | ○ | ○ | [] | list |
link | Whether to link the ticket to the current Meya thread. This will use the Zendesk ticket ID returned from the API response as the integration thread ID for Meya to link to. If the external_id is not set explicitly in this component, then the Meya thread ID will be used as the external ID on the Zendesk ticket for reference. | ○ | ○ | true | bool |
followup | Whether this new ticket is a followup to an existing ticket that was previously created and linked to the current Meya thread. If the previous ticket ID can be resolved from the current Meya thread, then the old ticket will be marked as Closed and it's ticket ID will be used as the via_followup_source_id on the new ticket. | ○ | ○ | true | bool |
via_followup_source_id | The ID of the ticket that this new ticket is a followup to. Note, this value will be overridden if the followup field is set to True and a previous ticket ID can be resolved from the current Meya thread. | ○ | ○ | null | int |
Usage reference
Basic
triggers:
- keyword: meya.zendesk.support.component.ticket.create
steps:
- type: meya.zendesk.support.component.ticket.create
integration: integration.zendesk_support
Full
triggers:
- keyword: meya.zendesk.support.component.ticket.create
steps:
- type: meya.zendesk.support.component.ticket.create
spec:
type: STRING
data:
STRING: ANY
timeout: 123
trigger_when: ANY
integration: integration.zendesk_support
requester_id: 123
subject: STRING
comment: STRING
comment_attachments:
- STRING
comment_public: false
tags:
- STRING
custom_fields:
- id: 123
value: ANY
ticket_type: STRING
status: new|open|pending|hold|solved|closed
priority: STRING
assignee_id: 123
group_id: 123
external_id: STRING
ticket_form_id: 123
brand_id: 123
context:
STRING: ANY
sensitive: false
triggers:
- type: STRING
data:
STRING: ANY
timeout: 123
trigger_when: ANY
link: false
followup: false
via_followup_source_id: 123