OBLYTECH Logo
OBLYTECH Logo

WhatsApp Integration Through the Cloud API

ServiceNow WhatsApp integration through the Cloud API links requesters to Virtual Agent or live agents. It uses your company’s WhatsApp business phone number. Install the conversational integration and get your Meta credentials ready. Verify the webhook, create the authentication records, and tie them to a provider channel identity. Then test the conversation path.

Plan the ServiceNow WhatsApp integration around the conversation

Start with the request you want someone to finish in WhatsApp. It could be a service question, a bot conversation, or a chat with a live agent. Conversational Integration with WhatsApp (WhatsApp Cloud API) supplies the channel connection. Pick the first conversation to test. That gives the work a clear finish line beyond a successful install.

Use Brazil as the baseline for this sequence. Check the application version and the controls on your instance before you change any setup. Keep the install, the channel setup, and the behavior changes apart in your work plan. Each needs different roles.

Confirm your entitlements for Integration Hub and Conversational Integration with WhatsApp (WhatsApp Cloud API). Then set up both applications on the instance. The install also needs valid entitlements for linked Store applications. Name an owner for the Meta setup next to the ServiceNow administrator, so someone is in charge of collecting credentials.

Install the application and review its dependencies

Installing the application needs the admin role. Go to All > System Applications > All Available Applications > All. Search for Conversational Integration with WhatsApp (WhatsApp Cloud API), or its application ID, sn_va_whatsapp. If the application is not in that list, fix its availability and entitlement before you go on.

In the Application installation dialog box, look at the dependencies and their install state. Install any dependency that needs it before you install the WhatsApp application. The dependencies are Conversational Custom Chat Integration, ServiceNow IntegrationHub Runtime, Glide Virtual Agent, and Conversational Messaging. Glide Virtual Agent needs a Virtual Agent subscription.

Select Install once the dependencies are done. For a first install on a development or test instance, think about Load demo data if it is offered. Treat the sample records it makes as test material. Use your own business setup for acceptance testing.

Decide on its own whether the project needs custom integration work. Suppose the project also has custom endpoints. Then use the guide to building secure, versioned Scripted REST APIs for that part. Finish the WhatsApp channel setup before you add unrelated API work to your troubleshooting.

Prepare Meta credentials and verify the webhook

Channel setup needs external_app_install_admin or va_admin. Get the Meta developer app and the Facebook business account ready. Then collect the values the connection uses. Each value goes to a different place:

  • App Secret: get this from App Settings > Basic on the Meta application dashboard. It belongs in the inbound hash verification configuration.
  • Phone number ID: find this under WhatsApp > API Setup. Use the WhatsApp-enabled number picked in the From dropdown within Send and receive messages.
  • System user access token: create this in Meta Business Manager with the needed permissions. It is used in the Token Verification record.
  • Webhook verification secret: pick a password or secret. It must match in the ServiceNow property and in Meta’s Verify token field.

In ServiceNow, enter sys_properties.list in the navigation filter. Open sn_va_whatsapp.webhook_verify_token. Enter the chosen secret in Value, and select Save. Next, open WhatsApp > Configuration > WhatsApp Configuration in the Meta developer console.

Set the callback to your instance’s secure origin, followed by /api/sn_va_whatsapp/va_whatsapp_adapter. Enter the matching secret in Verify token. Then select Verify and save. In Webhook fields, turn on the Subscribe toggle for messages. In your notes, log the webhook check and the message subscription as two checks.

A look at API access policies, authentication, and scope can help with a wider integration security check. List each credential record of the channel in the WhatsApp setup plan. Then the security team can follow how they relate.

Create verification records and connect Message Auth

Build the credential records before you create the phone identity. Then you can pick named records and not rebuild their links later. Use clear names that tell inbound verification from outbound authorization.

  1. Enter hash_message_verification.list and select New. Give a Name and Description. Put the Meta App Secret in Secret, and select Submit. Keep the record name for the inbound link.
  2. Enter token_verification.list and select New. Give a Name and Description. Put the system user access token in Token, and select Submit. Keep this record name for the outbound link.
  3. Enter message_auth.list and select New. Give the record a Name. Enter WhatsApp in Provider. Fill in Group name and Service Portal for your setup.
  4. Set Inbound message verification to the Hash Message Verification record made for incoming messages.

Message Auth also has Outbound service token for the external service credential. Check how the records link before you select Submit. A sound check looks at what each record holds and which link points to it. Matching names alone are weak evidence that the intended credential was selected.

For help planning this work, see ServiceNow implementation.

Bind the business number to its provider channel identity

Enter sys_cs_provider.list and select VA Whatsapp Adapter Provider for the WhatsApp channel. In the Provider Channel Identity related list, select New. In Name, say who requesters are contacting, such as your IT service desk. Enter the Meta Phone number ID in Inbound ID. Then pick your Message Auth record in Message auth. Select Submit.

Open the new identity and add an entry in Provider Channel Identity Properties. Enter display_phone_number in Name. Put the real business number for the Phone Number ID in Value. Add a Description, and select Submit. Check the ID and number pairing with care. The ID and the shown number go in different fields.

For media downloads, enter sys_cs_provider.list and open VA Whatsapp Adapter Provider. Set Trusted media domains to the WhatsApp media download domain approved for this channel. Then select Update. Test attachments apart from text messages, so a media failure has its own evidence. For custom chat integrations, channel identity values override provider values. An attachment from an untrusted domain is blocked. The end user is not told that domain trust caused the upload failure.

Your work may also involve scripted outbound requests. The RESTMessageV2 and SOAP message scripting guide covers that as a separate development topic. Put custom request scripts in the first channel acceptance test only when the agreed conversation needs them.

Adjust message formatting and test the complete path

Changing provider properties needs admin. Enter sys_cs_provider.list. Select VA Whatsapp Adapter Provider in Connections, and open Provider Properties. In Custom Adapter Properties, select the property and change Value. Then select Update. If an application-scope message shows up, use its here control to allow record edits.

The time_format property takes 12 for a 12-hour clock or 24 for a 24-hour clock. Its default is 24. The date_format property takes MM/DD/YYYY, DD/MM/YYYY, or YYYY-MM-DD. Its default is DD/MM/YYYY. Pick formats that your support users will read the same way.

Run a controlled conversation from WhatsApp against the configured business number. Check that the message arrives and that the bot replies as expected. Check any live-agent path in your scope. Add a date or time reply when formatting matters. Record the result for each stage: webhook verification, inbound handling, outbound reply, identity choice, and conversation outcome.

For the handoff, keep the record names, the chosen business identity, and the agreed test scenario. Keep the name of the owner for future credential changes too. Store secret values outside the general test notes. This gives the next administrator a map of the setup. It does not turn a test report into a credential store.

When a test fails, look first at the matching setup boundary. For verification issues, check that the webhook secrets match. For inbound authentication, check the App Secret record. For outbound authorization, check the system user token record. Retest the stage that failed before you repeat the whole conversation.

Questions about extending the WhatsApp channel

Does agent-initiated messaging need another component?

The Agent-Initiated Messaging Interface, sn_agent_initiated, is optional in the install dependency list. You need it when you want agent-initiated messaging. Decide if that feature belongs in your first scope before you accept the dependency set.

What if the WhatsApp provider entry is missing?

Use sys_cs_provider_application.list to create the list when the WhatsApp entry is missing. Confirm the provider entry is there before you attach a channel identity. Do not create identity records without a checked provider link.

How is ServiceNow Otto enabled for this channel?

Open sys_now_assist_channel_config.list and select New. Set Device Type to Whatsapp. Keep the defaults for the other fields, and select Submit. Add this setup to the conversation test plan when Otto is part of your rollout.

What does Conversational Custom Chat Integration contribute?

Conversational Custom Chat Integration lets a chat client you build swap messages with Virtual Agent. Put this plugin in the dependency handover so the support team can spot it. IntegrationHub Runtime runs Integration Hub actions and flows. List it on its own, because its job differs from connecting a chat client. Custom chat integrations do not support premium chat.