Integrate the Salesforce WhatsApp Business API by creating a business portfolio, setting up developer assets, configuring a webhook, and connecting with Salesforce for seamless messaging.
Get Started
Create a Business Portfolio
Set up developer assets and platform access.
Configure a Webhook.
Integrate with Salesforce.
1. Create a business portfolio
1.1. Go to business.facebook.com in a desktop browser. You will also use this address to log in to Meta Business Suite or Business Manager.
1.2. Click Create an account.
1.3. Log in to your personal Facebook account. If you don't have an account, click Create account to sign up for one.
1.4. Click Create an account.
1.5. Enter your business details.
Business portfolio name. It should match the public name of your business or organization, as it will be visible across Meta. It can't contain special characters.
Your name.
Business email address. Meta will use this email address to contact you about your business. It won't be visible to your customers.
1.6. Click Submit or Create to create your portfolio. You'll get an email asking to confirm your business email address.
Once you've created your business portfolio, you can add business assets, such as Pages, ad accounts, datasets and Instagram accounts.
2. Set up developer assets and platform access.
2.1. Log in to Meta
Log in to the Meta developer account.
2.2. Create a Business App
Go to My Apps on the right side top to create a Business App.
2.3. Add The WhatsApp Product To Your App
Add The WhatsApp Product To Your App
At this point, if you created a new app, you’ll be prompted to Add products to your app. Scroll down, and under WhatsApp, select Set up. Otherwise, select your app from the My Apps screen, and you can follow the same instructions again to add WhatsApp to your app.
2.4. Add a Recipient Number and Send a Test Message
Add a valid WhatsApp number where you can send messages.
In the left-hand menu of the App Dashboard, navigate to WhatsApp > API Setup. Under Send and receive messages, select the To field and choose Manage phone number list.
You can add any valid WhatsApp number as a recipient. The recipient number will receive a confirmation code in WhatsApp that can be used to verify the number.
Once you verify the recipient number, it should now be selected in the To field. Repeat this process if you’d like to add another recipient, up to 5 in total.
2.5. Send a Test Message
Send the pre-approved hello_world template message to your chosen recipient number.
In the WhatsApp > API Setup panel:
Ensure your business phone number is selected in the From field.
Ensure you have the recipient phone number you would like to message selected in the To field. If you have multiple numbers added, you can send multiple messages at once.
In the Send messages with the API panel, click the Send message button.
3. Configure a Webhook.
With webhooks, you can receive real-time HTTP notifications of changes to specific objects. In WhatsApp, webhooks can notify you of many events in your app, like message delivery and read notifications, and even account changes.
3.1. Add a callback URL in order to see the contents of webhooks.
In your App Dashboard, find the WhatsApp product and click Configuration. Then, find the webhooks section and click Configure a webhook. After the click, a dialog appears on your screen and asks you for two items:
Callback URL: This is the URL Meta will be sending the events to. See the Webhooks, Getting Started guide for information on creating the URL.
Verify Token: This string is set up by you, when you create your Webhook endpoint.
After adding the information, click Verify and Save.
Back in the App Dashboard, click WhatsApp > Configuration in the left-side panel. Under Webhooks, click Manage. A dialog box will open with all the objects you can get notified about. To receive messages from your users, click Subscribe for messages.
4. Integrate with Salesforce.
Integrating WhatsApp with Salesforce involves connecting the two platforms so that you can send and receive WhatsApp messages directly within Salesforce. You can achieve this integration using Salesforce Flows, Apex.
Komentarze