This tutorial explains how to set up a Facebook Help Desk for New Connection Request Journey (for Abc Broadband, as an example) using Zendesk Custom Integration. Following is the simple explanation of the journey:
- Customer visits ABC Broadband.
- Clicks Get Started and New Connection Request
- Automated Help Desk the required details such as Account Name, Email ID, and Phone Number.
- Help Desk creates a Ticket on Zendesk and informs the customer
There are a set of preliminary steps that you need to complete before you begin this tutorial. Check them by clicking the below button:
Flow Set Up
Step 1 - Create Variables
Create the following variables under Session Data by clicking the Settings icon on the top right corner.
A session data variable allows temporary storage of data during each execution of a flow. We will need these variables to be available through out the customer journey.
Step 2 - Set the Session Key
Set the Session Key to facebook.psid under Settings available on the top right corner. This is a one-time configuration for this flow. This is required to resume the flow after receiving message on the Receive Node by maintaining the Session Key.
Step 3 - Welcome Message
Add a send node and choose Facebook Channel. A sample configuration is shown below:
Note: $(facebook.name) will be dyanamically replaced with the name of the customer during flow execution.
Step 4 - Get Customer Details
Add another Send Node to collect Customer Account Name. A Delay Node before this Send Node is optional.
Step 5 - Receive Customer Details
Add a Receive Node to receive the Customer Account Name details. A sample configuration is show below:
Store the customer response under the Session Data tab of the Receive Node On-Leave event to be used later in the variable account_name
Note: The message that the Receive Node receives is stored under the variable sysResponseMessage
Step 6 - Get Email ID
Add a send node to send a message to get Email ID of the customer. Similar to Step 4
Step 7 - Receive Email ID
Add a Receive Node to receive customer Email ID. Similar to Step 5. Store the customer response in email_id variable to be used later.
Step 8 - Get Phone No.
Add a send node to send a message to get Phone No. of the customer. Similar to Step 4
Step 9 - Receive Phone No.
Add a Receive Node to receive customer Phone No. Similar to Step 5. Store the customer response in phone_no variable to be used later.
Step 10 - Create a Ticket on Zendesk - Custom Node Configuration
Add the Custom Integration Node called TicketStatus (created as part of Preliminary Set Up).
- Set the Method Name to "Create Ticket.
- Content-Type is auto-populated as the value was already provided in the Custom Node configuration while creating the Integration under Header Section.
- Provide the Ticket Comment details as follows:
- "Details for Connection: Name - $(account_name), Email - $(email_id), Phone - $(phone_no)". All of the variables are configured in the Receive Node - On Leave event and hold the customer responses. They will be replaced dynamically during flow execution.
- Under the Response Tab, assign the ticket_id generated by the API to a variable called id_ticket_cust to communicate the information to customer.
Step 11 - Send Confirmation to Customer
Add a Send Node to send the confirmation to the customer and end the flow.A Sample is shown below:
Step 12 - Handle Errors/Timeouts/Invalid Choices
It is a good practice to handle all the Errors/Timeouts/Invalid Choices. You can end the flow on all of the above. Here is an example on how to handle it. Add a Send Node to inform the customer that something went wrong and connect all the Error/Timeouts/Invalid Choices edges to this node. End the flow on this Send Node. End the flow on Error edge of this flow. A sample is shown below:
Rule to activate the flow
Publish the flow before creating a Rule.
- Create a Rule to invoke the flow.
- Set the Event to Postback
- Set the Condition to facebook-postback.payload EQUALS new_connection. new_connection is the payload set for the Persistent Menu corresponding to New Connection Request
- Invoke the flow when the above Event and Conditions are met.
Note: While setting the Rule to Active State, ensure that the Start Time is in UK timezone as the servers are in UK timezone.
For more details on how to set up a Rule, refer here. A sample is shown below:
A sample Journey is shown below :