Atualizar negócio no Agendor, por uma API

Atualiza os campos enviados e devolve o negócio em data. dealStage move o negócio de etapa, e dealStatusText o ganha, perde ou reabre.

Identificador
agendor_update_deal

A chamada

POST https://connect.reportei.com/api/tools/agendor_update_deal/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json

{
  "customer_toolkit": "<connection UUID>",
  "arguments": {
    "id": 1
  }
}

Seu sistema envia o id da conexão do cliente e os argumentos da tool. Os headers são os mesmos de toda a API do Connect: o token do seu produto e o token do cliente.

Parâmetros

As descrições dos parâmetros seguem a documentação oficial do app, em inglês.

ParâmetroTipoObrigatórioDescrição
idintegerSimId of the deal, from List deals or one of the create deal tools.
titlestringNãoTitle of the deal.
descriptionstringNãoNotes about the deal.
valuenumberNãoMonetary value of the deal.
ownerUserintegerNãoId of the user who owns the deal, from List users.
dealStageintegerNãoPosition of the new stage in the funnel, starting at 1: the sequence of the stage in List funnels, not its id. Send funnel too when the deal is not in the default funnel.
funnelintegerNãoId of the funnel of the new stage, from List funnels.
dealStatusTextstringNãowon or lost finishes the deal, and ongoing reopens it.Valores: ongoing, won, lost
lossReasonobjectNãoWhy the deal was lost. Only with dealStatusText lost.
endTimestringNãoWhen the deal was finished, in ISO 8601.
customFieldsobjectNãoCustom field values keyed by the identifier of each custom field configured in Agendor.

Conexões possíveis

O seu cliente conecta a conta do Agendor uma vez, por um dos modos abaixo. A mesma conexão serve para todas as tools do toolkit.

Chave de API

O cliente cola a chave do app numa tela do Connect, ou o seu sistema envia a chave por POST /api/customer-toolkits, sem tela.

A resposta

Em caso de sucesso, o Connect preserva o status e o corpo da resposta do app. Erros HTTP retornados pelo app usam o envelope {error, api_error}; falhas de autenticação ou validação podem ocorrer antes da execução. O header X-Toolkit-Execution-Id identifica a execução registrada, consultável em GET /api/tools/executions/{uuid}.

Pronta para agentes de IA

O input desta tool é um JSON Schema, disponível em GET /api/tools/agendor_update_deal. Ele vira a definição de tool do seu agente sem conversão.

Veja o Connect aplicado ao seu produto.

Teste por 15 dias sem cartão, ou mostre seu cenário ao nosso time.