Send Whatsapp message via Gupshup
 

PREREQUISITES

  • Ensure that you read how to create connector campaigns.
  • Send the WhatsApp message for approved templates using Gupshup WhatsApp API.
  • Ensure that you have 
    • UserId and Password for that Gupshup Account. These are the credentials to login into your Gupshup account. If you are not able to find these, reach out to your contact in Gupshup.
    • Have approved template messages that you want to send out to your users
  • Ensure that you have explicit consent from the user to receive business-initiated messages. For more information, refer to opt-in guidelines.

Create WhatsApp Campaign

Sending notifications on WhatsApp requires adherence to opt-in policies and a message template approval process instituted by WhatsApp. You will be able to send messages only to those users who are marked Opt-In. For more information, refer to Opt-in user campaign creation.

  1. Navigate to MoEngage Dashboard.
  2. Use any one of the following options:
    1. On the All Campaigns page, click Create Campaign.
      The Create Campaign page is displayed.
      CreateCampaign_RightNav.png
    2. Click Create New > Campaign.
      The Create Campaign page is displayed.
      CreateCampaignLeftNav.png
  3. Click Custom under Connectors.
  4. Click on Periodic.

Target Users

  1. Provide a suitable name for your campaign.
    For example, the message to inform the user that the first transaction is completed.
  2. Choose the Trigger Criteria
  3. Choose the target audience.
    You can target all the users or users who fulfill certain user property, user behavior, or a set of users, who satisfy specific criteria.

Content

Configure Webhook URL

Use GET Method to send the API request. Do the following:

Field Description
Webhook URL

Paste the following URL

 URL Parameters

URL parameters are populated automatically as described in the image:

URLWhatsApp.png

Change value for these keys: 

  • Userid and Password - Set as per your account credentials
  • send_to - you can personalize [using @] to select the mobile number of the user. Ensure that the selected attribute has the mobile number of the user with country code - 91. 

    MobileNumberPersonlization.gif

 If you are saving the Mobile Number without country code, prefix country code (For example, 91 for India) to your selected attribute

MobileNumberPerson.png

  • msg - The text message to be sent to the customer. It must be URL encoded. You can personalize your messages [using @], if say you want to address each user by their first name. 
  • msg_type - It is recommended to send msg_type="HSM" when sending Notifications on WhatsApp.
  • data_encoding - The default value is “text”. If your message is in another language or contains special characters or emoji, set data_encoding = "Unicode_text". If the value is “text”, then the maximum message length supported is 1024 characters. If the value is “Unicode_text”, then the maximum message length supported is 500 characters.
 

INFORMATION

Before sending WhatsApp campaign to your users, ensure that two or more active or installed users are not mapped to the same Mobile Number. If mapped, the users will receive multiple WhatsApp messages.

After publishing and sending the campaign, the campaign analytics page is displayed. Analytics will be generated within an hour from the time your campaign starts sending. For more information, refer to Connector campaign analytics.

Opt-in Users

After you have obtained the opt-in from a user, you have to call the Gupshup Messaging API using the OPT_IN API method to mark the user as Opt-In.

This is only a one-time step until the user remains opted-in. But, if the user opts out and opt-in again, you will need to pass this information again to Gupshup. 

Do the following:

  1. On the MoEngage Dashboard, do one of the following
    • On the All Campaigns page, click Create Campaign.
    • Click Create New > Campaign.
  2. Click on Periodic under Custom > Connectors.

Target Users

  1. Add a suitable name for your campaign (e.g. WhatsApp OptIn)
  2.  Select the Trigger Criteria.
    For example, you want to take consent from the user on your app/website using a checkbox. You want to mark a user as Opt-In immediately so that they can start receiving WhatsApp messages immediately. Make sure you are passing the tick checkbox event to MoEngage. 
  3. Choose the target audience.
    You can target all the users or users who fulfill certain user property, user behavior, or a set of users, who satisfy specific criteria.

Content

Configure Webhook URL

Use GET Method to send the API request.

Field Description
Webhook URL

Paste the following URL

URL Parameter

URL parameters are populated automatically as described in the image:

Opt-in.png

Change value for these keys: 

  • Userid and Password - Set as per your account credentials
  • send_to - you can personalize [using @] to select the mobile number of the user. Ensure that the selected attribute has the mobile number of the user with country code - 91. 
    • MobileNumberPersonlization.gif
  •  If you are saving the Mobile Number without country code, prefix country code (For example, 91 for India) to your selected attribute

    MobileNumberPerson.png

    • msg - The text message to be sent to the customer. It must be URL encoded. You can personalize your messages [using @], if say you want to address each user by their first name. 
    • msg_type - It is recommended to send msg_type="HSM" when sending Notifications on WhatsApp.
    • data_encoding - The default value is “text”. If your message is in another language or contains special characters or emoji, set data_encoding = "Unicode_text". If the value is “text”, then the maximum message length supported is 1024 characters. If the value is “Unicode_text”, then the maximum message length supported is 500 characters.
 

INFORMATION

Before sending WhatsApp campaign to your users, ensure that two or more active or installed users are not mapped to the same Mobile Number. If mapped, the users will receive multiple WhatsApp messages.

Select the user attribute Mobile Number to delete the duplicate users.

MobileNumberRemove.png

After publishing and sending the campaign, the campaign analytics page is displayed. Analytics will be generated within an hour from the time your campaign starts sending. For more information, refer to Connector campaign analytics.

MoEngage recommends using this method responsibly. Do not make an Opt-in API call unless the user has legitimately and explicitly provided consent to send notifications on WhatsApp.

Opt-in Requirements

Ensure the following:

  1. Users must consent to receive messages in WhatsApp
  2. Consent is provided by opting in using a third-party channel. The third party channel used by your business to communicate with its users, for example, your website, mobile app, missed call, IVR, email, SMS, retail location, contact center, and so on.
  3. The opt-in must be explicit i.e. triggered by a user action, such as entering a phone number or ticking a checkbox to indicate consent.
  4. Clear opt-in messaging so that a user knows what types of messaging the person are signing up for.
  5. Opt-ins must be maintained by the business and should be produced in the event that WhatsApp requests for this information.
  6. A customer initiating a conversation on WhatsApp cannot be considered as an opt-in, as it does not fulfill the requirement of being a third-party channel.

Opt-out Users

WhatsApp recommends that you provide opted-in users with an option to opt-out from receiving further notifications on WhatsApp. MoEngage recommended method is to inform users about a STOP keyword on WhatsApp to opt-out.

To mark a user as Opt-out, do the following:

  1. On the MoEngage Dashboard, do one of the following
    • On the All Campaigns page, click Create Campaign.
    • Click Create New > Campaign.
  2. Click on Event-Triggered under Connectors.

Target Users

  1. Add a suitable name for your campaign (e.g. WhatsApp OptIn)
  2.  Select the Trigger Criteria.
    For example, you want to take consent from the user on your app/website using a checkbox. You want to mark a user as Opt-In immediately so that they can start receiving WhatsApp messages immediately. Make sure you are passing the tick checkbox event to MoEngage. 
  3. Choose the target audience.
    You can target all the users or users who fulfill certain user property, user behavior, or a set of users, who satisfy specific criteria.

Content

Configure Webhook URL

Use GET Method to send the API request.

Field Description
Webhook URL

Paste the following URL

URL Parameter

URL parameters are populated automatically as described in the image:

Opt-Out.png

Change value for these keys: 

  • Userid and Password - Set as per your account credentials
  • send_to - you can personalize [using @] to select the mobile number of the user. Ensure that the selected attribute has the mobile number of the user with country code - 91. 
    • MobileNumberPersonlization.gif
  •  If you are saving the Mobile Number without country code, prefix country code (For example, 91 for India) to your selected attribute

    MobileNumberPerson.png

    • msg - The text message to be sent to the customer. It must be URL encoded. You can personalize your messages [using @], if say you want to address each user by their first name. 
    • msg_type - It is recommended to send msg_type="HSM" when sending Notifications on WhatsApp.
    • data_encoding - The default value is “text”. If your message is in another language or contains special characters or emoji, set data_encoding = "Unicode_text". If the value is “text”, then the maximum message length supported is 1024 characters. If the value is “Unicode_text”, then the maximum message length supported is 500 characters.
 

INFORMATION

Before sending WhatsApp campaign to your users, ensure that two or more active or installed users are not mapped to the same Mobile Number. If mapped, the users will receive multiple WhatsApp messages.

Select the user attribute Mobile Number to delete the duplicate users.

MobileNumberRemove.png

After publishing and sending the campaign, the campaign analytics page is displayed. Analytics will be generated within an hour from the time your campaign starts sending. For more information, refer to Connector campaign analytics.

In absence of an Opt-Out option, users might feel intruded and block the Business phone number or report it as Spam. This will affect your quality rating and might result in quality rating based rate limits being applied. In worst case scenario, the Business account might get suspended if the quality rating does not improve over time.

Was this article helpful?
3 out of 6 found this helpful