Introduction
At Qarma, we support event-based triggers that can automatically send data directly back to you in JSON format.
We already offer a similar setup for inspections – see this guide for reference.
For example, when working with production units or suppliers, you may want to be notified whenever:
A new supplier is created
A change is made to one of the custom fields you’ve defined
To learn more about how custom fields work, please refer to our guides regarding custom fields:
Trigger events
Below table lists the different trigger events that we have available.
| Trigger event | Description |
|---|---|
| Production Unit Changed | This webhook notifies of changes to the basic information of a production unit. These fields are: Name, Number, Address, Groups, Contact person, GPS location, and the production unit status. |
| Supplier Changed | Notifies of changes to the basic information of a supplier. Name, Number, Groups. |
| Supplier Created | Notifies when a supplier is created. |
| Production Unit Created | Notifies when a production unit is created. |
| Production Unit Added to Supplier | Notifies once a production unit is linked to a supplier. |
| Production Unit Removed from Supplier | Notifies once a production unit connection to a supplier is removed. |
| Custom Field Value Set on Production Unit | Notifies when a value is given to a custom field. While it is not possible to filter by a specific custom field, the JSON payload will clearly indicate which custom field has received the new value. |
| Custom Field Value Set on Supplier | Notifies when a value is given to a custom field. While it is not possible to filter by a specific custom field, the JSON payload will clearly indicate which custom field has received the new value. |
| Custom Field Value Unset on Production Unit | Notifies when a value is removed from a custom field. While it is not possible to filter by a specific custom field, the JSON payload will clearly indicate which custom field has a new update. |
| Custom Field Value Unset on Supplier | Notifies when a value is removed from a custom field. While it is not possible to filter by a specific custom field, the JSON payload will clearly indicate which custom field has a new update. |
| Production Units Linked | Notifies when a downstream/upstream relation between 2 production units was made. |
| Production Units Unlinked | Notifies when a downstream/upstream relation between 2 production units was removed. |
Example of structure
As mentioned in the introduction, the event based information will be provided in a JSON-format. There's an example of that down below. If you require any other information or want to have some of the event based triggers implemented, please reach out to our support@qarmainspect.com or your contact person.
{
"event_type": "ProductionUnitCreated",
"event_number": 100,
"event": {
"production_unit_id": "688db536-6e62-4626-ac8c-8cdd4d6d9fc7",
"number": "Production Unit Number",
"name": "Production Unit Name",
"address": ["Street", "Country"],
"contact_person": "Per Hovsa",
"location": {
"coordinates": {
"latitude": 53.012,
"longitude": 12.012
}
}
},
"production_unit": {
"production_unit_id": "688db536-6e62-4626-ac8c-8cdd4d6d9fc7",
"name": "Production Unit Name",
"number": "Production Unit Number",
"location": {
"coordinates": {
"latitude": 53.012,
"longitude": 12.012
}
},
"address": ["Street", "Country"],
"contact_person": "Per Hovsa",
"status": "Production Unit Status Name",
"upstream_production_units": [
{
"production_unit_id": "e2b88c92-871f-4b96-a9f1-99db737033f2",
"name": "Upstream Production Unit",
"number": "Upstream Production Unit Number"
}
],
"downstream_production_units": [
{
"production_unit_id": "e2b88c92-871f-4b96-a9f1-99db737033f2",
"name": "Downstream Production Unit",
"number": "Downstream Production Unit Number"
}
],
"related_suppliers": [
{
"supplier_id": "e2b88c92-871f-4b96-a9f1-99db737033f2",
"name": "Supplier Name",
"number": "Supplier Number"
}
],
"custom_fields": {
"CUSTOM_FIELD_IMPORT_KEY_1": {
"value": {
"text": "String"
}
},
"CUSTOM_FIELD_IMPORT_KEY_2": {
"value": {
"number": "123.2"
}
},
"CUSTOM_FIELD_IMPORT_KEY_3": {
"value": {
"date": "2025-12-27"
}
},
"CUSTOM_FIELD_IMPORT_KEY_4": {
"value": {
"option_ids": ["Choice 1", "Choice 2"]
}
}
},
"groups": ["Group 1", "Group 2"]
}
}