LogoLogo
Become a PartnerStatus Page
  • get started
    • Welcome to 360Dialog
    • Quickstarts
      • Register as a Meta Tech Provider
      • Add a WhatsApp Number
      • Set up Integrated Onboarding
      • Create a Message Template
      • Send a Message
      • (temp title) Getting started as a partner
    • Pricing & Billing
      • Payment Methods for BR: Pix & Boleto
      • Month Closing Invoice (MCI)
    • Get API Access
    • Tech Provider Program
      • Understanding the Meta Tech Provider Program
      • Becoming a Meta Tech Provider: A Step-by-Step Guide
  • MM Lite Beta Program
    • Onboarding
    • Sending Messages
    • Expected Errors & Programming Languages
    • MM Lite Sandbox Testing
      • Sending Messages using MM Lite Sandbox
      • Expected Erros & Programming Languages
  • Partner & Account Management
    • Solutions for Partners
      • Benefits for Partners
      • Partner Hub
      • WABA Management
    • Account Setup & Management
      • Prerequisites and best practices for account creation
      • Account Structure
      • Account Creation
  • Integrations & API Development
    • Webhook Events & Setup
      • Webhook Events (Partner & Messaging API)
      • Webhook Configuration & Management
    • Integration Best Practices
      • Architecture and Security
      • Best Practices for Designing Integrations
        • Design a Stable Webhook Receiving Endpoint
      • Sizing Your Environment Based on Expected Throughput
      • Design a Resilient Message Sending Service
      • Integrated Onboarding
        • Basic Integrated Onboarding
        • Custom Integrated Onboarding
        • Host Your Own Embedded Signup
      • API Key Authentication for the Partner API
  • API Reference
    • Messaging API
    • Messaging Health Status
    • Sandbox (Test API Key)
    • Differences Between Cloud API and On-Premise API for Partners
      • [will be deprecated] Messaging with On-Premise API
    • Partner API
  • WABA Management
    • Managing WABA Accounts
      • Using the Partner Hub to manage Clients and Channels
      • Using the Partner API to manage Clients and Channels
      • Partner Permission to Generate API Key
      • Checking Usage & Statistics
    • Phone Number & Hosting
      • Migrating a Phone Number
        • Migrate number from Meta or alternate BSP to 360Dialog
        • Migrate a phone number to a new WABA
        • Migrate a phone number to a new WABA to change messaging Currency
      • WhatsApp Coexistence
        • Coexistence Onboarding
        • Coexistence Webhooks
      • Hosting type Change (On-premise API to Cloud API)
    • WABA Profile & Compliance
      • Display Name Guidelines
      • WABA Profile Info
      • WABA Policy Enforcement
      • Business Account Verification
    • Partner change (between 360Dialog Partners)
    • WhatsApp Flows
    • Accelerated Onboarding
    • Business Account Verification
  • Messaging
    • Sending & Receiving Messages
      • Conversations
      • Receiving messages
      • Before sending a message
    • Message Types
      • Conversational Components
      • Checklist for Message Broadcasts and Campaigns
      • Text messages
      • Interactive messages
        • Single and Multi Product Messages
        • Location Request Messages
        • Address Messages (India and Singapore only)
      • Contacts & Location Messages
    • Template Messages
      • Template Library
      • Template Elements
      • Sending Template Messages
      • Authentication Templates
        • Zero-Tap Authentication Templates
        • One-Tap Autofill Authentication Templates
        • Copy Code Authentication Templates
      • Catalog Templates
      • Product Card Carousel Templates
      • Single-Product Message Templates
      • Coupon Code Templates
      • Limited-Time Offer Templates
      • Multi-Product Templates
    • Media Messages
      • Upload, retrieve or delete media
    • Messaging Health & Troubleshooting
      • Messaging Limits & Quality Rating
      • Errors While Messaging
      • Messages statuses
  • Commerce & Payments
    • Payments (India Only)
      • Receive WhatsApp Payments via Payments Gateway
      • Receive WhatsApp Payments via Payment Links
      • Order Details Template Message
    • Payments (Singapore Only)
      • Receive WhatsApp Payments via Stripe
    • Products and Catalogs
      • India Businesses: Compliance for Commerce
  • Support & Updates
    • Help & Troubleshooting
      • FAQ
      • Error Code Reference
      • User Support Documentation
        • Tutorials
          • Page How to Troubleshoot Login Issues in the 360dialog Hub
          • How to Report an Issue
          • How to Contact Support
        • How-To Guides
          • Raise a support request
          • Requesting a Status Update for Business Verification
        • Reference
          • Troubleshooting Embedded Signup Issues
          • Commerce Policy Checks for WhatsApp API Access
          • Support Availability & SLAs
          • Incident Issue Prioritization
          • Case Types Table
        • Explanation
          • Why Business Verification Takes Time
          • Why Some Issues Are Not Emergencies
          • Understanding the Support Process
      • Support with Meta
    • Imprint & Data Privacy
    • Product Updates & News
      • How to ensure your Template Messages will be received
      • Integrated Onboarding new look and Campaigns Best Practices
Powered by GitBook
On this page
  • Limitations
  • Template Creation
  • Sending Coupon Templates

Was this helpful?

  1. Messaging
  2. Template Messages

Limited-Time Offer Templates

PreviousCoupon Code TemplatesNextMulti-Product Templates

Last updated 10 months ago

Was this helpful?

Limited-Time Offer Templates are only available while using Cloud API.

Limited-time offer templates allow you to display expiration dates and running countdown timers for offer codes in template messages, making it easy for you to communicate time-bound offers and drive customer engagement.

Limitations

  • Only templates categorized as MARKETING are supported.

  • Footer components are not supported.

  • Users who view a limited-time offer template message using that WhatsApp web app or desktop app will not see the offer, but will instead see a message indicating that they have received a message but that it's not supported in the client they are using.

Template Creation

Use the create template endpoint to create coupon code templates.

POST https://waba-v2.360dialog.io/v1/configs/templates

Headers

Name
Type
Description

D360-API-KEY

string

{
  "id": "546151681022936",
  "status": "PENDING",
  "category": "MARKETING"
}

Once your template is approved, you can use Cloud API to send it in a template message.

Post Body

{
  "name": "<TEMPLATE_NAME>",
  "language": "<TEMPLATE_LANGUAGE>",
  "category": "marketing",
  "components": [

    /* Header component optional */
    {
      "type": "header",
      "format": "<HEADER_FORMAT>",
      "example": {
        "header_handle": [
          "<HEADER_ASSET_HANDLE>"
        ]
      }
    },

    /* Limited-time offer component required */
    {
      "type": "limited_time_offer",
      "limited_time_offer": {
        "text": "<LIMITED_TIME_OFFER_TEXT>",
        "has_expiration": <HAS_EXPIRATION>
      }
    },

    /* Body component required */
    {
      "type": "body",
      "text": "<BODY_TEXT>",
      "example": {
        "body_text": [<BODY_TEXT_VARIABLE_EXAMPLES>]
      }
    },

    /* Copy code button component required if "has_expiration" is set to true.
       If set to false but want to use a copy code button, it must appear
       first in the "buttons" array. URL button component is always required. */
    {
      "type": "buttons",
      "buttons": [
        {
          "type": "copy_code",
          "example": "<OFFER_CODE_EXAMPLE>"
        },
        {
          "type": "url",
          "text": "<URL_BUTTON_TEXT>",
          "url": "<URL_BUTTON_URL>",
          "example": [
            "<URL_EXAMPLE_WITH_VARIABLE_EXAMPLE>"
          ]
        }
      ]
    }
  ]
}

Properties

Placeholder
Description
Example Value

<BODY_TEXT>

String

Required.

Body component text. Supports variables.

Maximum 600 characters.

Good news, {{1}}! Use code {{2}} to get 25% off all Caribbean Destination packages!

<BODY_TEXT_VARIABLE_EXAMPLES>

Array of strings

Required if body component text uses variables.

Array of example variable strings.

Must supply examples for all placeholders in <BODY_TEXT> string.

No maximum, but counts against <BODY_TEXT> maximum.

["Pablo","CARIBE25"]

<HAS_EXPIRATION>

Boolean

Optional.

If set to true, the copy code button component must be included in the buttons array, and must appear first in the array.

If set to false, offer expiration details will not appear in the delivered message and the copy code button component is optional. If including the copy code button, it must appear first in the buttons array.

true

<HEADER_ASSET_HANDLE>

Media asset handle

Required if using an image or video header.

4::aW...

<HEADER_FORMAT>

Enum

Required if using a header.

Can be IMAGE, or VIDEO.

IMAGE

<LIMITED_TIME_OFFER_TEXT>

String

Required.

Offer details text.

Maximum 16 characters.

Expiring offer!

<OFFER_CODE_EXAMPLE>

String

Required.

Example offer code.

Maximum 15 characters.

CARIBE25

<TEMPLATE_LANGUAGE>

Enum

Required.

en_US

<TEMPLATE_NAME>

String

Required.

Template name.

Maximum 512 characters.

limited_time_offer_caribbean_pkg_2023

<URL_BUTTON_TEXT>

String

Required.

25 characters maximum.

Book now!

<URL_BUTTON_URL>

String

Required.

Supports 1 variable appended to the end of the URL string.

Maximum 2000 characters.

https://awesomedestinations.com/offers?code={{1}}

<URL_EXAMPLE_WITH_VARIABLE_EXAMPLE>

String

Required if URL uses a variable.

Example URL with example variable appended to the end.

No maximum, but value counts against <URL_BUTTON_URL> maximum.

https://awesomedestinations.com/offers?ref=n3mtql

Offer Expiration Details

The delivered message can display an offer expiration details section with a heading, an optional expiration timer, and the offer code itself.

The expiration timer is a text string that is not customizable, but it will change to red text if the message is viewed and the offer code is expiring within the next hour. (You include the actual offer code and its expiration timestamp when you send the template in a template message.)

Example Request

This is an example request to create a limited-time offer template that uses:

  • an image header component

  • body text component with variables

  • the limited time offer component

  • a copy code button

  • a button URL with a variable

{
  "name": "limited_time_offer_caribbean_pkg_2023",
  "language": "en_US",
  "category": "marketing",
  "components": [
    {
      "type": "header",
      "format": "image",
      "example": {
        "header_handle": [
          "4::aW..."
        ]
      }
    },
    {
      "type": "limited_time_offer",
      "limited_time_offer": {
        "text": "Expiring offer!",
        "has_expiration": true
      }
    },
    {
      "type": "body",
      "text": "Good news, {{1}}! Use code {{2}} to get 25% off all Caribbean Destination packages!",
      "example": {
        "body_text": [
          [
            "Pablo",
            "CARIBE25"
          ]
        ]
      }
    },
    {
      "type": "buttons",
      "buttons": [
        {
          "type": "copy_code",
          "example": "CARIBE25"
        },
        {
          "type": "url",
          "text": "Book now!",
          "url": "https://awesomedestinations.com/offers?code={{1}}",
          "example": [
            "https://awesomedestinations.com/offers?ref=n3mtql"
          ]
        }
      ]
    }
  ]
}

Sending Coupon Templates

Use the Cloud API to send approved coupon code templates in template messages.

POST https://waba-v2.360dialog.io/messages

Post Body

{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "<CUSTOMER_PHONE_NUMBER>",
  "type": "template",
  "template": {
    "name": "<TEMPLATE_NAME>",
    "language": {
      "code": "<TEMPLATE_LANGUAGE_CODE>"
    },
    "components": [

      /* Required if template uses header, otherwise omit */
      {
        "type": "header",
        "parameters": [
          {
            "type": "<HEADER_TYPE>",
            "<HEADER_TYPE>": {
              "id": "<HEADER_ASSET_ID>"
            }
          }
        ]
      },

      /* Body and params required if templates uses body params, otherwise omit */
      {
        "type": "body",
        "parameters": [
          <BODY_VARIABLES>
        ]
      },

      /* Required if template uses offer expiration details, otherwise omit */
      {
        "type": "limited_time_offer",
        "parameters": [
          {
            "type": "limited_time_offer",
            "limited_time_offer": {
              "expiration_time_ms": <EXPIRATION_TIME>
            }
          }
        ]
      },

      /* Copy code button required if template uses offer expiration details, or 
         if uses a copy code button without the offer expiration details */
      {
        "type": "button",
        "sub_type": "copy_code",
        "index": 0,
        "parameters": [
          {
            "type": "coupon_code",
            "coupon_code": "<OFFER_CODE>"
          }
        ]
      },

      /* Required */
      {
        "type": "button",
        "sub_type": "url",
        "index": <URL_BUTTON_INDEX>,
        "parameters": [
          {
            "type": "text",
            "text": "<URL_VARIABLE>"
          }
        ]
      }
    ]
  }
}

Properties

Placeholder
Description
Example Value

<BODY_VARIABLES>

Array of objects

Required if template body text uses variables.

Body text variable values. Define each variable as an individual object.

{"type":"text","text":"Pablo"},{"type":"text","text":"CARIBE25"}

<CUSTOMER_PHONE_NUMBER>

String

Required.

Phone number of customer who the template message should be sent to.

+16505555555

<EXPIRATION_TIME>

Unix timestamp

Required.

Offer code expiration time as a UNIX timestamp in milliseconds.

1698562800000

<HEADER_ASSET_ID>

Media asset ID

Required.

1602186516975000

<HEADER_TYPE>

String

Required.

Header type used by the template. Values can be image or video.

image

<OFFER_CODE>

String

Required if template uses offer expiration details or a copy code button.

Offer code.

Maximum 15 characters.

CARIBE25

<TEMPLATE_LANGUAGE_CODE>

Enum

Required.

en_US

<TEMPLATE_NAME>

String

Required.

The template's name.

limited_time_offer_caribbean_pkg_2023

<URL_BUTTON_INDEX>

Integer

Required.

URL button index. If the template uses a copy code button, value must be 1.

If the template does not use a copy code button, the value must be 0.

1

<URL_VARIABLE>

String

Required if URL uses a variable.

URL variable value.

No maximum but value counts against URL string maximum of 2000 characters.

n3mtql

Example Request

Example request to send a limited-time offer template that uses:

  • an image header

  • body text variables

  • the offer expiration details

  • a copy code button

  • a URL button with a variable

{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "16505555555",
  "type": "template",
  "template": {
    "name": "limited_time_offer_caribbean_pkg_2023",
    "language": {
      "code": "en_US"
    },
    "components": [
      {
        "type": "header",
        "parameters": [
          {
            "type": "image",
            "image": {
              "id": "1602186516975000"
            }
          }
        ]
      },
      {
        "type": "body",
        "parameters": [
          {
            "type": "text",
            "text": "Pablo"
          },
          {
            "type": "text",
            "text": "CARIBE25"
          }
        ]
      },
      {
        "type": "limited_time_offer",
        "parameters": [
          {
            "type": "limited_time_offer",
            "limited_time_offer": {
              "expiration_time_ms": 1209600000
            }
          }
        ]
      },
      {
        "type": "button",
        "sub_type": "copy_code",
        "index": 0,
        "parameters": [
          {
            "type": "coupon_code",
            "coupon_code": "CARIBE25"
          }
        ]
      },
      {
        "type": "button",
        "sub_type": "url",
        "index": 1,
        "parameters": [
          {
            "type": "text",
            "text": "n3mtql"
          }
        ]
      }
    ]
  }
}

Set to true to have the appear in the delivered message.

Uploaded media asset handle. Use the to generate an asset handle.

Template .

label text. Supports 1 variable.

URL of website that loads in the device's default mobile web browser when the is tapped by the WhatsApp user.

Uploaded media asset ID. Use theendpoint to generate an ID.

The template's .

language and locale code
language and locale code
offer expiration details
Resumable Upload API
URL button
URL button
/media