Synchronize ServiceNow Incidents and Attachments with Zendesk

This use case describes how to use the Zendesk Adapter to synchronize a ServiceNow incident and attachments with Zendesk. The details of the incident are added as a ticket in Zendesk, along with the attachments. This implementation pattern provides an overview of the steps.

  1. Create an app-driven orchestrated integration.
  2. Drag a ServiceNow Adapter into the integration canvas and configure it as follows:
    1. On the Basic info page, provide an endpoint name, and click Next.
    2. On the Applications page, select the Incident application, the Incident module, and click Next.
    3. On the Fields page, select the required fields, and click Next.
    4. On the Conditions Page, select Created, and click Next.
    5. On the Response page, click Next.
    6. On the Summary page, review your selections, and click Done.
  3. Drag an assign action into the integration canvas and create three variables:
    • Flag variable to check whether the loop is completed or not:
      $flag="false"
    • Link variable to store the next page's value:
      $link=""
    • Token variable to store the attachment token:
      $token=""
  4. Drag a while action into the integration canvas and specify the following condition:
    $flag !="true"
  5. Drag a ServiceNow Adapter into the integration canvas and configure it as follows:
    1. On the Basic Info page, provide an endpoint name, and click Next.
    2. On the Action page, select Attachment Information.
    3. On the Operations page, select the Retrieve attachment /s metadata of a record /s operation, the Multiple Attachments Metadata option, and click Next.
    4. Review your selections on the Summary page.
  6. Drag a for-each action into the integration canvas and assign result as the repeating element.
  7. Drag a ServiceNow Adapter into the integration canvas and configure it as follows:
    1. On the Basic Info page, provide an endpoint name, and click Next.
    2. On the Action page, select Attachment Information.
    3. On the Operations page, select the Download attachment of a specific record from the module/table operation, and click Next.
    4. Review your selections on the Summary page.
  8. Perform the required mapping.
  9. Drag a Zendesk Adapter connection into the integration canvas and configure the endpoint.
    1. On the Basic Info page, provide an endpoint name, and click Next.
    2. On the Action page, select Create, update or delete Information.
    3. On the Operations page, select the Tickets module, the Upload Attachment operation, and click Next.
    4. Review your selections on the Summary page.
  10. Drag an assign action into the integration canvas and assign a value to the token parameter as follows:
    $token=token
  11. Drag a switch action into the integration canvas to check whether or not link and Pagination Object contain data.
    link !=0.0
    count( PaginationObject) !=0.0
    
    1. If the condition statement evaluates to true, assign the link and flag variables as follows:
      $link=link
      $flag="false"
    2. If the condition statement evaluates to false, assign the flag variable as follows:
      $flag="true"
  12. Drag a Zendesk Adapter connection into the integration canvas and configure the endpoint.
    1. On the Basic Info page, provide an endpoint name, and click Next.
    2. On the Action page, select Create, update or delete Information.
    3. On the Operations page, select the Tickets module, the Create Ticket operation, and click Next.
    4. Review your selections on the Summary page.
  13. Perform the required mapping.
  14. When complete, save and activate the integration.