Orkestia
Blog
CRM

Reference

Every crm.* and data.crm.* workflow with who may run it, error codes, limits and troubleshooting

Workflows

Each workflow acts on your current organization and on the Identity app you pass as identity_app_uuid. Read exact inputs and outputs with get_workflow_schema or in the reference catalog.

WorkflowWhoDoes
crm.lead.capturemembersFind or create the contact, open a lead if none is open, log a timeline entry. Idempotent on ref
crm.contact.upsertmembersCreate a contact or update the one with the same phone or email
crm.contact.updatemembersEdit one contact: name, phone, email, owner, tags, attributes, opt-out
crm.contact.eraseowner or adminAnonymize a contact and its timeline, close its open leads
crm.lead.update-stagemembersMove a lead to another stage
crm.lead.assignmembersGive a lead an owner, or clear it
crm.lead.convertowner or adminTurn an open lead into an end user of the app
crm.activity.addmembersAdd a note or message to a contact's timeline. Idempotent on ref
data.crm.contact.listmembersPage contacts
data.crm.contact.getmembersOne contact with its leads and timeline size
data.crm.lead.listmembersPage leads
data.crm.activity.listmembersPage one contact's timeline

"Members" means members of your organization. Your app's end users cannot run any of them.

Errors

CodeMeans
CRM_ACCESS_DENIEDThe run was made for an end user, or the organization_uuid passed does not match your token
CRM_ADMIN_REQUIREDConverting and erasing need an organization owner or admin

Input problems fail the run with a readable failure_reason, listed under Troubleshooting.

Limits

LimitValue
Tags per contact16, each up to 64 characters
attributes, source_detail, timeline dataJSON object, up to 8 KB per call
Timeline body20,000 characters
Name256 characters
ref255 characters
Stage, source, channel, kindLowercase slug: starts with a letter, then a-z, 0-9, _, ., -, up to 32 characters
pipeline_keySame rule, up to 64 characters
data.crm.lead.list, data.crm.activity.list50 rows by default, at most 100
data.crm.contact.list25 rows by default, at most 50
data.crm.contact.getThe contact's 50 most recent leads
Timeline body in listsFirst 2,000 characters
Contact search120 characters

Troubleshooting

You seeDo this
phone_e164, wa_id or email is requiredSend at least one way to reach the person
phone_e164 must be an E.164 numberUse the country code, for example +5511999998888
identity_app_uuid is not an identity app of this organizationCheck the app id with identity.app.query
owner_user_uuid is not a member of this organizationPick an owner from identity.membership.query
the contact already has an open lead in this pipelineClose or move the other lead first, or use another pipeline_key
use crm.lead.convert to convert a leadconverted cannot be set with crm.lead.update-stage
a converted lead is finalOpen a new lead for the contact with crm.lead.capture
lead is lost; reopen it (crm.lead.update-stage) firstOnly open leads convert
the contact has no phone; pass end_user_uuid ...Create the end user with identity.end-user.create, then convert with its id
another contact already has this phone (or email)Two contacts cannot share a phone or email. Edit the other contact first
a contact keeps a phone or an emailDo not clear both
contact was erasedErased contacts cannot be edited. Capture the person again to start a new contact
ref is already recorded on another contact's timelineEach ref belongs to one contact. Use a different id
A capture returns deduplicated: true and changed nothingThat ref was already recorded. This is the retry protection working
A value you stored in attributes is missing from a listLists leave out attributes. Read the contact with data.crm.contact.get