cadences.runs_advance
Registrar o resultado do passo e gerar a próxima ação. Conclui a tarefa do passo atual com outcome (positive = deu certo; negative ou none = sem sucesso) e faz o que a cadência manda: deu certo pula para a primeira etapa da próxima fase (na última fase, a execução fica completed); sem sucesso cria a tarefa do próximo passo (sem próximo, fica exhausted). Se a oportunidade já tem outra próxima ação aberta, a execução fica paused (existing_next_action) até cadences.runs_resume. Só execução active.
- Endpoint:
POST https://app.atomiks.com.br/api/v1/cadences.runs_advance(corpo JSON) - Quem pode chamar: membro da conta
- Escopo da chave:
crm:write - Grava dados: sim
- Pela chave de API: sim
- Ferramenta MCP:
cadences_runs_advance - Ficha em JSON:
https://app.atomiks.com.br/api/v1/openapi.json(operationIdcadences.runs_advance)
Entrada
| Campo | Tipo | Obrigatório | Nota |
|---|---|---|---|
id | string (uuid) | sim | |
outcome | "positive" | "negative" | "none" | sim |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"outcome": {
"type": "string",
"enum": [
"positive",
"negative",
"none"
]
}
},
"required": [
"id",
"outcome"
]
}Exemplo
curl -X POST https://app.atomiks.com.br/api/v1/cadences.runs_advance \
-H "Authorization: Bearer $ATOMIKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id":"00000000-0000-0000-0000-000000000000","outcome":"negative"}'CLI:
node cli/atomiks.mjs cadences.runs_advance --json '{"id":"00000000-0000-0000-0000-000000000000","outcome":"negative"}'MCP: ferramenta cadences_runs_advance com a mesma entrada.
Saída
Sucesso: {"data": ...} com o formato abaixo.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"cadenceId": {
"type": "string"
},
"cadenceName": {
"type": "string"
},
"opportunityId": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"active",
"paused",
"completed",
"exhausted",
"stopped"
]
},
"statusReason": {
"type": [
"string",
"null"
]
},
"phase": {
"type": [
"number",
"null"
]
},
"phaseName": {
"type": [
"string",
"null"
]
},
"totalPhases": {
"type": "number"
},
"phaseStep": {
"type": "number"
},
"phaseSteps": {
"type": "number"
},
"currentPosition": {
"type": "number"
},
"totalSteps": {
"type": "number"
},
"currentTaskId": {
"type": [
"string",
"null"
]
},
"currentTaskTitle": {
"type": [
"string",
"null"
]
},
"currentTaskStatus": {
"anyOf": [
{
"type": "string",
"enum": [
"open",
"done"
]
},
{
"type": "null"
}
]
},
"nextAt": {
"type": [
"string",
"null"
]
},
"automatic": {
"type": "boolean"
},
"startedAt": {
"type": "string"
},
"finishedAt": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"cadenceId",
"cadenceName",
"opportunityId",
"status",
"statusReason",
"phase",
"phaseName",
"totalPhases",
"phaseStep",
"phaseSteps",
"currentPosition",
"totalSteps",
"currentTaskId",
"currentTaskTitle",
"currentTaskStatus",
"nextAt",
"automatic",
"startedAt",
"finishedAt"
],
"additionalProperties": false
}Erros
{"error": {"code", "message", "requestId"}}. Códigos: invalid_input (400), unauthorized (401), forbidden / account_pending / scope_missing (403), not_found (404), limit_reached (409), internal (500).