Customers
A customer is a person or business that buys from the tenant. The CRM keeps one profile per person, even when several platforms know them under different ids.
You can create or update customers in two ways:
- Inside an order. Every order carries its customer, so pushing orders is enough to get your buyers into the CRM.
- On their own, with
POST /integrations/customers. Use this for sign-ups, newsletter subscribers or profile edits that happen without an order.
Push a customer#
POST /v1/integrations/customers. This needs the customers.write scope.
{
"externalId": "C-42",
"firstName": "Selam",
"lastName": "Bekele",
"email": "selam@example.com",
"phone": "0911 23 45 67",
"address": {
"line1": "Bole Road, House 12",
"city": "Addis Ababa",
"state": "Addis Ababa",
"postalCode": "1000",
"country": "ET"
},
"customFields": { "loyaltyTier": "gold", "marketingOptIn": true },
"createdAt": "2026-09-30T08:00:00Z",
"updatedAt": "2026-10-06T09:00:00Z",
"attribution": { "source": "instagram", "campaignCode": "OCT-LAUNCH" }
}
Fields#
| Field | Type | Required | Notes |
|---|---|---|---|
externalId | string ≤ 100 | yes | Your platform's customer id. |
fullName | string ≤ 200 | one of the name fields | Or send firstName / lastName, which are joined. |
firstName, lastName | string ≤ 100 | ||
phone | string ≤ 40 | phone or email | Any format. See Phone numbers. |
email | phone or email | Stored in lower case. | |
address.line1, address.line2 | string ≤ 300 | ||
address.city, address.state | string ≤ 100 | state = region, state or province. | |
address.postalCode | string ≤ 20 | ||
address.country | ISO 3166-1 alpha-2 | e.g. KE. Also used to read a phone number written without +. | |
customFields | object | Up to 50 keys (≤ 64 characters each); values are strings (≤ 1000), numbers, booleans or null. | |
createdAt, updatedAt | ISO 8601 | When the profile was created and last changed on your side. | |
attribution | object | Marketing source of the sign-up. See Attribution. |
Unknown fields are ignored, so it is safe to send more than the CRM uses.
Response#
{ "status": "processed", "eventId": "clx1…", "customerId": "clx2…", "created": true, "updated": false }
created is true when a new profile was made. updated is true when an existing profile changed. A delivery the CRM has already processed comes back with "duplicate": true and the original result.
How customers are matched#
For every customer it receives, in an order or on its own, the CRM looks for an existing profile in this order:
- Your platform +
externalId. Once the CRM has seen your id, it always lands on the same profile. - Phone number, primary or alternative, after normalisation.
- Email address.
If nothing matches, a new profile is created. In both cases your externalId is linked to the profile, so next time step 1 matches straight away. A profile can be linked to ids on many platforms; the read API lists them in identities.
Which values win#
| Arrived via | Existing profile |
|---|---|
POST /integrations/customers | Your values replace stored ones for every field you send. customFields are merged key by key. Fields you leave out are kept. |
| A customer inside an order or a lead | Only empty fields are filled. This keeps old order snapshots from undoing a profile edit. |
A phone number that differs from the stored one never replaces it. It is saved as the alternative number if that slot is free. The CRM records the marketing source of a customer's first contact once and never overwrites it.
Phone numbers#
The CRM stores phone numbers in international E.164 form (+254712345678). You can send them in any common format:
- International (
+254 712 345 678,00254712345678): accepted from any country. - National (
0712 345 678,(415) 555-2671): read inaddress.countryif you send it, otherwise in the tenant's default country, which an admin sets in Settings → Regional. If the tenant has no default country, national numbers cannot be read, so send international form.
If a number cannot be read and the customer also has an email, the customer is still saved. The raw number is kept in customFields.unparsedPhone for staff to fix. If there is neither a readable phone nor an email, the request fails with 422.
Read customers#
These need the customers.read scope.
# One customer by CRM id
curl https://api.abbaycrm.com/v1/integrations/customers/clx2… -H "x-api-key: am_…"
# By your own id (your key's platform is assumed)
curl "https://api.abbaycrm.com/v1/integrations/customers?externalId=C-42" -H "x-api-key: am_…"
# By another platform's id, by email or by phone
curl "https://api.abbaycrm.com/v1/integrations/customers?platform=pos-main&externalId=889" -H "x-api-key: am_…"
curl "https://api.abbaycrm.com/v1/integrations/customers?email=selam@example.com" -H "x-api-key: am_…"
curl "https://api.abbaycrm.com/v1/integrations/customers?phone=0911234567" -H "x-api-key: am_…"
# Everything changed since a point in time, 200 per page
curl "https://api.abbaycrm.com/v1/integrations/customers?updatedSince=2026-10-01T00:00:00Z&limit=200" -H "x-api-key: am_…"
List responses are pages:
{
"data": [ { "object": "customer", "id": "clx2…", "…": "…" } ],
"hasMore": true,
"nextCursor": "eyJ1Ijoi…"
}
Pass cursor=<nextCursor> to get the next page. Keep the other filters the same. Results are sorted by updatedAt, then id, so records that change while you page are never skipped. For an ongoing sync, remember the updatedAt of the last record you processed and use it as updatedSince next time.
The customer object#
{
"object": "customer",
"id": "clx2…",
"fullName": "Selam Bekele",
"phone": "+251911234567",
"phoneAlt": null,
"email": "selam@example.com",
"address": { "line1": "Bole Road, House 12", "line2": null, "city": "Addis Ababa", "state": "Addis Ababa", "postalCode": "1000", "country": "ET" },
"customFields": { "loyaltyTier": "gold", "marketingOptIn": true },
"segment": "customer",
"originalSource": "instagram",
"identities": [
{ "platform": "shopify", "externalId": "C-42" },
{ "platform": "pos-main", "externalId": "889" }
],
"stats": { "totalOrders": 3, "totalRevenue": 7200, "firstPurchaseAt": "2026-09-30T08:10:00.000Z", "lastPurchaseAt": "2026-10-06T09:30:00.000Z" },
"createdAt": "2026-09-30T08:00:00.000Z",
"updatedAt": "2026-10-06T09:31:02.114Z"
}
phonecan benullfor customers known only by email.segmentis managed in the CRM:potentialuntil the first order, thencustomer.stats.totalRevenueis the sum of the customer's paid, non-cancelled order totals. Amounts are added as they are, with no currency conversion.totalOrdersexcludes cancelled orders.- New fields may be added to this object over time; ignore any you do not know.