Content Fetch in WhatsApp
Learn how to insert Content Fetch labels into WhatsApp campaigns.
Content Fetch retrieves live data from an API at send time and inserts the fetched values into a WhatsApp message.
In WhatsApp, Content Fetch labels are mapped to specific fields in a Meta-approved template. Content Fetch can be used to personalize template body variables, header media, button URLs, and Dynamic Carousel cards.
For example, a Content Fetch label can retrieve a live coupon code, product image, personalized URL, or other customer-specific value and insert it into the WhatsApp message at send time.
One Connection for Every ChannelContent Fetch connections are channel agnostic. If Content Fetch is already configured for the App Push channel, the same connection can be used in the WhatsApp channel. There is no need to create a new connection.
Refer to Configure Content Fetch to configure a Content Fetch connection.
Prerequisites
Ensure that the following prerequisites are met before configuring Content Fetch in WhatsApp:
- An Active Content Fetch connection.
- An approved WhatsApp template.
- A fallback value for every Content Fetch label mapped to the template.
- A test user with live attributes for preview.
Use Content Fetch in WhatsApp Templates
Content Fetch labels can be mapped to the following fields in a WhatsApp template:
| Field | Personalization | Example |
|---|---|---|
| Template body variable | Numbered variables in the approved template text | Your coupon: {{1}} can display a live coupon code. |
| Header media URL | Image or document displayed in the message header | A product image can be retrieved dynamically for each recipient. |
| Button URL parameter | Parameter included in a call-to-action button URL | A personalized URL can include the recipient's user ID. |
The same Content Fetch label can be mapped to multiple templates or variable slots. A variable slot can contain only one label at a time. Mapping a new label to an occupied slot replaces the existing mapping.
Add a Content Fetch Label
Follow the steps below to map a Content Fetch label to a WhatsApp template:
- Navigate to Content > WhatsApp Templates in the Netcore CE panel.
- Open the WhatsApp template to be personalized, or select Create a new template.
- Under Configure template, navigate to Message content.
- In the Header or Body field, select the Personalisation icon.
- Select Content fetch.
- Select an Active Content Fetch connection from the searchable dropdown.
- Select the Content Fetch label to be mapped.
- Enter a fallback value for the label.
- Repeat the process for each variable slot, header media URL, or button URL parameter that requires personalization.
- Save the template.
Configure a Dynamic Carousel
Content Fetch can be used to populate product information in a Dynamic Carousel instead of configuring a static set of cards.
Follow the steps below to configure a Dynamic Carousel:
-
Open a Carousel WhatsApp template.
-
Under Select type, select Dynamic.
-
Under Choose products to display, select Content fetch.
-
Select the Content Fetch connection to be used.
-
Hover over the information icon to view the connection identifier.
-
Configure the first card:
- Under Choose type, select URL or Upload image.
- Enter the card body text.
- Add at least one button.
-
Configure the Content Fetch labels for the dynamic values.
-
Save the template.
In a Dynamic Carousel, the content structure is defined for the first card. The media type, text, and buttons remain consistent across the cards, while media and variable values can be personalized for each card.
Dynamic Carousel requirements
- At least one button is required in a Carousel template.
- Button types must be the same across all cards.
- The media format must be the same across all cards. For example, if images are used, all cards must use images.
Failure Handling
Content Fetch failures are handled at the recipient level. An API failure for one recipient does not affect the processing of other recipients.
| Failure | WhatsApp behavior |
|---|---|
| Missing or null value | The fallback is used where applicable. A required value without a usable fallback can cause the message to be skipped. |
| API timeout or error | The configured fallback or failure behavior is applied. |
| Invalid API response | Required values can fail, while optional values can use their fallback. |
| One field fails while other fields succeed | The affected field uses its fallback where applicable. |
| One connection fails in a message using multiple connections | Values from the failed connection use their configured fallback where applicable. |
| API request fails for one recipient | Only the affected recipient uses the fallback or is skipped. Other recipients continue to be processed. |
| All fetched values fail and no fallback is available | The send is blocked and a warning is displayed. |
Recipient-level failure handlingContent Fetch failures are isolated to individual recipients. If an API request fails for one recipient, the configured fallback or failure behavior is applied to that recipient while the remaining recipients continue to be processed.
Character Limits
- WhatsApp applies character limits to template content and variables.
- The length of a Content Fetch value is known only after the API response is received. Therefore, character-limit validation is performed after the fetched value is inserted into the message.
- If the rendered message exceeds the applicable limit, the send is blocked and the panel identifies the variable that exceeds the limit.
Fallback values should also remain within the applicable character limits.
Preview a WhatsApp Template
The template can be previewed with a real user before activation.
The preview uses the selected user's live attributes and makes a live request to the Content Fetch API.
Manage Content Fetch Connections
Content Fetch connections use the same connection states as App Push.
Connection States
| State | Description | Usable in WhatsApp? |
|---|---|---|
| Active | The connection has been activated after a successful test. | Yes, provided every mapped label has a fallback. |
| Inactive | An active connection has been deactivated. | No new usage. Existing usage is preserved with a warning. |
An Active connection can be used for App Push and WhatsApp. However, WhatsApp template usage also requires a fallback for each Content Fetch label mapped to the template.
Edit, Deactivate, or Remove a Connection
Content Fetch connections can be Edited, Deactivated, or Removed.
Each action displays a confirmation pop-up listing the campaigns and journeys that could be affected.
For WhatsApp, the impact information also includes templates that use the connection. This provides visibility into the templates, campaigns, and journeys affected by the change.
Select:
- Okay to proceed.
- Cancel to retain the current configuration.
Troubleshooting and FAQs
Q. Why does a Content Fetch label require a fallback value?
A. The template cannot be attached to a campaign or journey until a fallback value is added for every Content Fetch label mapped to the template.
Q. What happens if a variable slot is already mapped to a Content Fetch label?
A. Mapping another Content Fetch label to the same variable slot replaces the existing mapping after confirmation.
Q. What happens if a WhatsApp template with a Content Fetch mapping is re-approved?
A. If Meta revokes or re-approves a template with a Content Fetch mapping, the mapping is retained but flagged for review before the next send.
Q. What happens if a Content Fetch connection is deactivated?
A. If a Content Fetch connection is deactivated while it is being used by a WhatsApp template, the impact warning identifies the affected templates, campaigns, and journeys.
Q. What should be checked if a WhatsApp message is not delivered?
A. Check whether a required Content Fetch value was empty and whether a fallback value was configured. The template can then be previewed with a valid Primary Key to verify the fetched values and fallback behavior.
Q. Can an existing App Push Content Fetch connection be used for WhatsApp?
A. Yes. Content Fetch connections are channel agnostic. An existing App Push connection can be selected while configuring the WhatsApp template. Fallback values must be added to the labels used in the template.
Q. Which Content Fetch connection types are supported?
A. The connection types supported for App Push in this phase are GET and POST JSON APIs.
Q. Can Content Fetch be used in a session or free-form WhatsApp message?
A. No. Content Fetch for WhatsApp works only with approved WhatsApp templates.
Updated about 21 hours ago
