Personalize patient communications in Marketing Cloud from care-gap and encounter data — with the consent, authorization, and suppression controls that keep HIPAA marketing rules and TCPA out of the risk register.
Tags: healthcare, provider, marketing, personalization, salesforce, population-health
Marketing and Outreach Automation
Objective: Outreach runs on CSV exports pulled by hand, so campaigns go out weeks late, to lists nobody can reproduce, and occasionally to a patient who asked not to be contacted or who died last month. This plan builds a governed pipeline from clinical and encounter data to Salesforce Marketing Cloud, where the audience is rebuilt from source on every send and consent is enforced at send time rather than at export time.
What's Getting Built
- Care-gap / cohort source (System API) — Reads current care-gap and cohort data from the population health layer so audiences are rebuilt from source on every send ·
GET /care-gaps, GET /cohorts/{id}
- Consent and preference (System API) — Resolves consent-to-contact by channel, HIPAA marketing authorization, and communication preference synchronously at send time ·
GET /consent/{patientId}, GET /preferences/{patientId}
- Health Cloud patient (System API) — Reads patient identity and writes send, delivery, and engagement events back so the care team sees what the patient was told ·
GET /patient/{id}, POST /engagement-events
- Marketing Cloud (System API) — Hands the minimized audience member to Marketing Cloud and triggers the journey for the actual send ·
POST /audience-members, POST /journeys/{id}/trigger
- Audience build (Process API) — The single gate that assembles the audience, enforces consent, applies suppression last, and minimizes payload before send ·
POST /audiences/assemble, POST /send
- Campaign trigger and status (Experience API) — Lets the marketing team self-serve campaign launches and check status without a data pull request ·
POST /campaigns/{id}/trigger, GET /campaigns/{id}/status
Care-gap and cohort data is best sourced from the Population Health Management: FHIR to HealthLake pipeline rather than queried directly out of the EHR.
Prerequisites
- Anypoint Platform org with a CloudHub, Runtime Fabric, or hybrid deployment target.
- MuleSoft Accelerator for Healthcare API-led project structure imported from Exchange as the starting layout.
- Salesforce Marketing Cloud tenant with a signed BAA and Health Cloud as the patient system of engagement.
- A consent and communication-preference store of record, and legal sign-off on which campaigns are operations versus marketing.
- Access to the care-gap or cohort source — HealthLake, a population health platform, or the EHR registry.
Choose your path
- Treatment and health care operations outreach — Choose for appointment reminders, care-gap closure, screening recall, and post-discharge follow-up. Permitted under HIPAA without marketing authorization, but still subject to preference, channel, and TCPA rules.
- Marketing requiring authorization — Choose for service line promotion, events, and anything where a third party pays for the communication. Requires prior written authorization captured and honored — and it must be a distinct, auditable audience path, not a flag on the same one.
Architecture
1. Business requirements
- Build audiences from current clinical and encounter data, reproducibly, without a manual export.
- Enforce consent, authorization, and channel preference at send time — the state at export time is already stale.
- Suppress deceased patients, opt-outs, and active complaints on every send, unconditionally.
- Personalize on clinically meaningful attributes without putting diagnosis detail into a channel that is not permitted to carry it.
- Attribute outcomes — appointments booked, screenings completed — back to the campaign that drove them.
2. Consent, authorization, and preference management
- Model three separate things: consent to contact by channel, HIPAA marketing authorization, and communication preference. They are not interchangeable and a single opt-in flag will eventually be wrong.
- Expose a consent API that both the Process API and any channel can check synchronously; never cache a consent decision beyond a send.
- Record the provenance of every opt-in and opt-out — source, timestamp, and the exact wording presented — because this is what gets produced in a complaint.
- Honor an opt-out within the regulatory window across every channel and every campaign, not just the one it came from.
3. Audience building from clinical data
- Rebuild audiences from source on each send rather than storing a segment that quietly ages.
- Apply the minimum necessary standard: send Marketing Cloud the identifiers and attributes the campaign genuinely needs, not the full clinical record.
- Keep clinical logic (what counts as an overdue mammogram) in the population health layer, and campaign logic (who gets which message) in the marketing layer. Mixing them makes both untestable.
- Version audience definitions so a campaign that went out in March can be reconstructed exactly.
4. API design
- System APIs: care-gap or cohort source, consent store, Health Cloud patient, and Marketing Cloud.
- Process API: audience assembly, consent enforcement, suppression, and payload minimization — the single gate every campaign passes through.
- Experience API: campaign trigger and status for the marketing team, so they self-serve without a data pull request.
- Never let a channel tool query the clinical source directly; the gate exists so that it cannot be bypassed.
5. Channel orchestration and suppression
- Apply the suppression list last, after audience assembly and after consent, so nothing can be added downstream of the check.
- Enforce frequency capping across campaigns, not within one — patients experience the total, not your campaign boundaries.
- Respect quiet hours and channel-specific regulation (TCPA for SMS and calls, CAN-SPAM for email), keeping the rules in configuration.
- Write send, delivery, and engagement events back to Health Cloud so the care team sees what the patient was told.
6. Error handling and operations
- Fail closed: if the consent service is unavailable, the send does not proceed. An outage is cheaper than an unconsented message.
- Make sends idempotent per patient, campaign, and wave so a retry cannot double-message.
- Route rejected or bounced records to a queue with the reason preserved, and feed hard bounces back to preference management.
- Alert on suppression list staleness, consent service latency, and any campaign whose audience size deviates sharply from its last run.
7. Security and compliance
- Encrypt PHI in transit and at rest.
- Audit-log every access to and modification of patient data.
- Enforce minimum-necessary access for integration operators and support users.
For additional HIPAA controls, API policies, and reference security patterns, see the MuleSoft Accelerator for Healthcare on Anypoint Exchange.
Sample payload — Audience member handed to Marketing Cloud (minimized payload)
{
"campaignId": "mammogram-recall-2026-q1",
"audienceVersion": "3",
"subscriberKey": "HC-0042117",
"channel": "email",
"consent": {
"basis": "healthcare-operations",
"emailOptIn": true,
"smsOptIn": false,
"verifiedAt": "2026-02-11T14:02:09Z"
},
"personalization": {
"firstName": "Jane",
"preferredLanguage": "en",
"dueService": "Screening mammogram",
"lastCompleted": "2024-01-18",
"preferredLocation": "North Clinic"
},
"suppressionChecked": true
}
Testing and validation
- Opt a test patient out and confirm the next send excludes them, including from a campaign that was already assembled.
- Mark a test patient deceased in the source and confirm suppression applies on the very next send with no manual list edit.
- Take the consent service offline and confirm the campaign fails closed rather than sending unverified.
- Run the same campaign wave twice and confirm no patient receives a duplicate message.
- Inspect the Marketing Cloud payload and confirm it carries only the minimum necessary attributes — no diagnosis detail beyond what the campaign requires.
Phased rollout
Phase 1 — Connect
- Stand up System APIs for the consent store, the care-gap source, and Marketing Cloud; prove each independently.
- Agree and document, with legal, which campaign types are operations and which require authorization.
Phase 2 — Map and test
- Run one operations campaign — an appointment or screening reminder — to a small pilot audience with a manual review of the assembled list.
- Complete Testing and validation including opt-out, deceased suppression, and consent-outage behavior before widening.
Phase 3 — Production
- Expand campaign types, enable frequency capping across campaigns, and turn on engagement write-back to Health Cloud.
- Hand the audience versioning, complaint response, and suppression-freshness monitoring to the marketing operations team.
Success metrics
- Zero messages sent to a patient with a recorded opt-out or a deceased flag — reported, not assumed.
- Campaign build time reduced from manual export to self-service, measured as request-to-send elapsed time.
- Care-gap closure rate for targeted cohorts against a matched untargeted baseline.
- Complaint and unsubscribe rate held under the agreed threshold as volume scales.
Configuration checklist
Before first sandbox deploy, complete the shared Healthcare integration configuration checklist — secure property keys, TLS, OAuth, and credential naming conventions are documented once for all Exchange use cases.
8. Implementation starting point
Start from the MuleSoft Accelerator for Healthcare project structure on Anypoint Exchange and keep the Process API as the only path into Marketing Cloud.
Build the consent and suppression gate before the first campaign, not after. Retrofitting it means re-validating every send that already went out.
Source cohorts from the population health layer rather than querying the EHR directly, so clinical logic stays in one place.
Keep frequency caps, quiet hours, and channel rules in configuration — these change with policy far more often than with code.
Troubleshooting
- Patient contacted after opting out — Likely cause: consent was evaluated when the audience was built rather than at send time. Fix: Re-check consent inside the send path and treat the assembled audience as a candidate list, never as an approved one.
- Outreach to a deceased patient — Likely cause: the suppression list refreshes on a slower cycle than the campaign. Fix: Query deceased status live at send time and alert when the suppression source is older than its freshness threshold.
- Audience size collapses without explanation — Likely cause: a source schema change silently dropped the care-gap join. Fix: Assert an expected audience-size range per campaign and abort outside it rather than sending to whoever remains.
- Duplicate messages after a retry — Likely cause: the send was retried without an idempotency key for the campaign wave. Fix: Key sends on patient, campaign, and wave, and make the channel call idempotent on that key.
Deliverable: A governed outreach pipeline that rebuilds audiences from clinical source data, enforces consent and suppression at send time, and writes engagement back to Health Cloud.