# Oracle Digital Assistant messaging

WhatsApp

This guide explains how to integrate Oracle Digital Assistant with the Infobip platform using [WhatsApp](https://www.infobip.com/docs/whatsapp) as a channel.

Oracle Digital Assistant allows you to interact with your users using digital assistants. When you integrate Oracle Digital Assistant and Infobip, you can use WhatsApp messages to improve the effectiveness and flexibility of digital assistants.

## What you will need

- Infobip account. If you don't have an account, you can [create one](https://www.infobip.com/signup).
- WhatsApp sender
- Oracle Digital Assistant account
- Oracle Cloud tenant

Once you have your Infobip account and have verified your phone number, you're automatically assigned a testing WhatsApp sender. Go to [Channels and Numbers](https://portal.infobip.com/apps/) > **WhatsApp** to view your senders.

When you've finished testing and you want to use dedicated senders, you can [request a verified WhatsApp sender](https://www.infobip.com/docs/whatsapp/get-started/embedded-signup) directly from the Infobip web interface.

## Features

- Inbound and outbound text messages
- Outbound text messages with postback actions
- Inbound and outbound media messages (image, audio, video, file)
- Inbound location messages
- Outbound cards with supported actions: postback, call, URL

## Installation and configuration

To connect your Infobip account with Oracle Digital Assistant, you need to set up the WhatsApp sender and to set up the channel in Oracle Digital Assistant.

### Infobip Sender Setup [#infobip-sender-setup-installation-and-configuration]

To set up the sender, share the following information with the Infobip support team:

1. Verified **WhatsApp number**.
2. Valid [API Key](https://portal.infobip.com/dev/api-keys)
3. **Channel Webhook URL** and **Secret Key** provided by Oracle. Use s-pass.app for sharing secrets.

### Oracle Digital Assistant channel setup [#oracle-digital-assistant-channel-setup-installation-and-configuration]

To connect a WhatsApp number with Oracle Digital Assistant, in the Oracle Digital Assistant account, go to **Development > Channels**.

In the **Outgoing Webhook URI** text box, insert the following link:

[https://oracledigitalassistant.ibintegrations.com/oracle/digital-assistant](https://oracledigitalassistant.ibintegrations.com/oracle/digital-assistant)

### Test Integration with Free Trial WhatsApp Sender [#test-integration-with-free-trial-whatsapp-sender-installation-and-configuration]

When you have set up your account, you can test the integration with a Free Trial sender using the following steps:

1. In the Infobip web interface, go to **Channels and Numbers > WhatsApp**.
2. On the **Senders** tab, click **Actions > Edit Configuration**.
3. On the **Edit Configuration** page, you'll see a keyword has been created for your account. Send this keyword to the WhatsApp sender. You will receive a confirmation message that this phone number has been successfully connected to this WhatsApp sender.
4. After you receive the confirmation message, you can start a conversation to test out the functionality.

## Supported message types with Infobip WhatsApp

The following table shows the supported Oracle Digital Assistant message types and the associated Infobip WhatsApp message attributes.

| ODA Message Type | Infobip WhatsApp | Message Example |
| --- | --- | --- |
| Text | ✅ |  |
| Images | ✅ only hosted imagesSupported URL extensions: jpg, jpeg, png |  |
| Files | ✅ only hosted filesSupported audio URL extensions: aac, m4a, amr, oggSupported video URL extensions: mp4, 3gppSupported document URL extensions: pdf, doc, docx, ppt, pptx, xls, xlsx |  |
| Emojis | ✅ |  |
| Location | Inbound Only |  |
| Links | ✅ |  |
| Postbacks | ✅1-3 postbacks → interactive buttons message3-10 postbacks → interactive list message> 10 postbacks → text messageMaximum length of button/interactive list message text = 20. | Example of message containing 5 postbacks |
| Carousel | ✅Horizontal and vertical card messages are split to more WhatsApp messages depending on number of card messages. | Example of card message (same approach is being used in both horizontal and vertical card messages)First message - header textSecond message - card message with URL, phone number and button postbackThird message - card message with URL, phone number and button postback |

## Creating Oracle Skills

Oracle Skills lets you apply tasks or skills to individual digital assistants. Skills are chatbots that interact with users to perform certain tasks and you can create a skill to use WhatsApp messages.

### ODA message response types [#oda-message-response-types-creating-oracle-skills]

Oracle Digital Assistant supports three message types:

- text
- card
- attachment

Both the text and card response types can have associated actions. Any of the response types can also include global actions.

### Action types [#action-types-creating-oracle-skills]

Associated actions or global actions can receive four action types:

1. postback
2. call
3. url
4. location

For the action types:

- call, url, and location action types are represented as a plain text
- postback actions are represented as buttons, lists, or plain text, depending on the number of postback actions. See [**Postback Actions**](https://www.infobip.com/docs/oracle-digital-assistant#postback-actions-creating-oracle-skills) for more information.

### Attachment messages [#attachment-messages-creating-oracle-skills]

Based on the ODA attachment URL, WhatsApp document, image, audio, and video messages are supported.

The following table shows a list of the supported extensions for attachments.

| WhatsApp Message Type | Attachment Extensions |
| --- | --- |
| document | pdf, doc, docx, ppt, pptx, xls, xlsx |
| image | jpg, jpeg, png |
| audio | aac, m4a, amr, ogg |
| video | mp4, 3gpp |

The URL of an attachment must be a valid URL, starting with `https://` or `http://`

Attachment extensions are extracted from the attachment URL.

 Note
If the extracted extension does not include a supported extension from the table, then the attachment URL is sent as a text in a WhatsApp TEXT message (for example, this [https://www.youtube.com/some-video](https://www.youtube.com/some-video) will be sent as a link). If the attachment URL is a download URL of the current attachment, the message won’t be delivered because Infobip interprets it as an invalid request (for example, [https://cdn.pixabay.com/photo/2022/01/06/22/30/new-year-6920394_960_720.jpg](https://cdn.pixabay.com/photo/2022/01/06/22/30/new-year-6920394_960_720.jpg)).

### Postback actions [#postback-actions-creating-oracle-skills]

Postback actions are converted to the message types described in the following table.

| Number of postback actions | WhatsApp message type |
| --- | --- |
| 1-3 postbacks | WhatsApp BUTTON message |
| 3-10 postbacks | WhatsApp LIST message |
| >10 postbacks | WhatsApp TEXT message |

 Note
When there are more than 10 postback actions, their labels are converted to the WhatsApp TEXT message. To select a particular option, the end user must return a postback label exactly the same as listed in the message received.

 Warning
Buttons do not support the markdown characters (\* and _). More than one occurrence in the button text can lead to an unexpected error and the message not being delivered to the end user. As a solution, you can replace those characters with the ones that are most suitable for your use case (that is, change \* → •). ODA card messages with predefined postback actions and image URLs supports a maximum of three postback actions represented as a buttons.

### Guidelines for emojis [#guidelines-for-emojis-creating-oracle-skills]

In Skills, Unicode (for example, `U+1F44D`), HTML entity (for example, `👍`) and other representations of emojis are not supported and will be represented as plain text.

As a solution, copying and pasting the emojis in your skill will work as expected in both TEXT, BUTTON, and LIST messages.

### Unsupported WhatsApp messages [#unsupported-whatsapp-messages-creating-oracle-skills]

Currently, CONTACT and POLL WhatsApp messages are not supported and can not be transformed to the ODA message format.

CONTACT messages can be included, depending on the customer use case.