Infobip Documentation
Home » Use Cases

Share Boarding Passes

WhatsApp use case - Share Boarding Passes high-level overview

During the online check-in, end users can easily select their preferred channel to recieve boarding pass on. By implementing this use case, you can use WhatsApp as one of the ways you communicate with your end users.

This approach offers a great customer experience by providing end users with information over their preferred channel while reducing the carbon footprint. Thanks to end-to-end encryption, sharing boarding passes is absolutely safe. 

Keep in mind, however, that to start communicating with your customers over WhatsApp, you must receive and store their opt-ins. 

This use case will show you how to send a WhatsApp media message template with a boarding pass as an image over Infobip API.

Process Workflow

WhatsApp use case - Share Boarding Passes process workflow

IMPLEMENTATION STEPS

Before sending your boarding pass template, the template needs to be approved by WhatsApp.

Once you create your invoice media message template, you can reuse it, personalize it for different passengers, as well as attaching the appropriate boarding pass for each passenger. 

NOTE

To register your template, you must provide a template name, content, and language info. After that, Infobip sends the template over to WhatsApp for approval.

You define the media in the header (image or document) and insert text information in the template body.  

Template name

Template header

Template body

Language

Approved

boarding_pass

Media - Image

Here is your boarding pass for flight number {{1}}. Thank you for flying with us ✈️

en

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

1. Log in to the Infobip API Developer Hub

2. Use 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 the API request. This means we can identify the request through DNS and then find the optimal route for API requests.

Steps over API

1. Choose the POST method.

2. Replace endpoint with https://{{BASE_URL}}.api.infobip.com/omni/1/advanced

3. Add the Authorization header

For example, Basic: Base64 encoded username and password. 

Learn more about Security and Authorization methods on the Infobip API Developer Hub. 

4. Copy the scenariokey you previously created. 

Learn more about Creating a scenario

5. Specify the destination phoneNumber you wish to send the notification to. 

6. Replace the templateNameimageUrlplaceholders, and language fields with registered ones (refer to the table above).  

The imageUrl field contains the image URL, while the placeholders in the template body are contained in placeholders field.

{
   "scenarioKey":"CC9F01A5DC7BEE2C2B829D203482A654",
   "destinations":[
      {
         "to":{
            "phoneNumber":"41793026727"
         }
      }
   ],
   "whatsApp":{
      "templateName":"boarding_pass",
              "mediaTemplateData": {
		"header": {
		  "imageUrl": "https://www.filehostserver.com/boarding_Pass_JDKA87.jpg"
           },
		"body": {
			"placeholders": ["BAW175"]
		}
	},
      "language":"en"
   }
}

If the media type in the registered template is a document instead of an image, the mediaTemplateData fields should contain information about document URL, document file name, and placeholders.

Refer to these related WhatsApp use cases for additional ideas what you can send with media message templates:


Related Products

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