💳 Card Delivery

For this use case, we will provide clear instructions and insights into:

  • Notify Customers with Card status: Make sure to proactively notify your customers when their card is ready for delivery
  • Schedule Card Delivery: Implement a chatbot to help schedule the best appointment for customers to receive their card.

Prerequisites

Before getting started make sure you have your WhatsApp template created to start with the building journey - For more information on creating WhatsApp templates visit this link

  1. You will need to create a card delivery template to notify your customers their card is ready for delivery and check when they would like to receive it
  2. Include a"Quick Reply" button; Schedule Now!

Step One: Card Delivery Notification Flow

After the required WhatsApp templates are created, you can now start building your Card delivery flow:

  1. Go to Flow Studio and click Create New Flow
  2. Select Webhook as an entry point
  3. Select the Webhook trigger inside the Flow Studio Canvas:
    1. In the Variables section of the Webhook trigger properties, add the variables that will be sent from the external system via API. Any variable is supported and one variable will be required which is the phone number.
    2. For each variable define its path; The Path of the variable is based on the payload that is received and it is dot (.) separated in case it is a nested JSON object
  4. Add a WhatsApp Message trigger and click on it to configure its parameters:
    1. Choose your Application ID
    2. In Destination Number type brackets ” {{ “, then it will show all the variables of the flow, and select the one that carries the phone number as defined in step 3
    3. Choose your Message Template; in this example it's card delivery
    4. Set your Message Variables based on the variables defined in the template for which the values are retrieved in step 3 (e.g customer name, card type, card status)
    5. Click Save
  5. Click Save Draft and then Publish the flow

Step Two: Scheduling journey setup on the Chatbot:

  1. Go to Chatbot in the left side navigation and click Create New Chatbot
  2. Define your "Chatbot Name" and choose your Channel "WhatsApp", then click Create
  3. As the first element use the Branch widget then click on the created "Branch" element and:
    1. Define the condition and use the variable lastTextMessageReceived to capture text from Buttons coming from the WhatsApp template
    2. Set the value of lastTextMessageReceived to the button name you've set in your WhatsApp template; in this example, it's Schedule Now!
  4. Now after the Branch add a Collect input widget based on the use case and select the validation as custom where you can define different regex validations. Name variable date
  5. Add a Collect input widget based on the use case and select the validation as custom where you can define different regex validations. Name variable time
  6. Optionally you can add a Button widget at the end of the Branch if you want the user to confirm his input, for example, Confirm _or _Start Again. Define the _Name _and _Payload _of each button.
    1. Define the variable that you will use to navigate the user to the relevant branch based on his selection (e.g Add buttonPayload as a variable name in Save Button payload in this variable - This will save the button payload in the defined variable)
    2. Then add another Branch and complete as in step 3 to create two branches one for the Confirm _pathway and another for the _Start Again pathway
  7. If you need to send the collected information to your system, you can use the Service Call widget, which allows you to integrate with any external system that you are using, with REST or XML approach. For more information, you can check here. Let's say information is saved to the variable: status
  8. After Service Call use Send message and write content as needed and use variable status in order to print out value from your system to customers.
    Note: in case number validation is needed, a Javascript code can be added with custom validation.
  9. You can now Test this bot then be ready to Deploy🎉