Skip to content
Reference

Salesforce adapter

Read and write Salesforce and Health Cloud records from a workflow with bound SOQL and upserts on an external ID, and start workflows from changed records. Bulk loads, a change trigger and Health Cloud starting maps are still in progress.

In progressThis page describes what's coming, not working steps.

On this page

The Salesforce adapter connects MedHook to Salesforce orgs, including Health Cloud. Healthcare organizations use Salesforce for patient outreach, care management and referral intake, and the data they need there usually starts in an EHR, a lab feed or a payer file. A workflow can take an HL7v2 or FHIR message, map it to Salesforce fields and write the record, and a polling trigger can start a workflow from records that changed in Salesforce so the data goes back.

Record steps, sign-in and polling are here. Bulk loads, a trigger driven by Salesforce change events, composite requests and ready-made Health Cloud maps are still in progress. The adapter's settings and actions are on its reference page.

What MedHook does today

  • Sign-in. OAuth 2.0 client credentials or the JWT bearer flow for a connected app, with the instance URL taken from the token response. The consumer secret and private key are stored encrypted in the adapter profile. The session is reused across calls and renewed once when Salesforce answers that it expired.
  • Record steps. Query with SOQL, read by ID, create, update, delete, and upsert on an external ID field, so a resent message updates the same record instead of creating a second one. Message values are bound into SOQL as literals, never pasted into the query text.
  • Polling. A polling trigger runs a SOQL query with the stored cursor, usually SystemModstamp, and starts the workflow once per new or changed record.
  • Limits. The profile's call limits apply to every step. When Salesforce answers that the API request limit is reached, the error says so (and names the daily allocation when that is what ran out) and the step is retried after a wait. The limits action reads how much of the daily allocation is left.
  • Into MedHook without polling. A Salesforce Flow or Apex callout can still post JSON to a webhook trigger or a path receiver such as /api/webhooks/salesforce/contacts.

What's coming

  • Bulk loads. Bulk API jobs for backfills and nightly rosters, with a per-row result in the execution.
  • Composite requests. A parent and its children written in one call.
  • Change trigger. A trigger that starts a workflow from Salesforce Change Data Capture or Platform Events, without polling. There is also no listener for Salesforce outbound messages, which are SOAP.
  • Health Cloud objects. Starting maps from FHIR R4 to the Health Cloud data model: Person Accounts for patients, and clinical objects such as ClinicalEncounter, HealthCondition, CareObservation and Identifier, plus care management objects such as CarePlan and CareProgramEnrollee. The maps will be a starting point you review in the field mapper, because every org customizes its fields. Today you map these objects yourself and write them with the record steps.

Reference