#1864: Integration of Swarmica with External Helpdesk
Отредактирована: сегодняIt is strongly recommended to configure any type of integration so that one system is leading and the second is following. This is necessary to avoid conflicts between systems and possible inconsistencies.
Integration with external systems can be implemented via webhooks on certain API endpoints.
For proper operation, both systems must store metadata of entities from the external system. For example, the ID of a ticket in the external system. Below is an example of integrating Swarmica with a third-party Helpdesk.
Interaction scheme:
End user → external Helpdesk → API → Swarmica
The end user works only in the external Helpdesk and may not even know about the existence of Swarmica.
For such interaction, it is necessary to configure webhooks in the external Helpdesk that will send API requests to Swarmica depending on the events occurring in the external Helpdesk.
All API requests to Swarmica use Headers depending on the type of token.
for Bearer token:
{
"Content-Type": "application/json",
"Authorization": "Bearer BEARER_TOKEN"
}
for API token:
{
"Content-Type": "application/json",
"Authorization": "Token API_TOKEN"
}
Interaction scenarios
Scenario 1: Creating a ticket in Swarmica
On the side of the external Helpdesk, a webhook must be configured that, under certain conditions (for example, creating a ticket in the external Helpdesk), sends an API request to Swarmica to create a ticket.
API request parameters in Swarmica:
Endpoint: /api/tickets/
Method: POST
Payload:
{
"subject": "test API ticket 11111", # ticket subject
"comment": "Comment 1", # Problem description
"ext_id": 12345, # ID of the ticket in the external Helpdesk
"requester_email": "jdoe@example.tld", # applicant's email
"idempotency_key": "12345678" # idempotency key
}