DoubleTick Docs
DoubleTick Docs
  • DoubleTick Help Center
  • Get Started with DoubleTick
    • Pre-requisites for Onboarding
    • How to Do Meta Facebook Business Verification
    • DoubleTick Onboarding
  • Chat Management
    • Start a New Chat with Customers
    • Manage Customer Conversation on Chat Inbox
    • How to Use Customer Notes
    • How to Use Tags
    • How to Assign Chats
    • How to Block & Unblock Customers
    • How to Manage Conversations
    • What is WhatsApp Opt-in and How to Manage It
    • How to Configure SLA (Service Level Agreement)
    • Forward Chat Message: Enhancing Communication Efficiency
  • Broadcast List
    • How to Import Customer Data
    • How to Send and Schedule Broadcast Messages
    • How to Check Broadcast Summary
    • How to Re-Target Your Customers
    • How to Manage Broadcast List Access
    • How to Scheduled Broadcasts
    • Send Dynamic PDFs via DoubleTick WhatsApp Broadcast Using Google Sheets
  • How to Create Dynamic Broadcast Channel on DoubleTick
  • Templates
    • Template Categories in WhatsApp API
    • How to Create Message Templates
      • Know the Basic Info for Template Creation
      • How to Use the Content Section in Template
      • How to Add Buttons in Message Template
      • How to use Variables in Message Template
      • How to Preview the Message Template
    • Check Message Template Status
    • Send Template Messages
    • Change Template Details
    • Fix Message Template Rejection
    • WhatsApp Forms
    • Create a Carousel Template Message
    • How to Send Dynamic content in a Single template with DoubleTick
    • How To Create An OTP Template On DoubleTick
  • Customers
    • Create Customer Segments
    • Deleting Customers On DoubleTick
  • Analytics
    • Setup Analytics
  • REPORTS
    • How to Download and Export Reports in DoubleTick
  • Teams
    • Invite Your Team Members
    • Accept Invitations and Log in to DoubleTick
    • Assign & Change Reporting Structure
    • Update a Team Member’s Name in DoubleTick.
  • Bot Studio
    • Create and Manage Bots
    • Create Order Bot
    • Set Up Welcome Bot
    • Set Up Stop Bot
    • Set Up Bot Triggers
    • How to Notify Agents on WhatsApp When Assigned a Lead in DoubleTick
    • Fixing Webhook Phone Numbers: Add Country Codes Automatically
    • How to Integrate WooCommerce with DoubleTick
    • How to Record Customer Responses Using DoubleTick’s Bot Studio and Google Sheets Integration
    • How to Automate Reminders for Template Button Selection in Your Bot
    • Actions
      • Assign Agent to Customer's Chat
      • How to Use the Close Conversation Feature
      • How to Use Condition Action
      • How to Set Up Google Sheet Action
      • What is WhatsApp Opt-Out and How to Manage It
      • How to Send Interactive List Messages
      • How to Send Interactive Messages
      • How to Send Multimedia Messages
      • How to Set Customer Attributes
      • How to Set Tags
      • How to Set Time Delay on Chatbot
      • How to Set Wait Till Action on Chatbot
      • Condition Action In Chat Bot
      • Streamlining Lead Management with Round Robin Agent Assignment Using Bots
  • Settings
    • Edit Your Profile Details
    • Manage Roles
      • How to Use Organization Roles Feature
      • How to Use WhatsApp Account Roles Feature
      • How to Grant Phone Number Access to Agents with Custom Role In DoubleTick
      • Change Roles of Existing Team Members
    • How to Use Custom Contact Fields
    • Create and Use Quick Replies
    • Send Template Messages
    • Create a WhatsApp Widget on Website
    • How to Use Webhooks to Pass Events to Third-Party
    • Get Developer API
    • How to Manage Channels
    • How to Manage Billing & Invoices
      • How to Find the Invoice in DoubleTick
      • How to Update Billing Details in DoubleTick
    • Set Up Working Hours
    • Integrations
      • Streamline Appointment Booking on DoubleTick Using Zapier and Google Calendar
      • Automating WhatsApp messages on DoubleTick on column updates on Google Sheet
      • Automatic updates from Gsheet Database
      • Tally Prime Integration
      • Indiamart & DoubleTick Integration
      • How to Integrate My Operator with DoubleTick via Webhook to Send Templates
      • How to Integrate QuickSell with DoubleTick
    • How To Enable Browser Push Notification For DoubleTick Messages
    • How to Update Your Display Name On Facebook Business Account
    • Import WhatsApp Chats
  • WhatsAPP BUSINESS API
    • WhatsApp API Conversations & Categories
    • How Conversation Charges Works
    • Manage and View Account Quality on Meta
    • Messaging Limits in WhatsApp API
    • Unblock Your WhatsApp API Account
    • Change Your Display Name in Meta WhatsApp Manager
    • Apply for WhatsApp Green Tick
    • How To Update the Display Picture (DP) in Facebook Business Manager
  • Troubleshoot Errors
    • Troubleshoot Common WhatsApp API Errors
    • Per-User Marketing Template Message Limits
    • Unsupported Message: Understanding WhatsApp API Restrictions and How They Affect Communication
    • What is Frequency Capping
      • How Frequency Capping Works
    • How to Link Your WhatsApp API Phone Number to a Facebook Page
    • How to Use DoubleTick? Product Feature Training Videos
    • How To Resolve META Maintaining Healthy Ecosystem Delivery Error: A Step-by-Step Guide
  • How to Identify and Resolve Duplicate Keywords in Bot Configurations
  • Logging Out A Member From All Devices in DoubleTick
  • How to Use Newline Characters in Template Variables In DoubleTick
  • How To Login To DoubleTick
  • How To Logout From DoubleTick
  • Re-Engagement Error While Sending a Message in the Open Reply Window
  • How to Resolve the "Please Fill All Fields" Error in Templates On DoubleTick
  • How To Troubleshoot the "Spam Rate Limit Hit" Error in DoubleTick
  • How to resolve the "404 – File or Directory Not Found" error when exporting an Excel sheet?
  • How To Capture Details Using Webhooks And Condition
  • Understanding the “Only 30 Groups Can Be Created at One Time” Error in DoubleTick
  • Stay Ahead with WhatsApp: Important Updates from Meta
  • Meta Pauses WhatsApp Marketing Messages for U.S. Customers
  • Understanding and Troubleshooting the "New Bot Failure Alert" Email
  • Marketing Message Lite
  • TOPIC WISE VIDEO LIST
    • Page 1
  • How to Integrate QuickSell with DoubleTick
  • Appointment Booking
Powered by GitBook
On this page
  1. Bot Studio

Fixing Webhook Phone Numbers: Add Country Codes Automatically

PreviousHow to Notify Agents on WhatsApp When Assigned a Lead in DoubleTickNextHow to Integrate WooCommerce with DoubleTick

Last updated 5 months ago

In today’s digital communication landscape, businesses rely on streamlined processes to connect with customers. WhatsApp is a preferred communication channel for many, but it requires a properly formatted phone number with an international country code to send messages or templates. When customer data enters the system from sources like Google Sheets or Webhooks, the lack of a country code can block the message flow, preventing successful WhatsApp interactions. In this guide, we’ll explore how a Number Correction API can help you automate number formatting, ensuring data in DoubleTick is WhatsApp-ready. We’ll also look at creating a bot to automate this correction, starting from the initial data source.

How the Number Correction API Works The Number Correction API functions as an intermediary that formats the phone number before it is stored or processed. Here’s a simplified workflow of how it works:

  1. Receive the Raw Data: The lead/customer information is collected from Google Sheets, webhook, or another integration. This data may include unformatted phone numbers without country codes.

  2. API Call to Correct the Number: Once the raw data is received, the Number Correction API is called. This API takes the phone number and a set of additional parameters (like the customer’s country) to automatically add the correct country code.

  3. Validate the Number: The API verifies the phone number format according to the E.164 international standard, which WhatsApp uses. For example, a number for India will be formatted as “+91XXXXXXXXX.”

  4. Update the Corrected Number in DoubleTick: The formatted number is then updated in DoubleTick, ready for use in WhatsApp communications.

  5. Sending WhatsApp Templates: With the number correctly formatted, WhatsApp messages or templates can now be sent without interruption. Implementing the Number Correction API in DoubleTick Step 1: Identify Incoming Data Sources First, identify where the customer data is coming from, whether it’s Google Sheets, a webhook, or another source. If you’re dealing with multiple data sources, ensure that the Number Correction API can be triggered every time new data is received. Step 2: Set Up Your Bot Platform Use the Bot-Studio platform that integrates with your data source. For example: Google Sheets Integration: For Sheets set up the starting point of the Bot as On New Row google Sheet, that triggers the bot whenever a new entry is added. Webhook Integration: For webhooks, set up Starting point trigger as on Webhook that fires the bot whenever data is received from the source. a) Setup and call the Number Correction API Once the bot is triggered, it should pass the phone number and country details to the Number Correction API. Here’s how to create the API call : - Add the Call API action to the Bot, connect the same to the source node. - Create the Number Correction API by clicking on the + Create New api button.

    - Add the details in the Pop up as shown in the image below curl --location 'https://b1ge7k5vbf.execute-api.ap-south-1.amazonaws.com/prod' \ --header 'Content- Type: application/json' \ --data '{ "defaultCountryCode": "IN", "numbers": [ { "value": "07038896140" } ] }'

Step 3 : Capturing Response Finally, click “Capture Response” in the second webhook to retrieve the phone number with the country code applied.

b) Next, create a new webhook and copy its URL. Link this to a second "Call API" action. In the second call, paste the webhook URL, set the body type to JSON, and add `"phone": ""`. Save the API. Map the phone number in the second API’s “phone” section by selecting “0.E164”—this will apply the country code to the phone number received from the first API.

+918356867936