Zendesk · Arazzo Workflow

Zendesk Create User and Open Ticket

Version 1.0.0

Create an end user, then open a support ticket with that user as the requester.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub ChatCRMHelp CenterSellSupportT1TalkTicketingTicketsArazzoWorkflows

Provider

zendesk

Workflows

create-user-and-ticket
Create an end user and open a ticket requested by that user.
Creates a Zendesk end user and then opens a new ticket that names the freshly created user as the requester, returning both the user id and the ticket id.
2 steps inputs: commentBody, email, name, priority, subject outputs: ticketId, userId
1
createUser
CreateUser
Create the end user from the supplied name and email.
2
createTicket
CreateTicket
Open a ticket with the new user as the requester.

Source API Descriptions

Arazzo Workflow Specification

zendesk-create-user-and-ticket-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Zendesk Create User and Open Ticket
  summary: Create an end user, then open a support ticket with that user as the requester.
  description: >-
    A foundational Zendesk Support intake pattern. The workflow first creates an
    end user from the supplied name and email, captures the new user id, and then
    opens a ticket with that user set as the requester. Both Zendesk request
    bodies are spelled out inline using the documented {user:{...}} and
    {ticket:{...}} envelopes so the flow can be executed without opening the
    underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: usersApi
  url: ../openapi/users-openapi-original.yml
  type: openapi
- name: ticketsApi
  url: ../openapi/tickets-openapi-original.yml
  type: openapi
workflows:
- workflowId: create-user-and-ticket
  summary: Create an end user and open a ticket requested by that user.
  description: >-
    Creates a Zendesk end user and then opens a new ticket that names the
    freshly created user as the requester, returning both the user id and the
    ticket id.
  inputs:
    type: object
    required:
    - name
    - email
    - subject
    - commentBody
    properties:
      name:
        type: string
        description: The full name of the end user to create.
      email:
        type: string
        description: The email address of the end user to create.
      subject:
        type: string
        description: The subject line of the new ticket.
      commentBody:
        type: string
        description: The body of the first public comment on the ticket.
      priority:
        type: string
        description: Optional ticket priority (urgent, high, normal, low).
  steps:
  - stepId: createUser
    description: Create the end user from the supplied name and email.
    operationId: CreateUser
    requestBody:
      contentType: application/json
      payload:
        user:
          name: $inputs.name
          email: $inputs.email
          role: end-user
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      userId: $response.body#/user/id
  - stepId: createTicket
    description: Open a ticket with the new user as the requester.
    operationId: CreateTicket
    requestBody:
      contentType: application/json
      payload:
        ticket:
          subject: $inputs.subject
          comment:
            body: $inputs.commentBody
            public: true
          requester_id: $steps.createUser.outputs.userId
          priority: $inputs.priority
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      ticketId: $response.body#/ticket/id
      ticketStatus: $response.body#/ticket/status
  outputs:
    userId: $steps.createUser.outputs.userId
    ticketId: $steps.createTicket.outputs.ticketId