Merge Tags
A merge tag is a placeholder in a message template. When eCourtDate creates a message, it replaces each merge tag with a value from a record. For example, [ClientFirstName] becomes the first name of the client, and [EventDate] becomes the date of the event.
Merge tags work in these locations:
- Flow message templates
- Auto message templates
- One-off messages in the Agency app
- Messages that the API creates
- Email subject lines
Template:
Hello [ClientFirstName]. Your hearing is on [EventDate] at [EventTime].
Message that the client receives:
Hello Alex. Your hearing is on 11/02/2026 at 09:00 AM.
How eCourtDate Replaces Merge Tags
eCourtDate replaces the merge tags when it creates the message. The message keeps the final text. A later change to a record does not change the messages that eCourtDate created before the change.
For each message, eCourtDate does these steps:
- It finds each merge tag in the template.
- It gets the value for the tag. The source is the
mergeobject of an API request, an attached record, the agency settings, or the date and time. - It replaces the tag with the value.
- If the tag has no value, it removes the tag.
- It removes extra spaces and all square brackets from the text.
Rules for Writing Merge Tags
- Type the tag name as the tables on this page show it. eCourtDate ignores the difference between uppercase and lowercase letters, but the spelling in the tables makes templates easier to read.
- Put the tag name between square brackets, for example
[EventDate]. Do not put spaces in the brackets. - Do not translate tag names. A Spanish template uses
[EventDate], the same as an English template. - Do not use square brackets for other text. eCourtDate removes all square brackets from the final message.
- Use only the tags on this page. eCourtDate does not replace a name that is not on this page. It removes the brackets and keeps the name as text. For example,
[CourtroomNumber]becomesCourtroomNumberin the message.
Conditional Labels
A label is text that comes before a value, such as Case Number:. If a template has a label and the tag has no value, the message shows the label with nothing after it:
Case Number: [CaseNumber]
If the case number is empty, the message shows Case Number: and no value.
To show the label only when the tag has a value, put the label in the tag. Write the label between two % signs, then the tag name: [%label% TagName].
[%Case Number:% CaseNumber]
- If the case number is
12345, the message showsCase Number: 12345. - If the case number is empty, eCourtDate removes the label and the tag.
Rules for conditional labels:
- The space between the second
%sign and the tag name is optional.[%Case Number:% CaseNumber]and[%Case Number:%CaseNumber]give the same result. - eCourtDate adds one space between the label and the value. Write the label as it must show, for example with a colon at the end.
- The label text can be in any language. The tag name stays in English, for example
[%Número de caso:% CaseNumber]. - An agency can change the name of a term in its label settings, for example
JudgetoMagistrate. If the label text is the same as that term, eCourtDate shows the new name. For example,[%Judge% JudgeName]then showsMagistratebefore the judge name.
Use conditional labels when a template has many optional values:
[ClientFirstName], here are your details:
[%Case Number:% CaseNumber]
[%Attorney:% AttorneyName]
[%Balance Due:% OutstandingBalance]
eCourtDate removes the label and the tag from each line that has no value. The line break stays, so the message shows an empty line in that position. To prevent empty lines, put the optional tags on one line, for example [%Case:% CaseNumber] [%Attorney:% AttorneyName].
What Each Tag Needs
Most merge tags get a value only from a record that is attached to the message. A record becomes attached to a message in these ways:
- Automatic attachment: When an event, payment, warrant, or sent file starts a flow message or an auto message, eCourtDate attaches that record to the message.
- Record screen: When a user writes a one-off message from a record screen in the Agency app, eCourtDate attaches that record to the message.
- API request: The request gives the UUID of the record in a field such as
client,event, orpayment. See Messages.
| Tag group | What is necessary for a value |
|---|---|
| Agency, Date and Time, Schedule, Utility | Nothing. These tags get values from the agency settings or from the current date and time. |
| Client | An attached client. |
| Contact | An attached client. The contact tags also use the recipient address of the message. |
| Assigned User | An attached client that is assigned to a user. |
| Assigned Organization | An attached client that is assigned to an organization. |
| Event | An attached event. |
| Next Event | An attached client that has an event today or later. |
| Payment | An attached payment. [TotalPayments] and [OutstandingBalance] need only an attached client. |
| Warrant | An attached warrant, or an attached client that has a warrant. |
| File | An attached sent file. |
| Check-In | An attached check-in. |
| Location | A location attached to the message, or a location on the attached event or payment. |
| Judge | An attached event that has a judge name. [PrimaryJudge] and [RandomJudge] need nothing. |
| Case, Attorney | A case with the same case number as the message, the attached payment, or the attached event. |
| Links and Portals | [OptoutURL] and [MessageURL] need nothing. The portal tags need an agency portal. [FlowName] needs a message from a flow. |
| Submission | A form submission as the data source of an Auto Docs document. These tags do not work in messages. |
If the necessary record is not attached, eCourtDate removes the tag from the message.
Some tags can also get a value from the merge object of an API request. Then the tag does not need an attached record. See Per-Request Values in the API.
Available Merge Tags
Agency
| Merge Tag | Description |
|---|---|
[AgencyName] | Agency name. |
[AgencyReference] | Agency reference. |
[AgencyPhone] | Agency phone number. |
[AgencyEmail] | Agency email address. |
[AgencyWebsite] | Agency website URL. |
[AgencyAddress] | Agency street address. |
[AgencyAddress2] | Agency address line 2. |
[AgencyCity] | Agency city. |
[AgencyState] | Agency state. |
[AgencyZip] | Agency ZIP code. |
[AgencyLogo] | Agency logo as an HTML image, 100 pixels wide. Use this tag in email messages only. |
These tags get values from the agency settings. They do not need an attached record. Keep the agency settings current, because each message uses the values that are in the settings when eCourtDate creates the message.
Assigned User
| Merge Tag | Description |
|---|---|
[AssignedUserName] | Name of the assigned user. |
[AssignedUserPhone] | Phone number of the assigned user. |
[AssignedUserEmail] | Email address of the assigned user. |
These tags get a value only when the attached client is assigned to a user (a staff member).
Assigned Organization
| Merge Tag | Description |
|---|---|
[AssignedOrganizationName] | Organization name. |
[AssignedOrganizationPhone] | Organization phone number. |
[AssignedOrganizationEmail] | Organization email address. |
[AssignedOrganizationWebsite] | Organization website URL. |
[AssignedOrganizationAddress] | Organization address. |
[AssignedOrganizationVirtualLink] | Link to the virtual meetings of the organization. |
These tags get a value only when the attached client is assigned to an organization.
Client
| Merge Tag | Description |
|---|---|
[ClientName] | First name and last name of the client. If both are empty, the name field of the client. |
[ClientFullName] | First name, middle name, and last name of the client. |
[ClientFirstName] | First name of the client. |
[ClientMiddleName] | Middle name of the client. |
[ClientMiddleInitial] | First letter of the middle name, in uppercase. |
[ClientLastName] | Last name of the client. |
[ClientInitials] | First letters of the first, middle, and last names, with periods between them, for example A.J.D. |
[ClientGroup] | Client group, for example defendant or victim. |
[ClientReference] | Client reference. |
[ClientType] | Client type. |
[ClientLanguage] | Language code of the message, for example en or es. This code can be different from the language of the template. See Languages and Translation. |
[ClientStatus] | Client status. |
[ClientGender] | Client gender. |
[ClientBirthDate] | Date of birth of the client, as MM/DD/YY. |
[ClientBirthYear] | Birth year of the client. |
[ClientAge] | Age of the client, in years. |
These tags need an attached client.
Contact
| Merge Tag | Description |
|---|---|
[ContactName] | Contact name. If the contact has no name, the client name. |
[ContactValue] | Phone number or email address of the contact. |
[ContactChannel] | Contact channel. |
[ContactType] | Contact type, for example mobile, home, or work. |
These tags need an attached client. eCourtDate finds the contact from the recipient address of the message.
Next Event
These tags use the next event of the attached client. The next event is the first event that is today or later.
| Merge Tag | Description |
|---|---|
[NextEventDateTime] | Date and time of the next event. |
[NextEventDate] | Date of the next event. |
[NextEventTime] | Time of the next event. |
[NextEventReference] | Reference of the next event. |
[NextEventDescription] | Description of the next event. |
[NextEventType] | Type of the next event. |
[NextEventStatus] | Status of the next event. |
[NextEventLocation] | Location name of the next event. |
[NextEventLocationName] | Location name of the next event. |
[NextEventLocationFullAddress] | Full address of the location of the next event. |
[NextEventCaseNumber] | Case number of the next event. |
[NextEventLocationPhone] | Phone number of the location of the next event. |
[NextEventLocationWebsite] | Website of the location of the next event. |
[NextEventLocationDescription] | Description of the location of the next event. |
[NextEventAttorney] | Attorney of the next event. |
Conditions for a value:
- A client is attached to the message.
- The client has at least one event that is today or later. eCourtDate does not use archived or deleted events.
- If an event is attached to the message, eCourtDate uses that event, not the first event of the client.
Event
| Merge Tag | Description |
|---|---|
[EventDate] | Event date, in the agency date format. |
[EventTime] | Event start time, in the agency time format. |
[EventEndTime] | Event end time, in the agency time format. |
[EventDateTime] | Event date and start time, in the agency date and time formats. If the event has no time, the date only. |
[EventDateDiff] | Time from now to the event date, for example 3 days from now. |
[EventDateTimeDiff] | Time from now to the event date and time. If the event has no time, eCourtDate uses 8:00 AM. |
[EventReference] | Event reference. |
[EventDescription] | Event description. |
[EventStatus] | Event status. |
[EventType] | Event type. |
[EventURL] | Event URL. The URL must contain http. |
[EventNotes] | Event notes. |
[VirtualNotes] | Notes for a virtual event, such as instructions to join. |
[EventsCount] | Number of events of the client that are today or later and not archived. |
Conditions for a value:
- Start the message from the event through a flow or auto message, or write a one-off message from the event. This attaches the event to the message.
- Open the message and make sure that the event shows as attached.
If no event is attached, eCourtDate removes these tags from the message.
Links and Portals
| Merge Tag | Description |
|---|---|
[OptoutURL] | Link that the recipient uses to opt out of messages. |
[PortalURL] | Link to the agency portal. |
[PortalOptout] | Link to opt out on the agency portal. |
[MessageURL] | Link to the message. |
[FlowName] | Name of the flow that sent the message. |
[OptoutURL] and [MessageURL] use the link of the message, so they get a value in all sent messages. [PortalURL] and [PortalOptout] need an agency portal. [FlowName] gets a value only when a flow sends the message, or when a flow sent the attached event.
Location
| Merge Tag | Description |
|---|---|
[Location] | Location name. |
[LocationName] | Location name. |
[LocationFullAddress] | Location name, street address, address line 2, city, state, and ZIP code, with commas between them. |
[LocationAddress] | Street address. |
[LocationAddress2] | Address line 2. |
[LocationCity] | City. |
[LocationCounty] | County. |
[LocationState] | State. |
[LocationZip] | ZIP code. |
[LocationLink] | Map link of the location. |
[LocationInstructions] | Location instructions. |
[LocationPasscode] | Location passcode. |
[LocationNotes] | Location notes from the attached event or payment. |
[LocationPhone] | Location phone number. If the location has no phone number, the agency phone number. |
[LocationEmail] | Location email address. If the location has no email address, the agency email address. |
[LocationWebsite] | Location website. |
[LocationDescription] | Location description. |
[LocationBusinessHours] | Business hours of the location. |
These tags get a value from a location attached to the message, or from the location of the attached event or payment.
Judge
| Merge Tag | Description |
|---|---|
[JudgeName] | Judge name from the attached event. |
[JudgeReference] | Judge reference. |
[JudgeType] | Judge type. |
[JudgeDescription] | Judge description. |
[JudgeAddress] | Judge address. |
[JudgeFullAddress] | Full address of the judge. |
[JudgeRoom] | Room number of the judge. |
[JudgePhone] | Judge phone number. |
[JudgeEmail] | Judge email address. |
[JudgeWebsite] | Judge website. |
[JudgeLink] | Judge link. |
[JudgeVirtualLink] | Link to the virtual meetings of the judge. |
[JudgeVirtualCode] | Code for the virtual meetings of the judge. |
[PrimaryJudge] | The name in the Primary Judge Name setting of the agency. If the setting has more than one name, with commas between them, eCourtDate uses the first name. |
[RandomJudge] | The name of a saved judge that eCourtDate selects at random for each message. eCourtDate does not use archived or deleted judges. |
[JudgeName] and the judge detail tags use the judge name on the attached event. eCourtDate finds the saved judge with the same name and uses the details of that judge for the detail tags. [PrimaryJudge] and [RandomJudge] do not need an attached record.
Case
| Merge Tag | Description |
|---|---|
[CaseNumber] | Case number. |
[CaseStatus] | Case status. |
[CaseCodes] | Case codes. |
[CaseType] | Case type. |
[CaseLocation] | Case location. |
[CaseLocationAddress] | Address of the case location. |
[CaseDescription] | Case description. |
[CaseConditions] | Case conditions. |
[CaseWarrantStatus] | Warrant status of the case. |
[FileDate] | File date. |
[OffenseDate] | Offense date. |
[OffenseDescription] | Offense description. |
[OffenseType] | Offense type. |
[ArrestDate] | Arrest date. |
[JudgmentDate] | Judgment date. |
[ArrestTracking] | Arrest tracking number. |
[ArrestingAgency] | Arresting agency. |
[VictimName] | Victim name. |
[OffenderName] | Offender name. |
[NextCaseNumbers] | Case numbers of a maximum of three cases of the client. |
[NextCaseDescriptions] | Case descriptions of a maximum of three cases of the client. |
[NextCaseTypes] | Case types of a maximum of three cases of the client. |
[NextCaseStatuses] | Case statuses of a maximum of three cases of the client. |
[RelatedCaseNumbers] | Case numbers of the other events of the client on the same date. |
Conditions for a value:
- eCourtDate gets the case number from the message. If the message has no case number, it uses the attached payment, then the attached event.
- eCourtDate finds the case with that case number in the client cases. It does not use archived or deleted cases.
- If a client is attached, the case must belong to that client.
- If eCourtDate finds no case and the attached event has a reference,
[CaseNumber]shows the event reference.
If eCourtDate finds no case, it removes the case tags from the message.
The [NextCase...] tags need only an attached client. They show values from a maximum of three cases of that client. [RelatedCaseNumbers] needs an attached event. It shows the case numbers of the other events of the client on the same date.
Attorney
| Merge Tag | Description |
|---|---|
[AttorneyName] | Attorney name. |
[AttorneyFirmName] | Name of the law firm of the attorney. |
[AttorneyPhone] | Attorney phone number. |
[AttorneyEmail] | Attorney email address. |
[AttorneyBarNumber] | Bar number of the attorney. |
These tags get a value when an attorney is assigned to the case. eCourtDate finds the case from the case number of the message, the attached payment, or the attached event. When the case has more than one attorney, the tags name the primary attorney of the case. The primary attorney is the attorney attached first. Thus, when an attorney is added as co-counsel, the attorney that a message names does not change.
Payment
| Merge Tag | Description |
|---|---|
[PaymentAmount] | Payment amount, with a dollar sign and two decimal places, for example $150.00. |
[PaymentDueDate] | Payment due date, in the agency date format. |
[PaymentIssueDate] | Payment issue date, in the agency date format. |
[PaymentNotes] | Payment notes. |
[PaymentDescription] | Payment description. |
[PaymentStatus] | Payment status. |
[PaymentType] | Payment type. |
[PaymentReference] | Payment reference. |
[PaymentLink] | Link to pay the payment. |
[PaymentCitation] | Payment citation. |
[TotalPayments] | Total of all payments of the client, for example $300.00. |
[OutstandingBalance] | Total of the client payments that are not paid, void, canceled, or refunded, for example $125.00. |
Conditions for a value:
- Start the message from the payment through a flow or auto message, or write a one-off message from the payment. This attaches the payment to the message.
- Open the message and make sure that the payment shows as attached.
If no payment is attached, eCourtDate removes these tags from the message.
[TotalPayments] and [OutstandingBalance] do not need an attached payment. eCourtDate calculates them from all payments of the attached client.
Schedule
| Merge Tag | Description |
|---|---|
[UpcomingSchedules] | Today's date and the colors of the schedules for today, for example Monday October 12 is red. |
[CurrentSchedule] | Color of the current schedule, for example red. |
[CurrentSchedules] | Colors of a maximum of five current schedules, with a verb, for example is red or are red and blue. |
These tags get values from the agency schedules. They do not need an attached record. For Spanish messages, eCourtDate writes the colors and the words is, are, and and in Spanish.
Date and Time
| Merge Tag | Description | Example (English) |
|---|---|---|
[CurrentYear] | Current year. | 2026 |
[DateToday] | Today's date, with the day of the week. | Monday October 12 |
[DateTomorrow] | Tomorrow's date, with the day of the week. | Tuesday October 13 |
[DateYesterday] | Yesterday's date, with the day of the week. | Sunday October 11 |
[Date12Hours] | Date 12 hours from now, with the day of the week. | Tuesday October 13 |
[DateNextWeek] | Date 7 days from now. | 10/19/2026 |
[DateNow] | Today's date. | 10/12/2026 |
[TimeNow] | Current time. | 02:30 pm |
[TimeZone] | Abbreviation of the agency time zone. | EDT |
[TimeZoneLong] | Name of the agency time zone. | Eastern Time |
These tags use the date and time when eCourtDate creates the message, in the agency time zone. They do not need an attached record. For example, a message created at 9:00 AM with a 5-minute delay shows 9:00 AM for [TimeNow], not 9:05 AM.
Utility
| Merge Tag | Description |
|---|---|
[RandomTag] | 10 random letters and numbers. Each message gets a different value. |
[RandomNumbers] | A random number with 5 to 10 digits. |
[BusinessHours] | Agency business hours, in the agency time format, for example 08:00 am to 05:00 pm. |
[BusinessFromTime] | Start time of the agency business hours. |
[BusinessToTime] | End time of the agency business hours. |
[BusinessDays] | Agency business days, for example Mon Tue Wed Thu Fri. |
[NextBusinessDay] | Date of the next business day after today, in the agency date format. eCourtDate uses the agency business days. If the agency has no business days, eCourtDate uses Monday to Friday. |
These tags do not need an attached record. The business tags get values from the agency settings.
eCourtDate blocks a message that is a duplicate of a recent message. To send the same text more than one time, for example in a test, add [RandomTag] to the template. Then each message has different content.
Check-In
| Merge Tag | Description |
|---|---|
[CheckinLink] | Check-in link. |
[CheckinURL] | Check-in URL. |
[CheckinName] | Check-in name. |
[CheckinPhone] | Check-in phone number. |
[CheckinEmail] | Check-in email address. |
[CheckinStatus] | Check-in status. |
[CheckinService] | Check-in service. |
[CheckinDepartment] | Check-in department. |
[CheckinLocation] | Check-in location. |
[CheckinLanguage] | Check-in language. |
[CheckinNotes] | Check-in notes. |
[CheckinVirtual] | Check-in virtual link. |
These tags need an attached check-in.
File
| Merge Tag | Description |
|---|---|
[FileName] | File name. |
[FileDueDate] | File due date. |
[FileExpireDate] | File expiration date. |
[FileStatus] | File status. |
[FileLink] | File link. |
These tags need an attached sent file. eCourtDate attaches the sent file when the file starts a flow message or an auto message.
Warrant
| Merge Tag | Description |
|---|---|
[WarrantNumber] | Warrant number. |
[WarrantType] | Warrant type. |
[WarrantStatus] | Warrant status. |
[WarrantCaseNumber] | Case number of the warrant. |
[WarrantBondNumber] | Bond number of the warrant. |
[WarrantIssueDate] | Warrant issue date. |
[WarrantJudge] | Judge of the warrant. |
[WarrantURL] | Warrant URL. |
These tags get values from a warrant attached to the message, or from a warrant of the attached client. eCourtDate attaches the warrant when the warrant starts a flow message or an auto message.
Submission
| Merge Tag | Description |
|---|---|
[SubmissionName] | Submission name. |
[SubmissionStatus] | Submission status. |
[SubmissionDate] | Date that the submission was created, in the agency date format. |
[submission:field] | Answer to one form field. Replace field with the name of the form field, for example [submission:employer]. |
These tags work only in Auto Docs documents that use a form submission as the data source. Do not use them in message templates, because they do not get a value in a message.
Rules for [submission:field]:
- The field name is not case-sensitive. eCourtDate ignores spaces before and after the field name.
- If the form has no field with that name, eCourtDate removes the tag.
- A signature or a photo answer has no text value, so eCourtDate removes the tag.
- A conditional label does not show for this tag. eCourtDate shows only the answer.
Per-Request Values in the API
An API request can give values for some merge tags. Put the values in a merge object in the request body. The tag then gets the value from the request, and it does not need an attached record.
These endpoints read the merge object:
| Endpoint | Location of merge |
|---|---|
POST /v1/messages/oneoffs | At the top level of the request body. |
POST /v1/messages/bulks | In each item of the messages array. Each item can have different values. |
POST /v1/auto_messages/{uuid}/send | At the top level of the request body. eCourtDate uses the values in the messages that the auto message creates. |
POST /v1/preview | At the top level of the request body. eCourtDate returns the merged text and does not send a message. |
POST /v1/messages (send to clients) does not read the merge object. To give per-request values for a client message, use POST /v1/messages/oneoffs with the client field.
Rules for the Merge Object
- eCourtDate uses the value in
merge, not the value from the attached record. - eCourtDate ignores an empty value and uses the value from the record.
- eCourtDate ignores a key that is not in the table below. A custom key does not make a new merge tag.
- The values apply only to the messages in the request. eCourtDate does not save them to the client, event, or other records.
- eCourtDate does not translate the values. Send each value in the language of the template.
Keys and the Tags That Use Them
Key in merge | Tags that use the value | Value format |
|---|---|---|
first_name | [ClientFirstName] | Text |
middle_name | [ClientMiddleName], [ClientMiddleInitial] | Text |
last_name | [ClientLastName] | Text |
client_name | [ClientName] | Text |
client_reference | [ClientReference] | Text |
client_group | [ClientGroup] | Text |
client_type | [ClientType] | Text |
event_date | [EventDate], [EventDateTime], [EventDateDiff] | YYYY-MM-DD |
event_time | [EventTime], [EventDateTime] | 24-hour HH:MM or HH:MM:SS |
event_end_time | [EventEndTime] | 24-hour HH:MM or HH:MM:SS |
event_type | [EventType] | Text |
event_reference | [EventReference] | Text |
event_description | [EventDescription] | Text |
event_status | [EventStatus] | Text |
event_notes | [EventNotes] | Text |
event_url | [EventURL] | Full URL that starts with https:// |
virtual_notes | [VirtualNotes] | Text |
judge_name | [JudgeName] | Text |
location_name | [Location], [LocationName] | Text |
location_address | [LocationAddress] | Text |
location_phone | [LocationPhone] | Text |
location_email | [LocationEmail] | Text |
location_website | [LocationWebsite] | Text |
location_notes | [LocationNotes] | Text |
case_number | [CaseNumber] | Text |
warrant_number | [WarrantNumber] | Text |
warrant_type | [WarrantType] | Text |
payment_amount | [PaymentAmount] | Number, for example 150 or 150.00. eCourtDate adds the dollar sign and two decimal places. |
payment_due | [PaymentDueDate] | YYYY-MM-DD |
payment_issued | [PaymentIssueDate] | YYYY-MM-DD |
payment_status | [PaymentStatus] | Text |
payment_type | [PaymentType] | Text |
payment_reference | [PaymentReference] | Text |
payment_citation | [PaymentCitation] | Text |
payment_notes | [PaymentNotes] | Text |
payment_description | [PaymentDescription] | Text |
eCourtDate writes the date and time keys (event_date, event_time, event_end_time, payment_due, and payment_issued) in the agency date and time formats. The day names, month names, and AM and PM are in the language that the tags use. See Which Language the Tags Use. eCourtDate inserts text values exactly as the request sends them.
A key changes only the tags in its row. For example, first_name changes [ClientFirstName] but not [ClientName]. To change [ClientName], send client_name.
Example: One-Off Message
curl -X POST "$BASE_URL/v1/messages/oneoffs" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to": "+15551234567",
"content": "Hello [ClientFirstName]. Your hearing for case [CaseNumber] is on [EventDate] at [EventTime] at [LocationName].",
"merge": {
"first_name": "Alex",
"case_number": "CR-2026-0001",
"event_date": "2026-11-02",
"event_time": "09:00",
"location_name": "Main Building"
}
}'
With the default agency date and time formats, the content of the message in the response is:
Hello Alex. Your hearing for case CR-2026-0001 is on 11/02/2026 at 09:00 AM at Main Building.
Example: Bulk Messages
curl -X POST "$BASE_URL/v1/messages/bulks" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"to": "+15551234567",
"content": "Hello [ClientFirstName]. A payment of [PaymentAmount] is due.",
"merge": {"first_name": "Alex", "payment_amount": "150"}
},
{
"to": "+15557654321",
"content": "Hello [ClientFirstName]. A payment of [PaymentAmount] is due.",
"merge": {"first_name": "Sam", "payment_amount": "75.5"}
}
]
}'
The first message shows $150.00 and the second message shows $75.50.
Example: Auto Message
curl -X POST "$BASE_URL/v1/auto_messages/{auto_message_uuid}/send" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"client": "{client_uuid}",
"merge": {
"case_number": "CR-2026-0001",
"location_name": "Main Building"
}
}'
The response has status 202. The content in the response is the template before eCourtDate replaces the tags. eCourtDate creates the messages after the response, and then it replaces the tags.
Example: Preview
curl -X POST "$BASE_URL/v1/preview" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content": "Hello [ClientFirstName]. Your hearing is on [EventDate].",
"merge": {"first_name": "Alex", "event_date": "2026-11-02"}
}'
Response (200):
[
{
"content": "Hello Alex. Your hearing is on 11/02/2026.",
"pre_merge": "Hello [ClientFirstName]. Your hearing is on [EventDate]."
}
]
Languages and Translation
What Changes with the Template Language
A merge tag is translated only when the template is translated. eCourtDate writes these values in the language of the template that it sends:
- Day names, month names, and AM and PM in all date and time tags
- The words in
[EventDateDiff]and[EventDateTimeDiff], for example3 days from now - Day names in
[BusinessDays] - Schedule colors and the words
is,are, andandin the Schedule tags (Spanish only) - The word
toin[BusinessHours](Spanish only)
| Tag | English template (en) | Spanish template (es) |
|---|---|---|
[DateToday] | Monday October 12 | lunes octubre 12 |
[EventTime] | 02:30 PM | 02:30 p. m. |
[EventDateDiff] | 3 days from now | en 3 días |
[BusinessHours] | 08:00 am to 05:00 pm | 08:00 a. m. a 05:00 p. m. |
An English template shows English dates and times, also when the preferred language of the client is not English.
eCourtDate writes dates in the language of the template for all languages that have date translations, such as Spanish, French, and Vietnamese. For a language without date translations, such as Navajo or Marshallese, eCourtDate writes dates in English.
What Does Not Change
eCourtDate does not translate other values. Names, addresses, descriptions, notes, statuses, types, and other text values show exactly as they are in the record. Values from the merge object of an API request also show exactly as sent.
For example, if the event description is Arraignment, a Spanish template also shows Arraignment. To send a text value in the language of the client, store the value in that language. Or write the text in the template and do not use a tag.
Which Language the Tags Use
| Message source | Language of the merge tags |
|---|---|
| Flow message | The language of the template that eCourtDate sends. eCourtDate selects the template in the preferred language of the client. If the flow has no template in that language, eCourtDate sends the English template, and the tags are in English. |
| Auto message | The language of the template that eCourtDate sends. eCourtDate selects the template in the preferred language of the client, or in the language field of the API request when there is no client. If there is no template in that language, eCourtDate sends the English template, and the tags are in English. |
| Bulk action | The language of the template that eCourtDate sends. eCourtDate selects the template in the preferred language of the client. If the bulk action has no template in that language, eCourtDate sends the English template, and the tags are in English. |
| One-off message from the API | The language field of the request. eCourtDate does not use the preferred language of an attached client. |
| Bulk message from the API | The language field of each item in the messages array. |
The default language is English (en).
Templates in More Than One Language
A flow has one template for each language. eCourtDate selects the template in the preferred language of the client. If there is no template in that language, eCourtDate sends the English template. The dates and times in that message are also in English. To send the full message in the language of the client, add a template for each language that the clients use.
To write a template in a different language:
- Write the English template first.
- Copy each merge tag into the new template. Do not change the tag names.
- Translate only the text outside the square brackets. The text of a conditional label can also be translated, for example
[%Número de caso:% CaseNumber]. - Preview the template in each language before the flow sends messages.
The Auto Translate button in the flow editor translates the English template into a different language. Auto Translate All Languages does this for all languages of the flow. It keeps the merge tags in square brackets. Read the result and make sure that each merge tag has the same name as in the English template.
For the full setup of languages, templates, and the preferred language of clients, see Multilingual Messaging.
FAQs
What happens when a merge tag has no value?
eCourtDate removes the tag from the message. It also removes the extra spaces that the tag leaves. A label that is outside the tag stays in the message. To remove the label also, use a conditional label.
What happens when a merge tag name is not correct?
eCourtDate does not replace a tag name that is not on this page. It removes the square brackets and keeps the name as text. For example, [EventDat] shows as EventDat in the message. Before a flow sends messages, preview the template to find these errors.
Are merge tag names case-sensitive?
No. eCourtDate replaces a tag with any mix of uppercase and lowercase letters. For example, [eventdate] and [EventDate] get the same value. Type the names as the tables on this page show them, because that spelling makes templates easier to read.
Can an agency make custom merge tags?
No. eCourtDate replaces only the tags on this page. The merge object of an API request also accepts only the keys in the keys table. eCourtDate ignores other keys.
Can a message contain square brackets as text?
No. eCourtDate removes all square brackets from the final message, also brackets that are not part of a merge tag.
Are merge tag values translated?
No. Names, addresses, descriptions, notes, statuses, and other text values show exactly as they are in the record. Only date and time values, and some words in the Schedule and business tags, change with the language of the template. A merge tag is translated only when the template is translated. See Languages and Translation.
Are merge tag names translated in a template for a different language?
No. The tag names are always in English. A Spanish template uses [EventDate], not a Spanish word. Only the text of a conditional label can be in a different language.
Why does a client with Spanish as the preferred language get a message in English?
The flow has no Spanish template, so eCourtDate sends the English template. The dates and times in that message are also in English. To send the message in Spanish, add a Spanish template to the flow.
Which time zone do the date and time tags use?
The agency time zone. [TimeZone] and [TimeZoneLong] show this time zone in the message.
Where do the date and time formats come from?
The event, payment, next business day, and submission date tags use the date format and the time format in the agency settings. The default date format shows 10/12/2026, and the default time format shows 02:30 PM. The tags in the Date and Time group use the fixed formats that the Date and Time table shows.
When does eCourtDate replace the merge tags?
When eCourtDate creates the message. The message keeps the final text. A later change to a record does not change the messages that eCourtDate created before the change. When an event changes, eCourtDate processes the event again and schedules its reminders from the current data. See Events.
Do merge tags change the length of a text message?
Yes. eCourtDate counts the text segments of the final text, after it replaces the tags. A long value, such as a full address, can add a segment to the message.
Do merge tags work in email subject lines?
Yes. eCourtDate replaces merge tags in the subject line and in the body of an email message.
Can [AgencyLogo] be used in a text message?
No. [AgencyLogo] inserts an HTML image. Use it only in email messages.
Can an API request give a value for a tag when no record is attached?
Yes, for the tags in the keys table. Send the values in the merge object of the request. See Per-Request Values in the API.
Can the merge object remove a value from a message?
No. eCourtDate ignores an empty value in merge and uses the value from the attached record. To remove a value, remove the tag from the template.
Why does the merge object have no effect on a message?
Make sure that the request uses an endpoint that reads the merge object. POST /v1/messages does not read it. Also make sure that each key is in the keys table and that the template contains the tag for that key.
How can a template be tested before eCourtDate sends messages?
Use the Preview page in the Agency app, or send the template to POST /v1/preview. Both show the final text and do not send a message. To create a message that eCourtDate stores but does not send, set test to true on POST /v1/messages/oneoffs.