Criar ticket no Freshdesk, por uma API

Cria um ticket. Identifique o solicitante com requester_id, email, phone ou unique_external_id; um email ou phone ainda não existente no Freshdesk cria o contato.

Identificador
freshdesk_create_ticket

A chamada

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

{
  "customer_toolkit": "<connection UUID>",
  "arguments": {
    "requester_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
requester_idintegerNãoId of an existing contact as the requester, from List contacts.
emailstringNãoEmail address of the requester. A new address creates the contact.
phonestringNãoPhone number of the requester. A new number creates the contact, and without email the name becomes mandatory.
unique_external_idstringNãoExternal id of the requester, the id in your own system. A new id creates the contact.
namestringNãoName of the requester.
subjectstringNãoSubject of the ticket.
descriptionstringNãoContent of the ticket, as HTML or plain text.
statusintegerNão2 Open (the default), 3 Pending, 4 Resolved or 5 Closed. Custom statuses of the helpdesk are the choices of the status field in List ticket fields.
priorityintegerNão1 Low (the default), 2 Medium, 3 High or 4 Urgent.Valores: 1, 2, 3, 4
sourceintegerNãoChannel of the ticket: 1 Email, 2 Portal (the default), 3 Phone, 7 Chat, 9 Feedback widget or 10 Outbound email.Valores: 1, 2, 3, 7, 9, 10
typestringNãoTicket type, one of the choices of the ticket_type field in List ticket fields, such as Question or Incident.
responder_idintegerNãoId of the agent to assign the ticket to, from the choices of the agent field in List ticket fields.
group_idintegerNãoId of the group to assign the ticket to, from the choices of the group field in List ticket fields.
product_idintegerNãoId of the product of the ticket, from the choices of the product field in List ticket fields.
company_idintegerNãoId of the company of the requester, from Search companies. Only with the Multiple Companies feature.
tagsarrayNãoTags of the ticket.
cc_emailsarrayNãoEmail addresses copied on the ticket.
due_bystringNãoWhen the ticket is due to be resolved. Without it, the SLA policy of the helpdesk sets it.
fr_due_bystringNãoWhen the first response is due. Without it, the SLA policy of the helpdesk sets it.
custom_fieldsobjectNãoCustom field values keyed by the name of each custom field in List ticket fields, for example cf_order_number. Dates go as YYYY-MM-DD.

Conexões possíveis

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

Usuário e senha

O cliente informa as credenciais do app numa tela do Connect, ou o seu sistema as envia por POST /api/customer-toolkits, sem tela.

Na conexão, o cliente informa também {domain}: o endereço da conta dele na API do app.

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/freshdesk_create_ticket. Ele vira a definição de tool do seu agente sem conversão.

Outras tools do Freshdesk

Ver as 13 tools

Toolkits da mesma categoria

Ver os 100 toolkits

Veja o Connect aplicado ao seu produto.

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