Actualizar ticket en Freshdesk, con una API
Actualiza un ticket: envía solo los campos a cambiar, y tags como la lista completa que el ticket debe conservar. Status 4 lo resuelve y 5 lo cierra.
- Identificador
- freshdesk_update_ticket
La llamada
POST https://connect.reportei.com/api/tools/freshdesk_update_ticket/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json
{
"customer_toolkit": "<connection UUID>",
"arguments": {
"ticket_id": 1
}
}Tu sistema envía el id de la conexión de tu cliente y los argumentos de la tool. Los headers son los mismos de toda la API de Connect: el token de tu producto y el token de tu cliente.
Parámetros
Las descripciones de los parámetros siguen la documentación oficial de la app, en inglés.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| ticket_id | integer | Sí | Id of the ticket, from List tickets or Search tickets. |
| requester_id | integer | No | Id of an existing contact as the new requester, from List contacts. |
| string | No | Email address of the new requester. A new address creates the contact. | |
| phone | string | No | Phone number of the new requester. A new number creates the contact, and without email the name becomes mandatory. |
| unique_external_id | string | No | External id of the new requester, the id in your own system. A new id creates the contact. |
| name | string | No | Name of the requester. |
| subject | string | No | Subject of the ticket. |
| description | string | No | Content of the ticket, as HTML or plain text. |
| status | integer | No | 2 Open, 3 Pending, 4 Resolved or 5 Closed. Custom statuses of the helpdesk are the choices of the status field in List ticket fields. |
| priority | integer | No | 1 Low, 2 Medium, 3 High or 4 Urgent.Valores: 1, 2, 3, 4 |
| source | integer | No | Channel of the ticket: 1 Email, 2 Portal, 3 Phone, 7 Chat, 9 Feedback widget or 10 Outbound email.Valores: 1, 2, 3, 7, 9, 10 |
| type | string | No | Ticket type, one of the choices of the ticket_type field in List ticket fields, such as Question or Incident. |
| responder_id | integer | No | Id of the agent to assign the ticket to, from the choices of the agent field in List ticket fields. |
| group_id | integer | No | Id of the group to assign the ticket to, from the choices of the group field in List ticket fields. |
| product_id | integer | No | Id of the product of the ticket, from the choices of the product field in List ticket fields. |
| company_id | integer | No | Id of the company of the requester, from Search companies. Only with the Multiple Companies feature. |
| tags | array | No | Full list of tags the ticket should have, current ones included. |
| due_by | string | No | When the ticket is due to be resolved. |
| fr_due_by | string | No | When the first response is due. |
| custom_fields | object | No | Custom 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. |
Conexiones posibles
Tu cliente conecta su cuenta de Freshdesk una sola vez, con uno de los modos de abajo. La misma conexión sirve para todas las tools del toolkit.
Usuario y contraseña
Tu cliente ingresa las credenciales de la app en una pantalla de Connect, o tu sistema las envía con POST /api/customer-toolkits, sin pantalla.
Al conectar, tu cliente también indica {domain}: la dirección de su cuenta en la API de la app.
La respuesta
Si la llamada tiene éxito, Connect conserva el status y el cuerpo de la respuesta de la app. Los errores HTTP devueltos por la app usan el objeto {error, api_error}; la autenticación o validación pueden fallar antes de la ejecución. El header X-Toolkit-Execution-Id identifica la ejecución registrada, disponible en GET /api/tools/executions/{uuid}.
Lista para agentes de IA
El input de esta tool es un JSON Schema, disponible en GET /api/tools/freshdesk_update_ticket. Se convierte en la definición de tool de tu agente sin conversión.
Otras tools de Freshdesk
- Listar ticketsGETLista tickets, los más recientes primero por defecto. Sin updated_since solo vuelven los tickets creados en los últimos 30 días, y spam o eliminados solo vienen con filtro.
- Buscar ticketsGETBusca tickets con una query de filtro, por ejemplo por estado, prioridad, agente, grupo, etiqueta o campo personalizado. Devuelve total y results, 30 tickets por página.
- Obtener ticketGETDevuelve un ticket con status, priority, requester_id, responder_id, group_id, tags, custom_fields y description.
- Crear ticketPOSTCrea un ticket. Identifica al solicitante con requester_id, email, phone o unique_external_id; un email o phone que aún no existe en Freshdesk crea el contacto.
- Listar conversaciones del ticketGETLista las respuestas y notas de un ticket, con body (HTML), body_text, private, incoming, user_id y source (0 respuesta, 2 nota). Las páginas se numeran desde 1.
- Crear respuesta en el ticketPOSTResponde al solicitante de un ticket. Freshdesk envía la respuesta por correo al solicitante, así que es visible para el cliente.
- Crear nota en el ticketPOSTAgrega una nota a un ticket. Las notas son privadas por defecto, visibles solo para los agentes; con private en false el solicitante también la ve.
- Listar campos de ticketGETLista los campos de ticket del helpdesk con sus opciones: ids de agentes en el campo de agente, ids de grupos en el campo de grupo, ids de productos y valores de estado.
Toolkits de la misma categoría
Ver los 100 toolkitsMira Connect aplicado a tu producto.
Pruébalo durante 15 días sin tarjeta, o cuéntale tu caso a nuestro equipo.
