crm.indicators_activate_score
Ligar ou desligar o Score. Admin. O Score vem desligado; ligado, cada contato soma os pontos das regras que casam (de 0 ao teto). Desligar apaga o número dos contatos ("—"). A conta é recalculada pelo worker.
- Endpoint:
POST https://app.atomiks.com.br/api/v1/crm.indicators_activate_score(corpo JSON) - Quem pode chamar: administrador da conta
- Escopo da chave:
crm:write - Grava dados: sim
- Pela chave de API: sim
- Ferramenta MCP:
crm_indicators_activate_score - Ficha em JSON:
https://app.atomiks.com.br/api/v1/openapi.json(operationIdcrm.indicators_activate_score)
Entrada
| Campo | Tipo | Obrigatório | Nota |
|---|---|---|---|
enabled | boolean | não | padrão true |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"enabled": {
"default": true,
"type": "boolean"
}
}
}Exemplo
curl -X POST https://app.atomiks.com.br/api/v1/crm.indicators_activate_score \
-H "Authorization: Bearer $ATOMIKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled":true}'CLI:
node cli/atomiks.mjs crm.indicators_activate_score --json '{"enabled":true}'MCP: ferramenta crm_indicators_activate_score com a mesma entrada.
Saída
Sucesso: {"data": ...} com o formato abaixo.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"temperature": {
"type": "object",
"properties": {
"modelId": {
"type": "string"
},
"modelName": {
"type": "string"
},
"dimensions": {
"type": "object",
"properties": {
"R": {
"type": "number"
},
"F": {
"type": "number"
},
"P": {
"type": "number"
},
"D": {
"type": "number"
}
},
"required": [
"R",
"F",
"P",
"D"
],
"additionalProperties": false
},
"thresholds": {
"type": "object",
"properties": {
"morno": {
"type": "number"
},
"quente": {
"type": "number"
}
},
"required": [
"morno",
"quente"
],
"additionalProperties": false
},
"channels": {
"type": "object",
"properties": {
"email": {
"type": "number"
},
"msg": {
"type": "number"
},
"page": {
"type": "number"
},
"pay": {
"type": "number"
},
"crm": {
"type": "number"
}
},
"required": [
"email",
"msg",
"page",
"pay",
"crm"
],
"additionalProperties": false
},
"windowDays": {
"type": "number"
},
"halflives": {
"type": "object",
"properties": {
"R": {
"type": "number"
},
"F": {
"type": "number"
}
},
"required": [
"R",
"F"
],
"additionalProperties": false
},
"eventWeights": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
}
},
"required": [
"modelId",
"modelName",
"dimensions",
"thresholds",
"channels",
"windowDays",
"halflives",
"eventWeights"
],
"additionalProperties": false
},
"catalog": {
"type": "array",
"items": {
"type": "object",
"properties": {
"eventName": {
"type": "string"
},
"label": {
"type": "string"
},
"dimension": {
"type": "string",
"enum": [
"R",
"F",
"P",
"D"
]
},
"channel": {
"type": "string",
"enum": [
"email",
"msg",
"page",
"pay",
"crm"
]
},
"baseWeight": {
"type": "number"
},
"weight": {
"type": "number"
},
"teamAction": {
"type": "boolean"
},
"effectiveFrom": {
"type": [
"string",
"null"
]
},
"available": {
"type": "boolean"
}
},
"required": [
"eventName",
"label",
"dimension",
"channel",
"baseWeight",
"weight",
"teamAction",
"effectiveFrom",
"available"
],
"additionalProperties": false
}
},
"activeModelId": {
"type": "string"
},
"models": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"shortName": {
"type": "string"
},
"tagline": {
"type": "string"
},
"description": {
"type": "string"
},
"icon": {
"type": "string"
},
"windowDays": {
"type": "number"
},
"halflifeR": {
"type": "number"
},
"halflifeF": {
"type": "number"
},
"thresholds": {
"type": "object",
"properties": {
"morno": {
"type": "number"
},
"quente": {
"type": "number"
}
},
"required": [
"morno",
"quente"
],
"additionalProperties": false
},
"channels": {
"type": "object",
"properties": {
"email": {
"type": "number"
},
"msg": {
"type": "number"
},
"page": {
"type": "number"
},
"pay": {
"type": "number"
},
"crm": {
"type": "number"
}
},
"required": [
"email",
"msg",
"page",
"pay",
"crm"
],
"additionalProperties": false
},
"dimensions": {
"type": "object",
"properties": {
"R": {
"type": "number"
},
"F": {
"type": "number"
},
"P": {
"type": "number"
},
"D": {
"type": "number"
}
},
"required": [
"R",
"F",
"P",
"D"
],
"additionalProperties": false
}
},
"required": [
"id",
"name",
"shortName",
"tagline",
"description",
"icon",
"windowDays",
"halflifeR",
"halflifeF",
"thresholds",
"channels",
"dimensions"
],
"additionalProperties": false
}
},
"customModels": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"basedOn": {
"type": "string",
"enum": [
"lancamento",
"perpetuo",
"highticket",
"afiliado",
"lowticket",
"ecommerce"
]
},
"thresholds": {
"type": "object",
"properties": {
"morno": {
"type": "integer",
"minimum": 1,
"maximum": 95
},
"quente": {
"type": "integer",
"minimum": 6,
"maximum": 100
}
},
"required": [
"morno",
"quente"
],
"additionalProperties": false
},
"channels": {
"type": "object",
"properties": {
"email": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"msg": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"page": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"pay": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"crm": {
"type": "integer",
"minimum": 0,
"maximum": 100
}
},
"required": [
"email",
"msg",
"page",
"pay",
"crm"
],
"additionalProperties": false
},
"windowDays": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"halflives": {
"type": "object",
"properties": {
"R": {
"type": "integer",
"minimum": 1,
"maximum": 30
},
"F": {
"type": "integer",
"minimum": 1,
"maximum": 30
}
},
"required": [
"R",
"F"
],
"additionalProperties": false
},
"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)$"
}
},
"required": [
"name",
"basedOn",
"thresholds",
"channels",
"windowDays",
"halflives",
"id"
],
"additionalProperties": false
}
},
"limits": {
"type": "object",
"properties": {
"windowOptions": {
"type": "array",
"items": {
"type": "number"
}
},
"halflifeMin": {
"type": "number"
},
"halflifeMax": {
"type": "number"
}
},
"required": [
"windowOptions",
"halflifeMin",
"halflifeMax"
],
"additionalProperties": false
},
"score": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"maxScore": {
"type": "number"
},
"thresholdMedium": {
"type": "number"
},
"thresholdHigh": {
"type": "number"
},
"rules": {
"type": "array",
"items": {
"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)$"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"description": {
"type": "string",
"maxLength": 300
},
"points": {
"type": "integer",
"minimum": -1000,
"maximum": 1000
},
"enabled": {
"type": "boolean"
},
"filters": {
"maxItems": 200,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 64
},
"order": {
"type": "integer",
"minimum": 0,
"maximum": 1000
},
"field": {
"type": "string",
"maxLength": 60
},
"operator": {
"type": "string",
"maxLength": 30
},
"negation": {
"default": false,
"type": "boolean"
},
"parentId": {
"anyOf": [
{
"type": "string",
"maxLength": 64
},
{
"type": "null"
}
]
},
"valueString": {
"anyOf": [
{
"type": "string",
"maxLength": 4000
},
{
"type": "null"
}
]
},
"valueNumber": {
"type": [
"number",
"null"
]
},
"valueDate": {
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
},
"valueBool": {
"type": [
"boolean",
"null"
]
},
"valueUuid": {
"anyOf": [
{
"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)$"
},
{
"type": "null"
}
]
}
},
"required": [
"field",
"operator",
"negation"
],
"additionalProperties": false
}
}
},
"required": [
"id",
"name",
"points",
"enabled",
"filters"
],
"additionalProperties": false
}
}
},
"required": [
"enabled",
"maxScore",
"thresholdMedium",
"thresholdHigh",
"rules"
],
"additionalProperties": false
},
"updatedAt": {
"type": [
"string",
"null"
]
}
},
"required": [
"temperature",
"catalog",
"activeModelId",
"models",
"customModels",
"limits",
"score",
"updatedAt"
],
"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).