Lookup sequence
You can configure one or more lookups in sequence. When a workflow executes, Morf tries each lookup in order and stops as soon as it finds a matching profile. Multiple lookups are useful when the identifying field may not always be present — for example, a new patient may not yet have an EHR ID in Morf, so you fall back to email address. Each lookup specifies:- A field on the event payload — the value Morf will use to search (a CEL expression referencing the payload)
- A profile identifier type — what that value maps to on the Morf profile (e.g. Healthie patient ID, email address, phone number)
Example: multi-step fallback
An intake form submission triggers a workflow. The lookup sequence is:- Try
healthie_patient_id— Skip to next lookup if the field is missing - Try
email_address— Error if the field is missing
If the lookup field is missing
For each lookup, choose what happens if the specified field is not present on the payload:- Error — the event does not proceed through the workflow and appears as an error in the monitoring page
- Skip to next lookup — moves to the next lookup in the sequence
- Continue with execution — shown on the last lookup in the sequence; falls through to the “if no profile is found” action below
- Stop workflow — the event does not proceed through the workflow and appears as a completed execution in the monitoring page
If no profile is found
If all lookups are exhausted without finding a match, choose how the workflow proceeds:- Retry — retry the lookup up to 10 times (useful when a profile may not yet exist but is expected to)
- Create Lead — create a new lead profile and continue the workflow
- Create Patient — create a new patient profile and continue the workflow
- Error — the event does not proceed through the workflow and appears as an error in the monitoring page
- Stop workflow — the event does not proceed through the workflow and appears as a completed execution in the monitoring page
Things to consider when configuring profile lookup
Things to consider when configuring profile lookup
Could this be the first time Morf receives data for this profile? Will the profile already have the application ID, or should contact info be used to perform the lookup?
- e.g. A new contact is created in your CRM, triggering a workflow in Morf. Since this event is the first time the CRM contact ID will be in Morf’s system, the profile lookup should be done using email or phone number.
- e.g. An appointment-triggered workflow may only ever be triggered by patients. However, if it’s an initial appointment, the profile may be a lead. In this case, your workflow should allow for both patients and leads.
