Guide
Custom fields
Define fields such as plan, seats or trial end, set them from your server with the exact JSON shape, and use them in audiences, journeys and email.
Custom fields are the facts about a person that your app knows: their plan, seat count, trial end date, role. HelpWell stores them on the contact, types them, and lets audiences, journeys and email read them.
#Define a field
Open Settings → Fields and events and open a field. It shows the name you use in API calls under From your app, send, and Show the JSON gives an example of the JSON that sets it.
- New field creates one before your app sends a value, so a journey can use it today. Choose its key, label and type.
- A field your app sends appears on its own the first time, with a type guessed from the value. Lock type fixes it; from then on values are converted to that type and a value that cannot be is refused.
- Keys: a letter, then letters, digits or underscores, at most 60 characters (
seats,trial_ends,plan_tier). Keys match a defined field without regard to case.
You can define fields from your server too, with POST /fields (scope contacts:write). It never changes a type a person locked: the same type answers 200, another type 409 field_type_locked.
curl -X POST "$HELPWELL_API_URL/fields" \
-H "Authorization: Bearer $HELPWELL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: field-seats" \
-d '{
"key": "seats",
"label": "Seats",
"type": "number",
"description": "Paid seats on the account"
}'// env: your server runtime’s environment (process.env, Deno.env, a Worker’s env).
const response = await fetch(`${env.HELPWELL_API_URL}/fields`, {
method: 'POST',
headers: {
Authorization: `Bearer ${env.HELPWELL_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': 'field-seats',
},
body: JSON.stringify({
key: 'seats',
label: 'Seats',
type: 'number',
description: 'Paid seats on the account',
}),
});
const data = await response.json();
if (!response.ok) throw new Error(`HelpWell: ${data.error.code}`);const response = await fetch(`${process.env.HELPWELL_API_URL}/fields`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.HELPWELL_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': 'field-seats',
},
body: JSON.stringify({
key: 'seats',
label: 'Seats',
type: 'number',
description: 'Paid seats on the account',
}),
});
const data = await response.json();
if (!response.ok)
throw new Error(`HelpWell ${response.status} ${data.error.code}: ${data.error.message} (${data.requestId})`);import os
import requests
response = requests.post(
f"{os.environ['HELPWELL_API_URL']}/fields",
headers={
"Authorization": f"Bearer {os.environ['HELPWELL_API_KEY']}",
"Idempotency-Key": "field-seats",
},
json={
"key": "seats",
"label": "Seats",
"type": "number",
"description": "Paid seats on the account",
},
timeout=10,
)
response.raise_for_status()
data = response.json()GET /fields (scope contacts:read) lists every field with its type and set: where a write sets it.
#Types
| Type | Send | Stored as | Conditions offer |
|---|---|---|---|
| Text | "Growth" | text, up to 1,000 characters | is, is not, contains, does not contain, is set, is not set |
| Number | 12 or "12" | a number | is, is not, is more than, is less than, is set, is not set |
| Money | 1188.5 or "$1,188.50" | a number | is, is not, is more than, is less than, is set, is not set |
| Date | "2026-11-01" or "2026-11-01T09:00:00Z" | ISO 8601 text | is before, is after, is set, is not set |
| Yes or no | true, or "yes" / "no" | true or false | is, is set, is not set |
| List | ["slack", "github"] or "slack" | up to 100 strings | is, is not, includes, does not include, is set, is not set |
| Event | "2026-10-05T14:03:00Z" | when it last happened | happened, never happened, last happened after, last happened before |
#Which fields you can write
| Field | Set it with | Writable by the API |
|---|---|---|
| Your own fields | attributes.<key> | Yes |
| Email, name | email, name (top level) | Yes |
| Tags | tags.add, tags.remove | Yes |
| Email consent | subscribe or consent (how) | Only with consent |
Stripe fields (stripe.*) | Your Stripe connection | No, read-only |
Enrichment (lf_*), ICP score (icp_*), signed up from | HelpWell | No, read-only |
stripe, tags, enrichment, source and keys starting lf_ or icp_ are reserved: a write that uses them is refused.
#Set fields in API calls
Fields go in attributes of POST /contacts. The exact shape:
{
"externalId": "user_123",
"attributes": {
"plan": "growth",
"seats": 12,
"mrr_usd": 1188.5,
"trial_ends": "2026-11-01",
"beta_user": true,
"integrations": [
"slack",
"github"
],
"old_field": null
}
}
- Attributes merge: keys you leave out keep their values;
nullremoves one. - Values are strings (1,000 characters at most), finite numbers,
true/false, or lists of strings (100 items of 200 characters at most). No nested objects. - Up to 100 fields per call. A value that does not fit a locked type is refused with
400naming the field. - Forms take fields too:
attributesofPOST /forms/submitbecome contact fields. - Reading back: every contact the API returns has its fields under
attributes.
#Where fields show up
- Audiences (Contacts → New audience): rules like "plan is growth" or "trial_ends is before 2026-11-01", with the operators of the field's type. Audiences update as fields change.
- Journeys: If/else branches, entry conditions (Only if), goals and trigger filters all read fields. A date field can start a journey: "3 days before
trial_endsat 9:00", in each person's time zone. - Email personalization: newsletters and journey emails print any field with Liquid,
{{ seats }}or{{ contact.custom.seats | default: "a few" }}, formatted by its type, and show parts only to some people ({% if contact.plan == "growth" %}). Settings → Fields and events shows each field's tag. The original short tags keep their fallbacks ({{plan | your plan}}):
| Tag | Reads | Fallback |
|---|---|---|
{{first_name}} | The recipient's name. | there |
{{company}} | The company contact field, or LeadFuze company name. | your company |
{{plan}} | The plan contact field, or the connected Stripe plan. | your plan |
{{last_article}} | The last_article contact field supplied by your app. | our help center |
{{trial_ends}} | The trial_ends or trial_end contact field, or Stripe trial end. Dates use UTC. | your trial end date |
{{subscription_status}} | The connected Stripe subscription status in words: active, trialing, past due, cancelled. | your subscription |
{{customer_since}} | When they became a Stripe customer. Dates use UTC. | the start |
Everything else, with filters and conditions, is in Personalization and Liquid tags.
- The inbox: the contact panel shows the fields your team pins in Settings → Contact panel.
#Operators by type
| Type | Operators |
|---|---|
| Text | is, is not, contains, does not contain, is set, is not set |
| Number | is, is not, is more than, is less than, is set, is not set |
| Money | is, is not, is more than, is less than, is set, is not set |
| Date | is before, is after, is set, is not set |
| Yes or no | is, is set, is not set |
| List | is, is not, includes, does not include, is set, is not set |
| Event | happened, never happened, last happened after, last happened before |