My CDP: Contacts, Segments, and Webhooks
My CDP is the customer data platform / address book on Azmarq. It stores people (phone/email), sources, tags, stages, segments, forms, webhooks, and scoring — then feeds SMS, WhatsApp, and RCS audiences, Team Inbox profiles, and Automations intake.
CDP management is portal (login). There is no public POST /v1/cdp and no segmentId on send payloads. The customer-facing ways to add a lead from outside are a public form (by slug) and an inbound webhook (POST to the slug from CDP → Webhooks). See Forms and inbound webhooks.
Portal parent: /contacts/... (default All Contacts). Menu header: My CDP.
What My CDP is
Treat CDP as the system of record for who you message. Channel HTTP is the system of record for the send.
| You need | Use |
|---|---|
| Create or merge a person, store attributes, check opt-in | My CDP in the portal |
| Build an audience | Segments (or a data view turned into a segment) |
| Send WhatsApp, SMS, or RCS | Broadcasts → channel compose, or POST /v1/whatsapp, /v1/sms, /v1/rcs with opted-in destinations |
| Live chat | Team Inbox — sidebar is this profile |
| 24/7 bot | Automations — intake can carry workflowId |
| Delivery receipts | Omni webhooks |
| Contact created / stage / score events | CDP outbound webhooks (portal) |
All Contacts lists profiles CDP has accepted. A chat can exist in the inbox before the CDP copy is written — those are two writes, not one. An entry rule never creates the person; it runs only after the profile exists.
Warehouse (/warehouse) is operational imports and attribute permissions — related, but a separate module. Legacy groups, categories, tags, contact list still appear on compose screens.
Portal tools
| Screen | What you do |
|---|---|
| MarTech Overview | Playbooks / journey overview |
| Lead Intake | Capture a lead (manual, into the pipeline) |
| Form Builder | Build/publish public lead forms (/cdp-forms, /cdp-forms/:formId) |
| All Contacts | Searchable profiles (/cdp-contacts, profile /:contactId) |
| Attributes / custom fields | Define fields; optional PII, segmentation, capture channels |
| Data Views | Saved filtered tables |
| Segments | Dynamic or static audiences (/cdp-segments) |
| Entry Rules | Triggers on intake |
| Webhooks | Inbound/outbound integrations (/cdp-webhooks) |
| Broadcasts | Jump into SMS / WhatsApp / RCS compose with the selected audience |
| CDP Config | Sources, tags, pipeline stages, statuses, scoring |
| Legacy address book | Groups, categories, tags, contact list, attributes, data warehousing |
Key entities
| Entity | Meaning |
|---|---|
| Contact | Person: phone and/or email, name, stage, source, tags, custom fields, opt-ins (optInWa, optInSms, optInEmail, optInVoice) |
| Source | Where the lead came from (sourceType required on intake; sourceName) |
| Segment | Audience: dynamic (filters) or static (member list) |
| Tag / category / group | Labels still used on compose screens |
| Form | Public form by slug |
| Inbound webhook | Public POST by slug into intake |
| Broadcast | Named send that opens a channel composer |
Capture channels on custom fields include: whatsapp, rcs, web_form, api, csv_import, ctwa, wa_direct.
Identity and merge
Match phone first. If there is no phone, match email. A person who arrives again is merged into that profile. Stored values are not deleted. Empty intake does not wipe a field that already has a value.
A contact needs phone or email. sourceType is required on intake.
- Name
phone- Type
- primary key
- Description
Normalised with country code. Search and merge use this value, so
91…and a local number without the country are not the same person.
- Name
email- Type
- fallback key
- Description
Used when the event has no phone. Duplicate policy in CDP Config is merge on phone, then email.
- Name
first source- Type
- sticky
- Description
The path that created the profile stays. Later arrivals are extra sources — that is multi-touch.
- Name
last source / last seen- Type
- updated
- Description
Each new intake or reply updates last source and last seen. First source does not move.
Default country (India unless you change it in CDP Config) is applied when someone types a number without a country code. Set this before import or Lead Intake.
How people enter
Every path writes the same profile. The source name on the contact tells you which path it was.
| Source | What happens | CDP write |
|---|---|---|
| Manual | Lead Intake: a teammate types phone or email | Immediate create or merge |
| Import | CSV or Excel. Rows with neither phone nor email are skipped | Merge per row after column mapping |
| Web Form | Published Form Builder page | Submit creates or merges as Web Form |
| Webhook | Outside system POSTs to the inbound URL from My CDP → Webhooks | Create or merge as Webhook |
| API | Partner / portal intake with phone or email | Not a public Omni apikey route |
| WA Direct | WhatsApp reply that is not from an ad | Channel log first, then CDP with WhatsApp opt-in |
| CTWA | Reply carries a Click-to-WhatsApp referral | Same two-step write as WA Direct, source CTWA |
| RCS | Person replies on RCS | Channel log first, then CDP with RCS opt-in |
| Facebook / Instagram | Lead ads and social intake when those sources are on | Create or merge with that source |
A disabled source in CDP Config rejects new leads of that type.
WhatsApp and RCS replies are saved in the channel log even if the CDP write fails. If the thread is in Team Inbox and the person is missing from All Contacts, CDP did not accept them — usually WA Direct / RCS is off, or the profile lacked a phone/email the matcher can use.
Opt-in is the send gate
A segment membership is not permission to message. Broadcasts and journeys only reach a channel that is opted in and has the right address.
optInWa,optInSms,optInEmail,optInVoiceare stored on the contact.- WhatsApp intake (WA Direct, CTWA, and forms/flows that collect consent) turns WhatsApp opt-in on.
- DND and WhatsApp template policy still apply on the send path. Opt-in in CDP does not bypass WhatsApp template approval or the 24-hour session window.
When you send with the public API, you pass to / number yourself. Only put destinations that are opted in for that channel. CDP will not inject a segment into POST /v1/sms.
Segments and broadcasts
Use a data view when the question is which columns to see. Use a segment when the question is who to message.
- Dynamic segment — rules, recalculated as profiles change.
- Static segment — an explicit list of contacts.
Broadcasts do not send. My CDP → Broadcasts opens the channel compose you already use:
- Build the audience as a segment (or from All Contacts).
- Open WhatsApp, RCS, or SMS Broadcast (
cdpAudience). - Compose on that channel. People without that channel’s opt-in are not valid recipients, even if they sit in the segment.
HTTP send is unchanged: SMS, WhatsApp, RCS.
Forms and inbound webhooks
These are the public (no portal JWT, no Omni apikey) ways to add a lead from your site or app.
| Use | How |
|---|---|
| Public form | Load the form by slug; submit values (+ optional countryCode) |
| Inbound webhook | POST leads to the inbound slug configured in CDP → Webhooks |
Intake identity: a contact needs phone or email. sourceType is required.
Copy the inbound URL from the Webhooks card and treat it as a secret. Switch the webhook off to stop accepting calls without deleting the setup. Do not POST this payload to https://api.azmarq.com with apikey. There is no customer POST /v1/cdp and no public contact-list HTTP API.
Intake fields (webhook / form)
Common fields: phone, countryCode, name, email, sourceType (required), sourceName, sourceRefId, lifecycleStage, leadStage, status, ownerName, eventName, optInWa, optInSms, optInEmail, optInVoice, tags[], notes, city, state, country, customFields, UTM fields, optional workflowId / workflowName / stepKey.
Map those names in the webhook card. Use the field mapper in the portal — the public URL is not the Omni send host.
Legacy add-contact (address book): firstName, lastName, countryCode, number, emailId, groupId[], tags[], category[].
Outbound (CDP → your URL)
CDP calls your HTTPS endpoint when a contact is created, updated, the stage changes, or the score changes. Pick the events on the card. A failed outbound call is counted and does not roll back the contact that was just saved. Respond 2xx quickly; treat deliveries as at-least-once.
These are not SMS DLR, WhatsApp message_status, or RCS callbacks. Configure those on Webhooks. Keep Omni DLR and CDP outbound on different URLs.
How CDP connects
| Product | How CDP feeds it |
|---|---|
| SMS / WhatsApp / RCS compose | Pick segment, source, group, category, or tag (cdpAudience) |
| Team Inbox | Contact sidebar / attributes on the open chat |
| Automations | Intake can carry workflowId / workflowName / stepKey |
| CTWA / forms / CSV / webhook | All land in the same contact profile |
How the four products work together:
- My CDP stores people and segments.
- RCS / SMS / WhatsApp campaigns send to those audiences.
- Replies land in Team Inbox (WhatsApp and RCS).
- Automations answer 24/7 on WhatsApp/RCS; agents can take over or assign back to bot.
- Inbox shows the CDP profile; new leads from forms, CTWA, and webhooks return to CDP.
Until a contacts list API ships, three honest send patterns:
- Portal audience, portal send. Segment → Broadcasts → compose.
- Portal audience, HTTP send. Export opted-in numbers, then
POSTthe channel API withapikey. - Your app → inbound webhook → CDP. POST new people to the inbound slug. Let entry rules tag and segment them.
curl --location --request POST 'https://api.azmarq.com/v1/sms' \
--header 'Content-Type: application/json' \
--header 'apikey: YOUR_API_KEY' \
--data-raw '{
"sender": "AZMARQ",
"to": "91XXXXXXXXXX",
"text": "Hello from a CDP-opted contact",
"type": "TRANSACTIONAL"
}'$API_BASE_URL is https://api.azmarq.com. Same apikey header as Authentication. Store messageId and match delivery reports.
Attributes, rules, and journeys
Attributes are fields you define (City, Budget, a form answer). Capture channels decide which intake paths may write the field. PII can mask the value.
Entry rules watch a profile that was just saved, then act (tag, segment, stage, score, field, outbound webhook). They never create the person.
Journeys live on MarTech Overview. Enrollment happens when a rule (or a later action) puts the contact on that journey. The contact still needs matching opt-in and address.
Console setup
CDP Config applies to new intake. Existing profiles keep their values until something updates them.
| Area | What to set |
|---|---|
| General | Default country, default lifecycle, default status, merge-on-phone-then-email, score recalculation |
| Sources | Label, colour, on/off. Off rejects that intake type |
| Tags | Reusable names for profiles and entry rules |
| Lifecycle | Relationship: Lead, Prospect, Customer, VIP, Churned |
| Pipeline | Sales steps: New, Working, Qualified, Won, Lost |
| Scoring | Base plus source, lifecycle, opt-in, tags, completeness |
Sensible order
- CDP Config — country, sources you actually use, tags, pipeline.
- Attributes — fields that forms, imports, and chats will fill; tick those capture channels.
- Form Builder or Lead Intake — prove one manual lead and one file import appear on All Contacts.
- Send a WhatsApp or RCS reply — confirm source and opt-in.
- Entry Rules — one rule, test, then turn it on.
- Segments — audience from that tag or from a data view.
- Broadcasts — open channel compose for that audience.
- MarTech Overview — confirm profiles, rules, and journeys are moving.
Typical errors
| Situation | What it means |
|---|---|
| Intake without phone and email | Matcher has nothing to key on — row skipped |
Missing sourceType | Required on intake |
| Empty segment | Filters match nobody, or opt-in excluded everyone |
| Inbox thread, no All Contacts row | CDP write failed or source is off |
| Messaging a segment with no opt-in | Membership is not consent |
| Import without default country | One person splits into two profiles |
Expecting POST /v1/cdp | Not published. Use form slug or inbound webhook |
Next: send on SMS, WhatsApp, or RCS; staff Team Inbox; publish Automations.