Our documentation is moving! Visit developer.zendesk.com for the latest updates.

WhatsApp

More than 1.5 billion global monthly users in over 180 countries use WhatsApp to stay in touch with friends and family, anytime and anywhere. WhatsApp offers simple, secure, reliable messaging and calling, available on phones all over the world. Now open to enterprises in early access, WhatsApp is poised to be the world’s most powerful business messaging channel.

Channel overview

WhatsApp is a channel that is built fundamentally on trust, safety and privacy. One of the reasons why so many people use WhatsApp is because it’s spam and advertisement free. To this day, users have only been able to receive messages from the people they care about, and WhatsApp guarantees that their messages are secure and encrypted so nobody else can have access to their conversations.

WhatsApp API for businesses means that enterprise software can be used to message customers over WhatsApp. It can be used to respond to customer service requests, to resolve urgent customer issues, to deliver timely notifications (receipts, account updates, gate changes, confirmations, etc.), to automate responses for frequently asked questions, and it can also be integrated into a CRM system to track ticket resolution and enrich customer data.

WhatsApp has introduced a new cloud-based integration option called Cloud API that is hosted by Meta. You can now access the WhatsApp business platform through existing on-premise APIs or through the Cloud API. When using the Cloud API, software upgrades are maintained by Meta and are automatically available. A system message on the WhatsApp client shows whether the business is using the Cloud API or other options. Every WhatsApp message is protected by the same encryption protocol that secures messages, regardless of where it is hosted. Sunshine Conversations recommends that new customers interested in using WhatsApp use the Cloud API, if available. For information on setting up WhatsApp with Cloud API, see Adding WhatsApp channels to the Zendesk Agent Workspace.

Accounts

Access

WhatsApp approval is required for all businesses to enter the program. You can learn more about their commerce policy here to know if your business qualifies.

Business Profile

You can configure key business information for each number connected to WhatsApp using our Update Integration Profile API or through the WhatsApp Integration Dashboard page in the Dashboard.

  • A profile picture
  • Address of business
  • Description of business
  • Email for business contact
  • Business vertical/industry
  • Business website

The business profile is shown to end users in the contact entry corresponding to the connected phone number.

Capabilities

WhatsApp supports a wide variety of capabilities as seen in the channel capabilities grid. Below is a detailed view of each capability.

Content Types

  • Text

    Full SupportAPI
  • Image

    Full SupportAPI
  • Audio

    Full SupportAPI
  • File

    Full SupportAPI
  • Emoji

    Full SupportAPI
  • GIF

    Partial SupportAPI
  • Location

    Full SupportAPI

Action Types

  • Link

    Partial SupportAPI
  • Extension

    Partial SupportAPI
  • Postback

    Partial SupportAPI
  • Reply

    Full SupportAPI
  • Location Request

    Partial SupportAPI

Structured Messages

  • Compound Message

    Partial SupportAPI
  • Carousel

    Partial SupportAPI

Indicators

  • Read

    Full SupportAPI

Outbound Messaging

  • Notification

    Full SupportAPI

Delivery Events

Delivery events allow you to track deliveries of Sunshine Conversations messages to WhatsApp by subscribing to the conversation:message:delivery:channel webhook. Sunshine Conversations also tracks user deliveries on WhatsApp which let you confirm whether a message has reached the user by listening to the conversation:message:delivery:user webhook. Failures to deliver a message to WhatsApp or to a WhatsApp user can be detected by subscribing to the conversation:message:delivery:failure webhook.

The WhatsApp message IDs associated with each Sunshine Conversations message are available in delivery event payloads in the externalMessages property.

Audio

Audio messages are rendered with an audio player and display the caption in a separate text message. When a file is larger than 5MB or has an extension not included in the following list: .aac, .mp4, .amr, .mp3, .opus, and .ogg it will be sent as a link; otherwise it will be rendered natively in the conversation. Moreover, if an error is detected when sending an audio message, the message will instead be delivered as a text message containing a link.

Quoted Messages

WhatsApp allows users to quote a specific message in a reply.

See quoted messages for details on how this is handled.

WhatsApp Message Us Button

In order to make WhatsApp easily discoverable on your website, you can add the WhatsApp “Message Us” button plugin.

Your customers will be able to use this button to immediately start a conversation with your business on WhatsApp. When on desktop, clicking the button will bring the user to web.whatsapp.com. When using a mobile device, the WhatsApp native app will be opened on the user’s device if available, otherwise they will be taken to web.whatsapp.com.

Quick setup

WhatsApp Message Us Button

In order to render the default button, you need to include the following code snippet in the page, where you would like the button to be rendered. The snippet requires, at a minimum, your WhatsApp phone number to generate the base button.

<div class="wa-message-us" number="15551234567">
    <script src="https://cdn.smooch.io/whatsapp/message-us-btn.min.js" type="text/javascript"></script>
</div>

For more advanced customizations, you can use the custom attributes that are available.

Button Attributes

AttributesDefault valueDescription
class“wa-message-us”Required
This value must be included as it is needed to generate your custom button.
numbern/aRequired
This is your WhatsApp Business number without spaces, dashes or special characters.
label“Message Us on WhatsApp”Optional
You can customize the button label.
pre_filled_messagen/aOptional
This is the text that is prefilled in the user’s chat input when WhatsApp opens.
color“green”Optional
You can set your preferred button color. Choose between white, green and teal.
size“standard”Optional
You can set your preferred button size. Choose between compact and standard.
border_radius“4px”Optional
Set the border-radius of the button. You will need to include the unit as well, either px or %

If any of the optional attributes are omitted, the default value will be used.

All of the attributes above should be placed in the snippet as html attributes of the div:

<div
    class="wa-message-us"
    number="<YOUR_WHATSAPP_NUMBER>"
    label="<CUSTOM_BUTTON_LABEL>"
    pre_filled_message="<CUSTOM_PREFILLED_MESSAGE>"
    color="<teal | green | white>"
    size="<standard | compact>"
    border_radius="<VALUE_IN_PX_OR_%>"
>
    <script src="https://cdn.smooch.io/whatsapp/message-us-btn.min.js" type="text/javascript"></script>
</div>

Here are some examples of buttons with only changes to the color and size attributes:

StandardCompact
TealWhatsApp Message Us Button - TealWhatsApp Message Us Button - Teal Compact
GreenWhatsApp Message Us Button - GreenWhatsApp Message Us Button - Green Compact
WhiteWhatsApp Message Us Button - WhiteWhatsApp Message Us Button - White Compact

Sample snippet with all attributes

<div
    class="wa-message-us"
    number="15555555555"
    label="Contact Us"
    pre_filled_message="I need help"
    color="green"
    size="compact"
    border_radius="20px"
>
    <script src="https://cdn.smooch.io/whatsapp/message-us-btn.min.js" type="text/javascript"></script>
</div>

This snippet will generate the following button, and will pre-fill the user chat input with “I need help”:

WhatsApp Custom Button

WhatsApp Reply Button

Reply buttons allow users to quickly and easily reply using the available options. A reply button, once tapped, inserts a reply on behalf of the user. Each reply button has an associated payload which uniquely identifies the intent of the action. You can add a maximum of three buttons to your template.

You can send a reply button with the following syntax:

%[Button label here](reply:PAYLOAD_HERE)

By using the API, you can have more control over the presentation of reply buttons. For example, the following is a Dinner? button with three options or actions.

const apiInstance = new SunshineConversationsApi.MessagesApi();
const data = new SunshineConversationsApi.MessagePost();
data.author = {
    type: 'business'
};
data.content = {
    "role": "appMaker",
    "type": "text",
    "text": "Dinner?",
    "actions": [
        {
            "type": "reply",
            "text": "Tacos",
            "payload": "TACOS"
        },
        {
            "type": "reply",
            "text": "Burritos",
            "payload": "BURRITOS"
        },
        {
            "type": "reply",
            "text": "Pizza",
            "payload": "PIZZA"
        }
    ]
};
apiInstance.postMessage(appId, conversationId, data)
    .then(response => /* success */)
    .catch(error =>