Integrate Sendwo with your website or app using the new Sendwo API. This allows you to send WhatsApp messages, including OTPs, directly from your platform. This article provides a step-by-step guide on sending WhatsApp OTP messages via the API.

Step 1:

To get your API key, go to the Sendwo dashboard, click on your user account, and select "API Developer." Then, click the "Generate API Key" button.

User Account > API Developer > Generate API Key

image 16

WhatsApp offers two APIs: the Send API and the Subscriber/Contact API. This example demonstrates sending a WhatsApp message using the Send API, specifically using a PHP script to deliver an OTP.

For business-initiated messages or messages sent outside the 24-hour customer service window, a pre-approved message template is required. While direct messaging is possible with users active in a 24-hour chat window, template messages can be sent to any user, even those added manually as subscribers.

Step 2: (Creating Template Message for OTP)

To create a message template, go to your WhatsApp account's Message Template section within the WhatsApp Bot Manager.

WhatsApp > Bot Manager > Select Bot Account > Message Template

We'll start by creating a variable for our message template. This is necessary because each user will receive a unique OTP. To create the variable, click the "Create" button in the Template variables section.

image 17

Give a name for the variable and click on the save button. Now, from the message template settings click on the “Create” button to create a template.

image 18

Once the previous step is finished, a template creation form will appear. Provide a name and locale for the template. Select the appropriate category, and since this is an OTP template, choose "OTP" as the type. Adding a header is optional; if desired, select the "Header" type.

Compose the message in the body, including the generated OTP variable by selecting it from the provided list. A footer is also optional. Since this template doesn't require buttons, leave the footer setting as "None." Finally, click the "Save" button.

image 19

The template should be in the list after it has been created.

image 20

Click the check status button to discover if the template has been approved or not. They must immediately approve or disapprove.

image 21

Yes, the template was created and approved successfully.

Step 3:

To generate an API endpoint for sending a template message, navigate to "Generate API End-point : Send Template Message (GET)". Select the desired WhatsApp account (using your WhatsApp phone number) and choose the "OTP message template" from the available templates. This will use the template you recently created.

image 22

As soon we select the Message template it will ask us to put a name for it. Just put OTP on the field and click on the “Get API end-point”.

image 23

It will generate the API End-point. We will use this code in the PHP script to send OTP messages to WhatsApp users.

image 24

In the PHP script, we will put this generated code into a variable. Then we need to write a few lines of code.

We need to change the OPT-VALUE and SEND-TO-PHONE-NUMBER from the API end-point to variables. Just like below.

image 25

The final code will look like this after updating the values with variables.

[ Use must use your generated API End-point ]

If we just run this code, the message should be delivered to the WhatsApp number.

So, this is how we can utilize the WhatsApp API of Sendwo to deliver OTP messages to WhatsApp numbers.

Sendwo empowers you to expand your chatbot's capabilities by seamlessly integrating external APIs within the Flow Builder. This powerful feature bridges the gap between Sendwo and other platforms, enabling you to perform a wide range of actions, including data retrieval, form submissions, and user updates.

Sendwo's robust HTTP API integration ensures compatibility with a variety of external platforms, such as WooCommerce and WordPress, streamlining your chatbot's interactions and enhancing its overall functionality. Whether you want to display WooCommerce products in WhatsApp or integrate WordPress posts with WhatsApp, we've got you covered with step-by-step guides:

How to Display WooCommerce Products Inside WhatsApp

How to Display Dynamic List in WhatsApp Interactive Message

Step 1: Access the HTTP API Section

To create a new WhatsApp HTTP API connection in Sendwo:

  1. Navigate: In the Sendwo dashboard, go to Integration > HTTP API.
  2. View/Add: This section displays your existing API connections and allows you to add new ones.
  3. Create: Click the "Create" button to begin setting up a new API connection.

Step 2: Add API Connection Details

In this section, you will configure the API settings to connect with external services:

  1. API Name: Provide a recognizable name for your API connection (e.g., "WordPress User Create").
  2. Method: Select the appropriate HTTP method (e.g., POSTGET) that matches the external API’s requirements.
  3. Endpoint URL: Enter the full URL of the external API that you want to connect to (e.g., https://example.com/api/v1/users/create).
  4. Test Subscriber ID:  Put a subscriber id copying from subscriber manager. Use your own phone number subscriber id. This is actually used for calling the API during verification. As some data may needed for dyanmic to pass custom field data or system field data. So for this test purpose at the first time, just put a testing subscriber ID.

Step 3: Configure Request Headers

In this section, you need to define any required HTTP headers needed to make the API request:

  1. Content-Type: Set this to application/json or another content type, depending on the API specifications.
  2. Authorization: If the API requires authorization (e.g., Basic Auth, Bearer Token), add the relevant header with the necessary token or credentials.
    • Example: Authorization: Bearer
External HTTP API Integration in Bot Flow

Step 4: Configure Request Body (Optional)

If the API request requires data to be sent in the body (for POST/PUT requests), configure the fields here:

  1. Body Data Fields: Add the necessary fields for the API request.
    • For instance, in the screenshot, the body includes user data such as usernamefirst_namelast_name, and email.
    • You can define whether each field is a static value (fixed value) or dynamic value (pulled from user input or external data).
  2. You can switch between form dataX-WWW-FORM-URLENCODED, and raw formats depending on the API requirements.
HTTP API Integration

Step 5: Save and Verify the Connection

Once you have entered all the required fields:

  1. Click on the "Verify Connection" button. Sendwo will send a test request to the external API to ensure everything is configured correctly.
  2. Once verified, click Save API to finalize the connection.

Step 6: Map API Response Data

After a successful API connection, you can map the response data back into your workflow:

  1. HTTP API Response Mapping: This section allows you to map fields from the API’s response to subscriber data or other variables within Sendwo.
HTTP API Integration

Step 7: Use in Flow Builder

Once your API is integrated and the response mapping is set up, you can now use this API connection within your Flow Builder to trigger API calls at different points in your chatbot’s conversation flow.

  1. HTTP API Element : Inside the Flow Builder, You can add HTTP API Element anywhere you want.
  2. Configure when and how the API should be called based on user interactions.
HTTP API Integration

Summary

Seamlessly integrate external APIs into your Sendwo workflows. This empowers you to automate actions like user creation, subscriber data retrieval, and real-time updates to external systems directly within your Sendwo chatbot flows.

For in-depth guidance on connecting APIs, advanced settings, and troubleshooting, please reach out to our support team or explore our comprehensive help center resources.

Businesses seeking to engage customers beyond the immediate 24-hour window can significantly benefit from WhatsApp message templates. In this article, we'll guide you through the seamless creation of WhatsApp message templates directly within Sendwo, streamlining your messaging strategy.

Templates empower businesses with the ability to craft rich, structured messages incorporating media, making them invaluable tools for effectively delivering announcements, confirmations, and reminders.

Why Templates Matter:

Introducing Carousel Templates:

Leverage the WhatsApp Cloud API:

Creating Message Templates in Sendwo

1. Accessing Message Template Creation:

2. Creating Variables (Optional):

3. Creating a Message Template:

image 46

Congratulations! Your message template has been successfully created.

To use this template for broadcasting, live chat, or integrated platforms like Shopify and WooCommerce, it must first be approved.

Once approved, you can seamlessly integrate this template into your communication workflows.

For a step-by-step guide on creating message templates for WhatsApp, please refer to our video tutorial.

WhatsApp has become indispensable for businesses seeking to cultivate strong customer relationships. Leveraging WhatsApp's Cloud API empowers businesses to effectively manage customer interactions through pre-defined message templates. These structured messages can be sent at any time, circumventing the 24-hour interaction window limitation.

This article will guide you through creating a WhatsApp message template within WhatsApp Manager and subsequently syncing it with Sendwo. This integration will enhance your customer outreach by enabling automated, personalized messaging. For creating templates directly within Sendwo, please refer to our detailed guide: How to Create A Message Template for WhatsApp in Sendwo Dashboard.

WhatsApp also supports carousel templates for message delivery. While carousel templates are currently unavailable within WhatsApp Manager itself, Sendwo offers robust support for creating and sending these engaging message formats. Explore our guide on 'How to Create WhatsApp Carousel Templates with Sendwo" for detailed instructions.

Step 1:

To create a message template for WhatsApp, start by logging in to business.facebook.com. If you manage multiple businesses, choose the appropriate one from the dropdown menu. Then, navigate to the "All Tools" menu and select "WhatsApp Manager."

How to Create Message Template in WhatsApp Manager

Click the three dots menu and select 'Manage Message Templates'.

How to Create Message Template in WhatsApp Manager

To create a WhatsApp message template:

  1. Navigate to "Message Templates": You'll be redirected to this section within the WhatsApp Business platform.
  2. Start a New Template: Click on "Create Template" to begin the process.
  3. Choose a Category: Select "Utility" from the provided options (Marketing, Utility, Authentication). This category is suitable for messages related to existing orders or accounts.
  4. Name and Language: Provide a descriptive name for your template and choose the desired language.
  5. Proceed: Click "Continue" to move forward in the template creation process
How to Create Message Template in WhatsApp Manager

Let's create a WhatsApp message template with a visually appealing header. You can choose a text header or a media header (image, video, or document). For this example, we'll use an image header.

Next, compose the main body of your message. You can personalize it by using variables to dynamically insert information. Optionally, include a footer for additional context.

To enhance user interaction, let's add quick reply buttons to your template. This allows recipients to easily respond with specific options.

Before submitting your template for approval, we need to provide sample data. This includes examples for the header and any variables used in the message body.

Once you've added the sample data, you can submit your template for review.

How to Create Message Template in WhatsApp Manager

WhatsApp will verify the template and approve it, after which it can be used.

Step 2:

Next, we'll integrate our message template with Sendwo.

  1. Locate the Message Templates section within the Sendwo platform.
  2. Click on "Sync Template." Sendwo will automatically retrieve the message template you previously defined on the WhatsApp Cloud API.
  3. Map the variables. You can now define the specific variables you wish to utilize within your chatbot.
  4. Create new variables (if needed). If you haven't yet established any variables, you can easily create them using the "Template Variables" section.
How to Create Message Template in WhatsApp Manager

After mapping the variables, we can save the message template. Now, the message template is ready to be used by the Sendwo chatbot.

In summary, integrating WhatsApp Cloud API message templates with Sendwo is a relatively simple process. By adhering to the steps detailed in this guide, businesses can effectively leverage these templates to enhance customer communication. This approach can also contribute to faster response times and increased customer engagement.

To modify an existing WhatsApp template, begin by making the necessary changes within your WhatsApp Business Manager. Subsequently, unlink the existing template integration in Sendwo. Finally, proceed to sync the updated template and remap it within the Sendwo platform as outlined earlier.

Broadcasting WhatsApp messages is a cornerstone of Sendwo's functionality. Previously, importing contact lists was limited to CSV files. However, Sendwo now offers enhanced flexibility by allowing you to import WhatsApp contacts directly from Google Sheets.

This guide will walk you through the process of importing subscribers or contacts from your Google Sheet to Sendwo. The first step involves connecting the Google account containing your WhatsApp contact data. Follow these steps to establish the connection.

Step 1: Connect Google Account:

How to Import WhatsApp Contacts from Google Sheet to Sendwo

Step 2: Create or import Sheets from your Google Account:

You can either create a sheet from Sendwo itself or import an existing Google Sheets from your account. We will go over both methods.

Creating a sheet from Sendwo:

How to Import WhatsApp Contacts from Google Sheet to Sendwo

Once the sheets are created, click on the 'view' button to add your contacts.

Importing a Sheet from Google Account:

To connect your Google Sheet, simply click "Add Existing Sheet." Select the desired Google account and then paste the Sheet ID into the provided field. You can easily find the Sheet ID from the sheet's URL.

Once created or added, your connected sheets will appear in a list and can be readily used for importing contacts.

How to Import WhatsApp Contacts from Google Sheet to Sendwo

Step 3: Importing WhatsApp Subscribers from Google Sheets to Sendwo

To import your WhatsApp subscribers from Google Sheets to Sendwo, follow these simple steps within the WhatsApp Subscriber Manager:

  1. Access Import Options:
    • Navigate to the "Options" menu within the WhatsApp Subscriber Manager.
    • Select "Import Subscribers" from the available options.
  2. Select Your Google Sheet:
    • A modal will appear, prompting you to choose the Google Sheet containing your subscriber data.
  3. Data Mapping:
    • Two sample data rows will be displayed.
    • Click on the "Map" button.
    • Match each column in your Google Sheet to the corresponding data field in Sendwo.
      • For example, map the "Phone Number" column in your sheet to "Subscriber Phone Number" in Sendwo.
      • Similarly, map "Name" to "Subscriber Name".
    • If your sheet includes additional data columns, map them to relevant custom fields in Sendwo.
  4. Confirm and Import:
    • Once all data fields are correctly mapped, click the "Confirm" button to initiate the import process.
How to Import WhatsApp Contacts from Google Sheet to Sendwo

This completes the process. The contacts from the Google Sheet will be imported into your Sendwo WhatsApp subscriber list.