
Merge Fields in MarTech: A Complete Guide
Merge fields let Ajax Union MarTech fill in the right details for every person you contact, so you write a message once and it reads like you wrote it for each customer.
A merge field is a short placeholder wrapped in double curly braces, such as {{contact.first_name}}. When an email or text goes out, or when a document is created, MarTech swaps that placeholder for the real value saved on the matching record. One recipient sees "Jane," the next sees "Tom."
You can use merge fields in emails, SMS messages, invoices, campaigns, automated workflows, and even your Voice AI and Conversation AI agents. The result is communication that stays accurate and consistent without any copy-and-paste work.
A quick note on raw phone numbers: some phone fields come in a "raw" version. Raw format strips out spaces, dashes, and parentheses (for example, +15155552345 instead of (515) 555-2345). Use the raw version when a phone number goes inside a link, a tracking parameter, or needs international formatting.
How to Add a Merge Field and a Fallback Value
Inserting a merge field takes a few clicks. Follow these steps in any MarTech editor that supports them:
Open the email, text message, document, or workflow step you want to personalize.
Place your cursor where the personalized detail should appear.
Open the merge field picker (also called the custom value picker) in the editor and choose the field you need. Using the picker is the safest option, because the exact field names available can differ from one account to another.
To set a fallback value in the email editor, click the custom value tag you just inserted and enter the text that should show if the field is empty (for example, "there" for a missing first name).
Preview or send a test so you can confirm the right values fill in before the message goes live.
For a deeper walkthrough, see the help article How To Use Merge Fields and Fallback Values in MarTech.
Contact Merge Fields
Contact fields pull from the details saved on each contact record. They are the go-to choice for greetings, confirmations, and personal follow-ups.
Field | Merge field | Example |
Full name | {{contact.name}} | Jane Smith |
First name | {{contact.first_name}} | Jane |
Last name | {{contact.last_name}} | Smith |
{{contact.email}} | ||
Phone | {{contact.phone}} | (515) 555-2345 |
Phone (raw) | {{contact.phone_raw}} | +15155552345 |
Company name | {{contact.company_name}} | Smith Plumbing |
Full address | {{contact.full_address}} | 1234 W. Main St, Chicago, IL 60657 |
Address line 1 | {{contact.address1}} | 1234 W. Main St |
City | {{contact.city}} | Chicago |
State/Region | {{contact.state}} | Illinois |
Postal code | {{contact.postal_code}} | 60657 |
Time zone | {{contact.timezone}} | GMT-06:00 America/Chicago |
Date of birth | {{contact.date_of_birth}} | Jan 3, 1980 |
Source | {{contact.source}} | Referral |
Website | {{contact.website}} | |
Contact ID | {{contact.id}} | FZDn5mYlkZuCCQe5Bep8 |
User Merge Fields
User fields pull details about the team member (or sender) linked to the conversation, activity, or appointment.
You can also use them after someone books through a calendar: in the Thank you message on the calendar confirmation page, and on the next funnel step when the Calendar element's redirect action is set to Go to next step.
Field | Merge field | Example |
Full name | {{user.name}} | John Doe |
First name | {{user.first_name}} | John |
Last name | {{user.last_name}} | Doe |
{{user.email}} | ||
Phone | {{user.phone}} | (333) 555-9876 |
Phone (raw) | {{user.phone_raw}} | +13335559876 |
Email signature | {{user.email_signature}} | John Doe, [email protected], (333) 555-9876 |
Booking link | {{user.calendar_link}} | |
Appointment user phone (raw) | {{appointment.user.phone_raw}} | +13335559876 |
External calling number | {{user.call_provider_phone_number}} | (234) 555-9876 |
External calling number (raw) | {{user.call_provider_phone_number_raw}} | +12345559876 |
Good to know: depending on how your account is set up, the external calling number field may show under a different name. Insert it from the merge field picker so you get the exact name your account uses.
Appointment Merge Fields
Appointment fields pull details from a booked appointment. Use them in confirmations, reminders, and reschedule messages so clients always have the right time, place, and links.
Field | Merge field | Example |
Title | {{appointment.title}} | Appointment with Bob |
Start date/time | {{appointment.start_time}} | Wed, Nov 5, 2025 3:30 PM |
Start date only | {{appointment.only_start_date}} | Nov 5, 2025 |
Start time only | {{appointment.only_start_time}} | 3:30 PM |
End date/time | {{appointment.end_time}} | Wed, Nov 5, 2025 4:00 PM |
End date only | {{appointment.only_end_date}} | Nov 5, 2025 |
End time only | {{appointment.only_end_time}} | 4:00 PM |
Day of week | {{appointment.day_of_week}} | Monday |
Month number | {{appointment.month}} | 11 |
Time zone | {{appointment.timezone}} | CST |
Cancellation link | {{appointment.cancellation_link}} | |
Reschedule link | {{appointment.reschedule_link}} | |
Meeting location | {{appointment.meeting_location}} | 123 W Main St, Chicago, IL 60657 |
Notes | {{appointment.notes}} | This is our second meeting. |
Add to calendar link | {{appointment.add_to_calendar}} | |
Google Calendar link | {{appointment.add_to_google_calendar}} | https://booking.example.com/google/calendar/add-event/calendarid |
iCal/ICS link | {{appointment.add_to_ical}} | |
Recurring repeats | {{appointment.recurring.repeats}} | 0 |
Recurring times to repeat | {{appointment.recurring.times_to_repeat}} | 1 |
Assigned user name | John Doe | |
Assigned user email | ||
Assigned user phone | (333) 555-9876 | |
Assigned user phone (raw) | {{appointment.user.phone_raw}} | +13335559876 |
Assigned user signature | {{appointment.user.email_signature}} | John Doe, [email protected] |
Calendar Merge Fields
The calendar field shows which calendar an event belongs to.
Field | Merge field | Example |
Calendar name | {{calendar.name}} | Lawn Services Calendar |
Campaign Merge Fields
Campaign fields handle dates and times for scheduled campaign events.
Field | Merge field | Example |
Event date/time | {{campaign.event_date_time}} | Nov 5, 2025 3:30 PM |
Event date | {{campaign.event_date}} | Nov 5, 2025 |
Event time | {{campaign.event_time}} | 3:30 PM |
Message Merge Fields
Message fields let a workflow or automation reference the content of a message from inside its steps.
Field | Merge field | Example |
Message body | {{message.body}} | Hi, just a quick reminder about our call tomorrow morning. |
Message subject | {{message.subject}} | Meeting Reminder |
Account Merge Fields
Account fields pull your business details. They keep your branding, receipts, and business identity consistent everywhere.
Field | Merge field | Example |
Account name | {{location.name}} | WidgetWorks |
Full address | {{location.full_address}} | 555 Oak St, Tampa, FL 33602 |
Address line 1 | {{location.address}} | 555 Oak St |
City | {{location.city}} | Tampa |
State/Region | {{location.state}} | Florida |
Country | {{location.country}} | US |
Postal code | {{location.postal_code}} | 33602 |
{{location.email}} | ||
Phone | {{location.phone}} | (333) 555-3344 |
Phone (raw) | {{location.phone_raw}} | +13335553344 |
Website | {{location.website}} | |
Logo URL | {{location.logo_url}} | |
Owner first name | {{location_owner.first_name}} | Lisa |
Owner last name | {{location_owner.last_name}} | White |
Owner email | {{location_owner.email}} | |
Account ID | {{location.id}} | DP4mTqaz7L9XpweFvRjC |
Right Now Merge Fields
Right Now fields insert the current date and time at the exact moment the message is created.
Field | Merge field | Example |
Second | {{right_now.second}} | 9 |
Minute | {{right_now.minute}} | 10 |
Hour (24h) | {{right_now.hour}} | 14 |
Hour (AM/PM) | {{right_now.hour_ampm}} | 2 |
AM/PM | {{right_now.ampm}} | PM |
Day of week | {{right_now.day_of_week}} | Tuesday |
Month name | {{right_now.month_name}} | November |
Day | {{right_now.day}} | 4 |
Month (number) | {{right_now.month}} | 11 |
Year | {{right_now.year}} | 2025 |
Date (MM/DD/YYYY) | {{right_now.middle_endian_date}} | 11/4/2025 |
Date (DD/MM/YYYY) | {{right_now.little_endian_date}} | 4/11/2025 |
Attribution Merge Fields
Attribution fields show where a contact came from, both the very first time (first attribution) and most recently (latest attribution). The values usually come from tracking parameters, such as UTM tags, in the links people click.
First Attribution
Field | Merge field | Example |
Session source | {{contact.attributionSource.sessionSource}} | Referral |
Landing URL | {{contact.attributionSource.url}} | |
Campaign | {{contact.attributionSource.campaign}} | fall_sale |
UTM source | {{contact.attributionSource.utmSource}} | ads |
UTM medium | {{contact.attributionSource.utmMedium}} | banner |
UTM content | {{contact.attributionSource.utmContent}} | ad12 |
Referrer | {{contact.attributionSource.referrer}} | |
Campaign ID | {{contact.attributionSource.campaignId}} | 23849260571384729 |
Ad click ID | {{contact.attributionSource.clickId}} | ABC123XYZ |
UTM keyword | {{contact.attributionSource.utmKeyword}} | running_shoes |
UTM match type | {{contact.attributionSource.utmMatchType}} | exact |
Ad group ID | {{contact.attributionSource.adGroupId}} | 123456 |
Ad ID | {{contact.attributionSource.adId}} | 78910 |
Latest Attribution
Field | Merge field | Example |
Session source | {{contact.lastAttributionSource.sessionSource}} | Referral |
Landing URL | {{contact.lastAttributionSource.url}} | |
Campaign | {{contact.lastAttributionSource.campaign}} | xmas_sale |
UTM source | {{contact.lastAttributionSource.utmSource}} | ads |
UTM medium | {{contact.lastAttributionSource.utmMedium}} | banner |
UTM content | {{contact.lastAttributionSource.utmContent}} | ad18 |
Referrer | {{contact.lastAttributionSource.referrer}} | |
Campaign ID | {{contact.lastAttributionSource.campaignId}} | 23850176293047583 |
Ad click ID | {{contact.lastAttributionSource.clickId}} | XYZ789ABC |
UTM campaign | {{contact.lastAttributionSource.utmCampaign}} | blowout_sale |
UTM keyword | {{contact.lastAttributionSource.utmKeyword}} | hvac_repair |
UTM match type | {{contact.lastAttributionSource.utmMatchType}} | broad |
Ad group ID | {{contact.lastAttributionSource.adGroupId}} | 654321 |
Ad ID | {{contact.lastAttributionSource.adId}} | 10987 |
Good to know: some accounts show extra attribution fields tied to specific ad platforms. If you want templates that stay white-label friendly, insert the exact click ID field names from the merge field picker and leave ad platform names out of the text around them.
Invoice Merge Fields
Invoice fields pull values straight from your invoice records. Use them in invoices, receipts, payment confirmations, and payment reminders.
Field | Merge field | Example |
Invoice name | {{invoice.name}} | Consulting Contract |
Invoice number | {{invoice.number}} | 43255 |
Issue date | {{invoice.issue_date}} | 2025-04-05 |
Due date | {{invoice.due_date}} | 2025-10-05 |
Subtotal | {{invoice.sub_total}} | $500.00 |
Discount amount | {{invoice.discount_amount}} | $50.00 |
Tax amount | {{invoice.tax_amount}} | $25.00 |
Total amount | {{invoice.total_amount}} | $475.00 |
Invoice title | {{invoice.title}} | Consulting Invoice |
Invoice link | {{invoice.url}} |
Company Details
Field | Merge field | Example |
Company name | Test Solutions | |
Company phone | (888) 555-9876 | |
Company address | {{invoice.company.address}} | 1234 Maple St |
Company city | Milwaukee | |
Company state | {{invoice.company.state}} | Wisconsin |
Company country | US | |
Company website | ||
Company logo URL | {{invoice.company.logo}} |
Customer Details
Field | Merge field | Example |
Customer name | Tom Taylor | |
Customer first name | {{invoice.customer.first_name}} | Tom |
Customer last name | {{invoice.customer.last_name}} | Taylor |
Customer phone | (222) 555-3456 | |
Customer email | ||
Customer company | Taylor Construction | |
Customer address | {{invoice.customer.address}} | 3333 N. Main St |
Customer city | Chicago | |
Customer state | {{invoice.customer.state}} | Illinois |
Customer postal code | {{invoice.customer.postal_code}} | 60657 |
Sender and Card Details
Field | Merge field | Example |
Sender name | Bob Brown | |
Sender email | ||
Card brand | {{invoice.card.brand}} | Visa |
Card last 4 | {{invoice.card.last4}} | 7654 |
Course Merge Fields
Course fields add course and lesson details to enrollment or content messages.
Field | Merge field | Example |
Category title | {{courses.categoryTitle}} | Getting Started with Knitting |
Product title | {{courses.productTitle}} | Basics of Knitting |
Post title | {{courses.postTitle}} | The Best Types of Yarn |
Service Booking Merge Fields
Service booking fields pull the schedule, price, location, and assigned staff for a service booking.
Field | Merge field | Example |
Title | {{servicebooking.title}} | Men's Haircut |
Start time | {{servicebooking.start_time}} | 3:30 PM |
End time | {{servicebooking.end_time}} | 4:30 PM |
Start date | {{servicebooking.start_date}} | March 6, 2026 |
End date | {{servicebooking.only_end_date}} | March 7, 2026 |
End time only | {{servicebooking.only_end_time}} | 4:30 PM |
Day of week | {{servicebooking.day_of_week}} | Monday |
Month (number) | {{servicebooking.month}} | 3 |
Month name | {{servicebooking.month_name}} | March |
Time zone | {{servicebooking.timezone}} | CST |
Total price | {{servicebooking.total_price}} | $55 |
Meeting location | {{servicebooking.meeting_location}} | 123 Main St, Chicago, IL 60657 |
Meeting location name | {{servicebooking.meeting_location_name}} | Chair 4 |
Reschedule link | {{servicebooking.reschedule_link}} | |
Cancellation link | {{servicebooking.cancellation_link}} |
Service Line Items and Assigned User
These fields describe each individual service, any add-ons, and the staff member assigned to it.
Field | Merge field | Example |
Service name | {{this.name}} | Haircut - Regular |
Service price | {{this.price}} | $125 |
Service duration | {{this.duration}} | 45 mins |
Service start date | {{this.only_start_date}} | March 6, 2026 |
Service start time | {{this.only_start_time}} | 4:30 PM |
Service time zone | {{this.timezone}} | GMT-06:00 America/Chicago |
Add-on name | {{this.addonName}} | Hair Coloring |
Add-on price | {{this.addonPrice}} | $25 |
Add-on duration | {{this.addonDuration}} | 15 mins |
Add-on quantity | {{this.addonQuantity}} | 1 |
Assigned user name | {{this.user.name}} | Jane Smith |
Assigned user email | {{this.user.email}} | |
Assigned user phone | {{this.user.phone}} | (515) 555-2345 |
Assigned user phone (raw) | {{this.user.phone_raw}} | +15155552345 |
Assigned user signature | {{this.user.email_signature}} | Jane Smith, [email protected] |
Fallback Values for Empty Fields
If a record is missing data, its merge field comes out blank. A fallback value fills that gap so your message still reads naturally instead of showing an awkward empty greeting.
In the email editor, click the custom value tag you inserted.
Type the fallback text you want shown when the field is empty.
Save, then preview the message to check it.
Voice AI Merge Fields
In Voice AI, merge fields are called Custom Values. They let your AI phone agent personalize calls using details already saved in MarTech, such as contact, company, appointment, calendar, account, or location information, whenever that data is available for the call.
Custom Values work in agent prompts and in supported message fields. To add one:
Open your agent in the Voice AI builder.
Click into the prompt or supported message field you want to personalize.
Use the Custom Value picker to insert the dynamic detail.
Field | Merge field | Example use |
Contact first name | {{contact.first_name}} | "Hi {{contact.first_name}}, thanks for calling." |
Contact full name | {{contact.name}} | "I see your name is {{contact.name}}." |
Contact email | {{contact.email}} | "We have your email as {{contact.email}}." |
Contact phone | {{contact.phone}} | "Is {{contact.phone}} still the best number to reach you?" |
Company name | {{company.name}} | "I see you are calling from {{company.name}}." |
Location name | {{location.name}} | "Thanks for calling {{location.name}}." |
Location phone | {{location.phone}} | "You can also reach us at {{location.phone}}." |
Location email | {{location.email}} | "Our team can follow up from {{location.email}}." |
Appointment start time | {{appointment.start_time}} | "Your appointment is scheduled for {{appointment.start_time}}." |
Calendar name | {{calendar.name}} | "This appointment is booked on the {{calendar.name}} calendar." |
Good to know: which fields work can change based on the prompt field, whether the call is inbound or outbound, the contact record, the appointment context, and what data your account holds. A value missing from the record may come through blank during the call. For full setup steps, see How to Use Custom Values in Voice AI Agent Prompts.
Conversation AI Merge Fields
Conversation AI merge fields help your chat agents personalize automated conversations with contact, company, location, and other supported data. They are useful in bot prompts, Bot Goals, AI-generated replies, and supported Conversation AI actions.
Open the bot setup area you want to edit.
Use the Custom Value picker to add the merge field, so you know it is supported in that part of the bot.
Test the bot's response to confirm the correct values fill in.
Turn the bot on for live conversations only after the test looks right.
Field | Merge field | Example use |
Contact first name | {{contact.first_name}} | "Hi {{contact.first_name}}, how can I help today?" |
Contact full name | {{contact.name}} | "Thanks, {{contact.name}}. I can help with that." |
Contact email | {{contact.email}} | "I have your email listed as {{contact.email}}." |
Contact phone | {{contact.phone}} | "Is {{contact.phone}} the best number for follow-up?" |
Company name | {{company.name}} | "I see this is related to {{company.name}}." |
Company email | {{company.email}} | "We have the company email listed as {{company.email}}." |
Company phone | {{company.phone}} | "The company phone number on file is {{company.phone}}." |
Location name | {{location.name}} | "You are chatting with {{location.name}}." |
Location email | {{location.email}} | "Our team can follow up from {{location.email}}." |
Location phone | {{location.phone}} | "You can also contact us at {{location.phone}}." |
Bot Goals include prompt settings, actions, and testing tools that shape how your AI agent talks and responds.
Good to know: field availability can depend on the Conversation AI area you are editing, the channel, the bot's configuration, and whether the related contact, company, or location data exists. Fields without saved data may fill in blank. For more, see Bot Goals Overview - Conversation AI and Conversation AI Bot Explained.
Frequently Asked Questions
What happens when a merge field has no value? In most cases it is replaced with nothing, which can leave a sentence looking unfinished, such as "Hi ,". Set a fallback value to avoid this.
How is a standard phone field different from a raw phone field? The raw version drops parentheses, dashes, and spaces. That makes it a better fit for links, tracking parameters, and international numbers.
Can I use merge fields in invoices and payment messages? Yes. You can add invoice numbers, totals, due dates, customer details, and payment links.
Why does my account show different merge fields than someone else's? The fields you see depend on which tools are turned on, how your account is configured, and the type of record you are editing.
How do I avoid a blank greeting when a first name is missing? Use conditional content blocks. One greeting shows when a first name exists, and a different one shows when it does not.
Start Personalizing in MarTech
Log in at app.ajaxunion.com, open any email, text, invoice, or AI agent, and use the merge field picker to add your first personal touch. Need a hand setting it up? The Ajax Union team is happy to help.