Checking a ticket status

Knowledge Level: Advanced

In this tutorial, we will setup a flow to inquire the status of our ticket and present the information as a webhook response.

To set this up , we need the following:

  • A new scenario in Make(formerly Integromat) with a webhook
  • In the bot platform, a message to receive the ticket id, save ticket id to attribute and pass it onto a webhook

Setting up the scenario

Our final Make(formerly Integromat) scenario will look as follows:

1284

In the 'custom webhook' module, we will receive the ticket id which is being inquired.

In the example below, the ticket id can be seen in the attribute $ticketnumber:

503

Next, in the Google Sheet 'Search Rows' module, we will filter our inquiries using the 'Ticket ID' header in our Google Sheet and in the incoming $ticketnumber variable.

We also limit the number of search results to one as we only need the information for a specific ticket:

507

In the last step, we will setup a Webhook response module in the flow sending the inquirerd ticket information back to the user via our bot. Use the following code to paste in this module:

{
  "recipient": {
    "id": "{{1.fbuser.fbid}}"
  },
  "message": {
    "text": "Hello {{1.fbuser.first_name}},\n Your ticket ID:{{1.fbuser.state.vars.`$ticketnumber`}}'s status is currently: {{3.`2`}}.\n Here's the feedback from the support team: {{3.`5`}}"
  }
}

Note: Replace the variables based on your use case.

507

After setting up the flow, if there is a ticket found with the ticket id submitted by the user, they should receive the following response from the bot:

874