Home » Use Cases

Send Booking Confirmations

WhatsApp use case - Send Booking Confirmations - high-level overview

If you’re wondering how to deliver a better experience to your customers, giving them the opportunity to receive important notifications through their preferred communication channel is one of the options.

WhatsApp is the channel of choice for 1,6 billion users from 180 countries, enabling global reach over a single channel anytime, anywhere. Make your customers happy when booking a flight or accommodation, provide instant feedback, and send them their booking confirmation with details on the app they love and trust.

INFO

To start communicating with your customers over WhatsApp, you must receive and store their opt-ins.

Process Workflow

WhatsApp use case - Send Booking Confirmations - process workflow

Implementation Steps

The booking confirmation notification is already approved by WhatsApp, as shown in the table below. Bear in mind that this specific template can be reused for different passengers by editing the values in the placeholders.

INFO

For template registration, you need to provide the template name, notification content, and language info, after which Infobip sends the template to WhatsApp for approval. Once registered with the WhatsApp platform, templates for your account get a unique template namespace.

Template name

Content

Language

Template namespace

Approved

booking_confirmation 

Dear {{1}}, your flight booking is confirmed.

Passenger Names: {{2}}

Onward Flight Details:

Airlines PNR: {{3}}

Sector: {{4}}

Departure Date: {{5}} Departure Time: {{6}} Departure Terminal: {{7}}

Arrival Date: {{8}} Arrival Time: {{9}} Arrival Terminal: {{10}}

en

whatsapp_templatenamespace

 

Steps over API

To send this notification to a specific passenger using the WhatsApp API, follow the steps described below.

1. Log in to dev.infobip.com and copy your BASE URL. E.g. Your personal base URL is: https://{{BASE_URL}}.api.infobip.com/

NOTE

The personal BASE URL is a simple way to identify who sent out the API request. This means we can identify the request through DNS and then find the optimal route for API requests.

2. Send an approved Message Template using the following steps:

  1. Choose the POST method
  2. Replace the endpoint with https://{{BASE_URL}}.api.infobip.com/omni/1/advanced
  3. Add the Authorization header, e.g. Basic: Base64 encoded username and password (more about Authorization methods on our API developer hub)
  4. Copy the scenarioKey you previously created

In case you have not created your scenario yet, check Creating scenario.

Request example:

{
   "scenarioKey":"CC9F01A5DC7BEE2C2B829D203482A654",
   "destinations":[
      {
         "to":{
            "phoneNumber":"41793026727"
         }
      }
   ],
   "whatsApp":{
      "templateName":"booking_confirmation",
      "templateNamespace":"whatsapp_templatenamespace",
      "templateData":[
         "Dana","Dana Scully","L5W5NW","7","May 31st","10.30 PM","2","June 1st", "7.20 AM","2"
      ],
      "language":"en"
   }
}

Template name, template namespace, template data, and language are mandatory in order to successfully send the notification. 

Template data should contain the same number of elements as placeholders in the registered template. In case the template does not contain any placeholders, templateData field should be an empty array “[ ]”.

PRO TIP

You can use our Flow to set a failover option for your WhatsApp notifications. In case a WhatsApp message cannot be delivered for some reason (e.g. mobile device does not have Internet connection), use the validityPeriod field to specify a period after which an SMS will be sent and to make sure the passenger receives the information in time.


Related Products

Communicate with your customers over the world’s most used Chat app