How to Use Custom Fields and Merge Tags with Custom API
Last updated: October 5, 2026
Introduction
A merge tag is a placeholder in your text. A merge tag looks like {{first_name}}. Outcraft replaces the tag with data from the lead.
A custom field is a data item that you send in the API request. You can use a custom field as a merge tag.
This document tells you how to send custom fields. It tells you how to use them as merge tags. It also tells you what does not work.
What you can do
Send lead data and your own custom fields in one API request.
Use merge tags in selected text fields of your campaign.
Start a campaign only for leads that have a given custom field value.
Get the endpoint URL
Open your campaign.
Open the Lead Source Events page (Onboarding, then Custom API).
Click Connect New API.
Select Create New Endpoint.
Select an event type: Checkout Updated, Checkout Completed, Meeting Requested, or Lead Updated.
Find the section How to connect Custom API events. Copy the URL from the box.
Note
The token is part of the URL. There is no authorization header. Keep the URL secret.
Send data to Outcraft
Send an HTTP POST request to this URL:
POST https://<your-app-url>/api/v1/trigger/<token>Use a JSON body. This is an example:
{
"outcraft_event": "checkout/updated",
"unique_id": "chk_123456",
"phone": "+14155550123",
"email": "john@doe.com",
"first_name": "John",
"last_name": "Doe",
"country_code": "US",
"language": "en",
"timezone": "America/New_York",
"cart_link": "https://example.com/cart/restore/abc",
"final_price": "253.00",
"items": [{ "id": "sku_1", "name": "Wireless Headphones", "quantity": 1, "price": "253.00" }],
"discount_codes": ["WELCOME10"],
"context": { "utm_source": "google", "customer": { "tier": "gold" } }
}4.1 Fields
Field | Rule |
|---|---|
| Required. Use one of these values: checkout/updated, checkout/completed, meetings/requested, leads/updated. |
| Send it. Use a text of 255 characters or less. The guide in the app lists it as required. |
| Send it. Without a phone number, Outcraft ignores the request. See section 4.2. |
| Optional. Outcraft removes an invalid email address. |
| Optional. Use 255 characters or less. |
| Optional. Use 2 letters, for example US. |
| Optional. Use 5 characters or less. |
| Optional. Use 50 characters or less. Outcraft removes an invalid timezone. |
| Optional. Use a number of 0 or more. |
| Optional. Use them for cart data. Each item needs an id. The cart_link must be a URL. |
| Optional. Put your custom fields in this object. The object can hold other objects. |
4.2 Phone number rule
By default, Outcraft ignores a request that has no phone number. Outcraft does not show an error.
To accept leads that have only an email address, set should_verify_phone_presence to false in the request.
Each request must have an email address or a phone number.
4.3 Send the same contact again
Outcraft finds an existing lead by email address or phone number. A new request for the same contact replaces the data of the earlier request. It does not add to it.
Send all custom fields in each request.
5 Make custom fields available as merge tags
Send one request with
outcraft_eventset to checkout/updated. Use your real data, with the context object.Open the Instructions page, the Outreach Channels page, or the AI Agent page of the campaign. Outcraft reads your latest request when the page opens.
In a text editor, click the Custom fields button in the toolbar.
Find your tag in the list. Click the tag to put it in the text. You can also type the tag, for example
{{utm_source}}.
Note
The banner "Custom fields are not loaded yet!" tells you that Outcraft has no request to read. Send a request. Then open the page again.
Caution
Outcraft builds the list of custom fields only from requests with the event type checkout/updated. If you send only other event types, the list shows only the seven default tags.
Note
Outcraft can keep the list for up to one hour. A new field can take that time to show.
5.1 Tag names
The tag name is the last part of the field path. In the example above, context.utm_source gives {{utm_source}}. context.customer.tier gives {{tier}}.
Use lowercase names with underscores in your request. Then the tag name is the same as the field name.
If two fields have the same last part, Outcraft uses the first field that has a value.
A list item does not become a tag. For example, items and discount_codes entries give no tags.
5.2 Default tags
These seven tags are always available. You do not have to send a request first.
Tag | Value |
|---|---|
| First name of the lead |
| Last name of the lead |
| Email address of the lead |
| Phone number of the lead |
| Country code of the lead |
| Timezone of the lead |
| Name of the AI agent |
You can write a tag as {{first_name}} or {{ first_name }}. Both give the same result.
6 Where you can use merge tags
Page | Field | Tags work |
|---|---|---|
Instructions | Campaign Brief | Yes |
Instructions | Guardrails | Yes |
Instructions | Additional Instructions | Yes |
Outreach Channels | Email-specific guidelines | Yes |
Outreach Channels | SMS-Specific guidelines (optional) | Yes |
Outreach Channels | Call conversation flow step, Instructions | Yes |
AI Agent | Call Greeting Phrase | Yes |
AI Agent | Voice Mail Message | Yes |
Outreach Sequence | Edit step, Manual email mode, Email Subject and Email Body | Yes |
Instructions | Discovery Questions | No |
Instructions | Offer and Incentives | No |
6.1 How Outcraft uses the tags
For calls, and for emails and SMS that the AI writes, Outcraft replaces each tag in the instructions that the AI reads. The AI then writes the message in its own words. The value of the tag can be different in the message.
In Manual email mode, Outcraft puts the value in the Email Subject and Email Body exactly as you wrote them.
There is no first-SMS template that accepts tags. For SMS, use the SMS-Specific guidelines field.
7 Start a campaign only for some leads
Use a start condition to check a custom field.
Send at least one real request that has the custom field. See section 7.1.
Open the Start conditions page of the campaign.
Click the sparkle button, Edit conditions with AI.
Write the rule in plain words. For example: Only start for leads with utm_source equal to google.
Click Generate.
Read the new conditions. Click Confirm.
Note
A lead that does not have the field does not pass the condition. Text comparison ignores uppercase and lowercase letters.
7.1 Rules for the AI
The AI uses only fields that it finds in your latest 10 saved requests. It does not make up field names.
Outcraft saves a new sample request at most one time each 12 hours for each account, event, and topic. A new field can take up to 12 hours to be available.
If the AI cannot find the field, the page shows: "Could not turn that into a conditions change. Try naming a field and a value".
7.2 Operators
Operator | Use |
|---|---|
Equals, Not Equals | Compare to a value |
Greater Than, Greater Than Or Equal, Less Than, Less Than Or Equal | Compare numbers |
Contains, Not Contains | Text or list |
Is Empty, Is Not Empty | Check for an empty value |
Is Null, Is Not Null | Check for a missing value |
8 What does not work
Custom fields do not go into the AI prompt automatically. For calls, emails, and SMS, Outcraft gives the AI only the first name, last name, country, email address, phone number, and time data. For cart events, Outcraft can also give the total price and the items.
The AI can use a custom field only if you put its merge tag in a field from section 6.
Merge tags do not work in Discovery Questions or in Offer and Incentives.
Outcraft does not show an unknown tag as blank. It shows the tag as text. For example,
{{foo}}stays{{foo}}.If a tag is known but the lead has no value, Outcraft shows N/A.
A list item cannot be a merge tag.
A new request for the same contact replaces the earlier custom fields.
9 Troubleshooting
Problem | Cause | Action |
|---|---|---|
The banner "Custom fields are not loaded yet!" shows | Outcraft has no request to read | Send a checkout/updated request with a context object. Open the page again. |
Your tag is not in the Custom fields list | The request was not a checkout/updated request, or the list is up to one hour old | Send a checkout/updated request. Wait, then open the page again. |
The text shows | The tag name is not known | Select the tag from the Custom fields list. Check the spelling. |
The text shows N/A | The lead has no value for this field | Send the value in the request. |
No lead is created | There is no phone number, or no email address and no phone number, or outcraft_event is not valid | Add a phone number. Or set should_verify_phone_presence to false and send an email address. Use a valid outcraft_event. |
The email address or timezone is missing on the lead | The value was not valid | Send a valid email address or a valid IANA timezone, for example America/New_York. |
A custom field value is gone after a new request | A new request replaces the earlier data | Send all custom fields in each request. |
The AI does not find your field in Start conditions | The field is not in your latest 10 saved requests | Send a real request that has the field. Wait up to 12 hours. Try again. |