enrich. It’s a two-step pattern:
/resolve— match your records to Minerva PIDs./enrich— fetch profiles, keyed only by the PIDs from step 1.
enrich directly on subsequent runs.
mc.workflows.resolve_then_enrich is the encoded version of step 1 + 2:
await mc.workflows.resolve_then_enrich(...) on an
AsyncMinerva client; same shape.
What it does for you
- Validates the resolve request locally (raises
MinervaValidationErrorbefore any HTTP call). - Splits the resolve results into “matched” + “unmatched” so you don’t have to filter manually.
- Builds the enrich payload from the matched PIDs only — your original fields (emails, names, etc.) don’t get sent on the second call, and the server takes the fast path.
- Skips the enrich call entirely if no records resolved (saves a round-trip
- your daily quota).
When to use it vs. mc.api.enrich directly
| You have… | Use |
|---|---|
| Names/emails/phones, want profiles | mc.workflows.resolve_then_enrich(records) |
| Already-known Minerva PIDs (e.g. from a prior run) | mc.api.enrich(records) with minerva_pid per record |
| LinkedIn URLs | mc.api.enrich(records) — direct lookup, no resolve needed |
Caching the resolved PIDs
If your workflow repeats (e.g. nightly), cache theresult.resolved list and
short-circuit step 1 on the next run: