Walker Formulation Academy for developers API reference Error catalog OpenAPI
Sections

#Status map

Status: Planned. Canonical lead statuses already exist on the platform today; the public mapping setup PUT /crm/status-map and validation of allowed status values do not. There are no ready-made integrations with amoCRM, Bitrix24, or HubSpot: the examples on this page show how a map could be configured, not a shipped feature. No dates are promised.

Every CRM has its own status names: "New lead", "Negotiations", "Successfully completed". The platform stores leads in canonical statuses, and the status map translates your names into canonical ones and back. This is so that events and agents' action requests speak the same language as your CRM.

Access: leads:write (configuring the map). Paid: no. PII: no.

#Canonical statuses

There are six canonical statuses. The archive is not a status but a flag on a lead.

StatusMeaningDeal stage role
newA new lead, not yet qualifiednew
qualifiedThe lead is qualified: interest is confirmedqualified
proposalAn offer has been made to the customer (for example, a trial lesson)proposal
negotiationNegotiations, preparing for paymentnegotiation
wonSuccess: the customer bought or enrolledwon (the "won" stage)
lostThe lead is lost, a reason is givenlost (the "lost" stage)

The archive works as a mark on a lead: the archived (boolean) and archived_reason fields, for example ai_not_client. The archive is not part of the status map (Leads API).

#Relation to deals

A lead and a deal are different objects. A deal lives in a pipeline and sits at a stage; a lead's status maps to a stage role, not to its name. A pipeline stage has a role (stage_key): new, qualified, proposal, negotiation, won, lost. A tenant can rename a stage freely and in its own language (for example, "Consultation" instead of qualified); the role remains, and automation keeps working. A deal's outcome is determined by the stage marked as won or lost.

An example for a course enrollment pipeline (stage names are configurable; here, the initial Russian ones, translated):

Lead statusDeal stage
newNew
qualifiedConsultation
proposalTrial lesson
negotiationPayment
wonEnrolled (won)
lostDeclined (lost)

The "Partially paid" and "Paid" stages in learning pipelines are found by name, not by role; they do not affect a lead's status map.

#PUT /crm/status-map

Sets the mapping of your CRM's statuses to canonical ones. The map is stored per integration: each integration has its own. The scope is leads:write. PUT is idempotent by nature: a repeated request with the same map gives the same result, and the Idempotency-Key header is accepted and ignored. The request replaces the map entirely.

ParameterTypeRequiredConstraintsExample
mapobjectyesThe key is an external CRM status, the value is one of the six canonical statuses{"Новая заявка":"new"}

The body format (a map wrapper or a flat object) is recorded in the design as {external_status → canonical}. The map wrapper is used below; this is to be settled at release.

Rules:

200 OK response: the saved map ({"map": {...}}).

{
  "map": {
    "Новая заявка": "new",
    "Квалификация": "qualified",
    "Коммерческое предложение": "proposal",
    "Переговоры": "negotiation",
    "Успешно реализовано": "won",
    "Закрыто и не реализовано": "lost"
  }
}

#Examples

curl -X PUT https://formula-cream.pro/api/public/v1/crm/status-map \
  -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" \
  -d '{"map":{"Новая заявка":"new","Успешно реализовано":"won"}}'
# API_KEY=sap_ru_test_EXAMPLE0KEYID_… (an example, not a real key)
await fetch("https://formula-cream.pro/api/public/v1/crm/status-map", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ map: { "Новая заявка": "new", "Успешно реализовано": "won" } }),
});
httpx.put(
    "https://formula-cream.pro/api/public/v1/crm/status-map",
    headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
    json={"map": {"Новая заявка": "new", "Успешно реализовано": "won"}},
)
$ch = curl_init("https://formula-cream.pro/api/public/v1/crm/status-map");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("API_KEY"),
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode(
        ["map" => ["Новая заявка" => "new", "Успешно реализовано" => "won"]],
        JSON_UNESCAPED_UNICODE
    ),
]);

There are no ready-made connectors to these systems. The maps below illustrate what a setup could look like. The stage names in your CRM are almost certainly different; check them against your own pipeline.

Below is one way to match typical stage names. The list of names is given for illustration; the exact names and their set depend on your CRM's version and settings, so check them against your pipeline. The mapping is arbitrary: the same stage can be assigned to different canonical statuses.

CanonicalamoCRMBitrix24HubSpot
newIncoming leadsNew(the first pipeline stage)
qualifiedInitial contactPreparing documentsQualified to buy
proposalDecision makingInvoicePresentation scheduled
negotiationNegotiationsIn progressContract sent
wonClosed - wonDeal wonClosed won
lostClosed - lostDeal failedClosed lost

#Notes

#Open questions