From 5fce37f256570262bc646b6c2929f845089a2b6f Mon Sep 17 00:00:00 2001 From: Rein de Jager Date: Tue, 16 Jun 2026 13:47:16 +0200 Subject: [PATCH] Add webhooks documentation and update menu structure --- markdownpages/profit/en/concepts.md | 2 - markdownpages/profit/en/webhooks.md | 221 +++++++++++++++++++++++++ markdownpages/profit/nl/concepts.md | 2 - markdownpages/profit/nl/webhooks.md | 221 +++++++++++++++++++++++++ menustructures/multilanguage_menu.json | 8 + 5 files changed, 450 insertions(+), 4 deletions(-) create mode 100644 markdownpages/profit/en/webhooks.md create mode 100644 markdownpages/profit/nl/webhooks.md diff --git a/markdownpages/profit/en/concepts.md b/markdownpages/profit/en/concepts.md index de76a31..f023a50 100644 --- a/markdownpages/profit/en/concepts.md +++ b/markdownpages/profit/en/concepts.md @@ -17,8 +17,6 @@ With GetConnectors, you can create and customize standard endpoints by yourself. You invoke the endpoint using the http GET method. To receive new data, you make a new request (polling). ->There are no webhooks available. To receive the latest changes use the `modified_date` fields in endpoints to receive the latest changes. - [Detailed documentation about GetConnectors](https://help.afas.nl/help/NL/SE/App_Cnnctr_Get.htm) ## UpdateConnector diff --git a/markdownpages/profit/en/webhooks.md b/markdownpages/profit/en/webhooks.md new file mode 100644 index 0000000..a0bd9fe --- /dev/null +++ b/markdownpages/profit/en/webhooks.md @@ -0,0 +1,221 @@ +--- +author: REJA +date: 2026-06-16 +tags: Webhooks, AppConnector, Dossier, Workflow, Notifications +title: Webhooks +--- + +Webhooks are available on dossier. This means Profit can automatically send a real-time notification in the following situations: + +- When a dossier item is added, modified or deleted. +- When a reaction to a dossier item is added or deleted. +- When a workflow enters a workflow task or when a workflow action is executed. + +In these situations it is no longer necessary for an external application to poll for changes in dossier items, reactions or tasks/actions in workflows. + +## Description + +Based on the configured webhooks, Profit sends a notification that something has been added, modified or deleted. This is done in the form of a JSON message to a specific endpoint. + +> The notification indicates that something has changed, but not what has changed. For example, if you change the salary in a workflow, a notification of the change follows, but not specifically that the salary was changed. Use a GetConnector to retrieve the changed data. + +You create the webhooks you want to use per app connector. For each webhook you define the URL and the password. + +Next, you determine per dossier item type whether you want to send notifications when dossier items or reactions are added, modified or deleted. Per workflow you determine for which workflow tasks or actions you want to send notifications. + +## Technical description + +This description focuses on the configuration of the endpoint that receives the notifications and on the contents of the notifications. + +### General + +Every notification is sent in JSON format to the HTTPS endpoint that is configured in the webhook stored in the app connector. + +A notification is only sent if both the app connector and the webhook are not blocked, otherwise the notification gets the status `Failed`. + +### HMAC-SHA256 Signature + +Every notification is signed with the password that is configured for the webhook in Profit. The receiver can verify the signature to confirm that the notification actually originates from AFAS Profit and has not been tampered with. The signature is included in the HTTP header: + +``` text +X-Profit-Signature-256: sha256= +``` + +### Contents of a notification + +There are different types of notifications (test message, dossier item, reaction, workflow). The fields below are present in every notification. + +Field | Description | +----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| +`EventId` | Unique code of the webhook notification. | +`EnvironmentId` | Name of the Profit environment. | +`Timestamp` | Time of the mutation based on UTC. UTC is a universal time that is the same everywhere; it may differ from the time on your local machine or the machine running an application. | + +#### Contents of a test message + +A test message can look as follows: + +``` json +{ + "EventId": "79d9b863-627b-497f-861e-147503472e8d", + "EnvironmentId": "12345AA", + "EventType": "test.executed", + "Data": { + "SubscriptionId": 1, + "SubscriptionName": "Webshop" + }, + "Timestamp": "2026-06-08T09:20:56.1351565Z" +} +``` + +#### Contents of a dossier item notification + +- `EventType`: + - `subject.created` (dossier item created) + - `subject.updated` (dossier item modified) + - `subject.deleted` (dossier item deleted) +- `Data`: + - `SubjectTypeId`: number of the dossier item type. + - `SubjectId`: number of the dossier item. + +#### Contents of a reaction notification + +- `EventType`: + - `subject.reaction.created` (reaction to a dossier item created) + - `subject.reaction.updated` (reaction to a dossier item modified) + - `subject.reaction.deleted` (reaction to a dossier item deleted) +- `Data`: + - `SubjectTypeId`: number of the dossier item type. + - `SubjectId`: number of the dossier item. + - `ReactionId`: number of the reaction. + +#### Contents of a workflow notification + +- `EventType`: + - `workflow.action.executed` (workflow action executed) + - `workflow.task.entered` (workflow task started) +- `Data`: + - `SubjectTypeId`: number of the dossier item type. + - `SubjectId`: number of the dossier item. + - `WorkflowName`: GUID of the workflow. + - `TaskName`: GUID of the workflow task / `ActionName`: GUID of the workflow action. + +> GUIDs can change when the configuration of the workflow changes. There are two methods to retrieve GUIDs. You can run the second method on a schedule (for example daily), so that the GUIDs in your integration are kept up to date. + +##### Method 1: Look up GUIDs in Profit + +1. Go to: CRM / Dossier / Configuration / Dossier item type. +2. Go to the tab: Workflows. +3. Open the workflow in the Workflow Editor. +4. Open the view: Tasks and actions view. + +In this view you see, per row, the `WorkflowName`, `TaskName` and `ActionName` with the corresponding `Workflowcode`, `Taakcode` and `Actiecode` (the GUIDs). + +##### Method 2: Retrieve GUIDs via a GetConnector + +1. Go to: General / Output / Management / GetConnector. +2. Make a copy of the standard GetConnector `Profit_Workflowactions`. +3. You can add the fields Description and Dossier item type from 'Action per task / Task / Workflow' to more easily recognize which data belongs to which workflow and dossier item type. +4. Filter on the field `WorkflowName` to show only the information of the workflows that are relevant for this integration. For example `WorkflowName=2448365B41A82343F00FC89A8EFDB394`. +5. Authorize the GetConnector by adding it to the correct app connector. +6. Inform the development party under which GetConnector name the external software can retrieve this information. + +### Delivery mechanism and retry logic + +Webhook events are not sent immediately at the moment of the mutation. The process is as follows: + +- The event is registered (status: `Registered`). +- A batch job is scheduled (type: Send webhooks). +- The batch job sends the events asynchronously via HTTP POST. + +This ensures that a slow or unreachable receiver has no impact on the user performing the mutation. + +In case of a failed delivery (non-2xx HTTP response, or timeout), a new attempt to send the notification is made automatically. The interval between two consecutive attempts becomes progressively longer. After too many failed attempts the notification gets the status `Failed`. + +### HTTP timeout + +The HTTP POST request has a timeout of 2 seconds. The receiver must acknowledge the request quickly (HTTP 2xx) and perform further processing asynchronously. If the receiver takes longer, it counts as a failed attempt and the event is offered again. + +### Event statuses + +Status | Description | +--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------| +`Registered` | Event created, waiting to be processed. | +`Pending` | Being processed. | +`Success` | Successfully sent. | +`Retry` | Failed, scheduled for a new attempt. | +`Failed` | Permanently failed. | +`EntityRateLimited` | Suppressed by rate limiting. If identical events occur in quick succession, only the last event is used to send a notification. | + +## Configuring webhooks per app connector + +You configure the webhooks per app connector. Per app connector you can configure multiple webhooks. Later, in the configuration on dossier item type and/or workflow, you determine which webhooks you actually use. + +Configuring an app connector: + +1. Go to: General / Management / App connector. +2. Open the properties of the app connector. +3. Go to the tab: Webhooks. +4. Click: New. +5. Enter the description of the webhook. The name is for internal use, with one exception: if you send a test message, the test message contains the description of the webhook. +6. Enter the URL of the endpoint (the endpoint of the application that receives the notification). The endpoint must be anonymously and publicly available over the internet. The HTTPS protocol is supported, HTTP is not supported. +7. Enter the password. The password is stored encrypted and cannot be retrieved via Profit. You can configure the endpoint so that it only accepts notifications with the correct password. This prevents notifications from malicious parties from coming in. You can change the password afterwards in the properties of the webhook, via Actions / Change password. +8. Click: Finish. +9. Open the properties of the new webhook. +10. Click: Actions / Send test message. This sends a test message to the endpoint of the webhook. +11. Check in the external integration whether the test message has arrived. The test message contains, among others, the following fields: + - `EventType`: `test.executed` + - `SubscriptionId`: code of the webhook in the app connector. + - `SubscriptionName`: name of the webhook in the app connector. + + The receiver can use this to verify that the connection works and that the signature validation is configured correctly. +12. Go back to Profit. Open the Events tab in the properties of the webhook. Check the status of the test message. In the properties of an event you find additional information, such as the sent message and any error messages. +13. On the Connections tab you see all dossier item types and workflows to which the webhook is linked. This shows you from which sources the notifications of the webhook originate. + +Temporarily not using configured webhooks: + +- If you block an app connector, no data traffic can take place via that app connector anymore. This also applies to the webhooks linked to the app connector. +- If you do not want to use a specific webhook, you can block or delete it. +- If Profit detects that data traffic with the endpoint of a webhook has not been possible for an extended period, the webhook is automatically blocked by Profit. This is logged in the environment log. + +## Configuring dossier item type and workflow + +You determine per dossier item type and workflow when notifications are sent based on a webhook. You can link different webhooks per dossier item type, workflow task or action, so that you can serve different integrations. + +- **Dossier item type** — Per dossier item type you configure webhooks for adding, modifying or deleting dossier items and for adding, modifying or deleting reactions. This setting applies to all dossier items of the dossier item type, regardless of whether the dossier item has a workflow or not. +- **Workflow task or action** — You open a workflow and configure a webhook on a specific workflow task or action. If a webhook is configured on a workflow task, the webhook sends a notification when the workflow enters the workflow task. If the webhook is configured on a workflow action, the webhook sends a notification when the workflow action is executed. + +> Configuring the dossier item type and/or workflow is the last step. After this, Profit will immediately start sending notifications based on webhooks, if the rest of the configuration is correct. + +Configuring a dossier item type: + +You can configure webhooks for built-in dossier item types (with a negative code) and your own dossier item types. + +1. Go to: CRM / Dossier / Configuration / Dossier item type. +2. Open the properties of a dossier item type. +3. Go to the tab: Webhooks. You can link multiple webhooks here, for example one webhook for dossier items and another for reactions. Make sure you check the correct options per webhook. +4. Click: New. Select the webhook; this determines to which endpoint (and therefore to which integration) the notification is sent. Determine whether you want a notification when dossier items are added, modified or deleted and when reactions are added or deleted. +5. Click: Finish. + +Configuring a workflow: + +1. Open the workflow. +2. Click the task to which you want to link a webhook. You cannot configure webhooks on the start task of a workflow, but you can on other tasks. +3. Click the action to which you want to link a webhook. Webhooks are possible on most actions and special actions. You cannot configure webhooks on the special action Make me responsible and on the Jonas actions. +4. Click: Publish. This puts the workflow into effect. + +## Notifications based on webhooks + +Every occurrence for which a notification must be sent is called an event. Per webhook you can consult the events to check whether notifications have been sent successfully. + +1. Go to: General / Management / App connector. +2. Go to the tab: Webhooks. +3. Open the properties of the webhook. +4. Go to the tab: Events. +5. You see the events with their status. In the properties of the event you find, among others, the sent notification. + +### Read further + +- [GetConnector](./get-connector) +- [Profit API Authentication](./authentication) +- [Webhooks on dossier items and workflows (AFAS Help Center)](https://help.afas.nl/help/NL/SE/140869.htm) diff --git a/markdownpages/profit/nl/concepts.md b/markdownpages/profit/nl/concepts.md index 2397e3e..faeb158 100644 --- a/markdownpages/profit/nl/concepts.md +++ b/markdownpages/profit/nl/concepts.md @@ -15,8 +15,6 @@ Met GetConnectoren kun je standaard zelf endpoints aanmaken en aanpassen. Deze e Het endpoint roep je aan via de http GET methode. Om nieuwe data te ontvangen doe je een nieuwe request (polling). ->Er zijn geen webhooks beschikbaar. - [Uitgebreide documentatie over GetConnectoren](https://help.afas.nl/help/NL/SE/App_Cnnctr_Get.htm) ## UpdateConnector diff --git a/markdownpages/profit/nl/webhooks.md b/markdownpages/profit/nl/webhooks.md new file mode 100644 index 0000000..3236806 --- /dev/null +++ b/markdownpages/profit/nl/webhooks.md @@ -0,0 +1,221 @@ +--- +author: REJA +date: 2026-06-16 +tags: Webhooks, AppConnector, Dossier, Workflow, Notifications +title: Webhooks +--- + +Er zijn webhooks beschikbaar op dossier. Hiermee stuurt Profit automatisch een real-time notificatie in de volgende situaties: + +- Bij het toevoegen, wijzigen en verwijderen van een dossieritem. +- Bij het toevoegen en verwijderen van een reactie op een dossieritem. +- Als een workflow in een workflowtaak komt of als een workflowactie wordt uitgevoerd. + +In deze situaties is het dus niet meer nodig dat een externe applicatie gaat pollen op wijzigingen in dossieritems, reacties of taken/acties in workflows. + +## Beschrijving + +Op basis van de ingerichte webhooks stuurt Profit een notificatie dat er iets toegevoegd, gewijzigd of verwijderd is. Dit gebeurt in de vorm van een JSON-bericht naar een specifieke endpoint. + +> De notificatie geeft aan dat er iets gewijzigd is, maar niet wat er gewijzigd is. Als je bijvoorbeeld het salaris wijzigt in een workflow, dan volgt er een notificatie van de wijziging, maar niet dat specifiek het salaris gewijzigd is. Gebruik een GetConnector om de gewijzigde data op te halen. + +Je maakt per app connector de webhooks aan die je wilt gebruiken. Per webhook leg je de URL en het wachtwoord vast. + +Vervolgens bepaal je per type dossieritem of je notificaties wilt versturen bij het toevoegen, wijzigen of verwijderen van dossieritems of reacties. Per workflow bepaal je bij welke workflowtaken of -acties je notificaties wilt versturen. + +## Technische beschrijving + +Deze beschrijving is gericht op de inrichting van het endpoint dat de notificaties ontvangt en op de inhoud van de notificaties. + +### Algemeen + +Elke notificatie wordt in JSON-formaat verstuurd naar de HTTPS-endpoint die is ingesteld in de webhook die is vastgelegd in de app connector. + +Een notificatie wordt alleen verstuurd als de app connector én de webhook niet geblokkeerd zijn, anders krijgt de notificatie de status `Failed`. + +### HMAC-SHA256 Signature + +Elke notificatie wordt ondertekend met het wachtwoord dat bij de webhook in Profit is ingesteld. De ontvanger kan de handtekening verifiëren om te bevestigen dat de notificatie daadwerkelijk van AFAS Profit afkomstig is en niet is gemanipuleerd. De handtekening staat in de HTTP-header: + +``` text +X-Profit-Signature-256: sha256= +``` + +### Inhoud van een notificatie + +Er zijn verschillende soorten notificaties (testbericht, dossieritem, reactie, workflow). De onderstaande velden zie je in elke notificatie terug. + +Veld | Beschrijving | +----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +`EventId` | Unieke code van de notificatie van de webhook. | +`EnvironmentId` | Naam van de Profit-omgeving. | +`Timestamp` | Tijdstip van de mutatie op basis van de UTC. De UTC is een universele tijd die overal gelijk is, deze kan afwijken van de tijd op je lokale machine of de machine waarop een toepassing draait. | + +#### Inhoud van een testbericht + +Een testbericht kan er als volgt uitzien: + +``` json +{ + "EventId": "79d9b863-627b-497f-861e-147503472e8d", + "EnvironmentId": "12345AA", + "EventType": "test.executed", + "Data": { + "SubscriptionId": 1, + "SubscriptionName": "Webshop" + }, + "Timestamp": "2026-06-08T09:20:56.1351565Z" +} +``` + +#### Inhoud van een notificatie op dossieritem + +- `EventType`: + - `subject.created` (dossieritem aangemaakt) + - `subject.updated` (dossieritem gewijzigd) + - `subject.deleted` (dossieritem verwijderd) +- `Data`: + - `SubjectTypeId`: nummer van het type dossieritem. + - `SubjectId`: nummer van het dossieritem. + +#### Inhoud van een notificatie op reactie + +- `EventType`: + - `subject.reaction.created` (reactie op een dossieritem aangemaakt) + - `subject.reaction.updated` (reactie op een dossieritem gewijzigd) + - `subject.reaction.deleted` (reactie op een dossieritem verwijderd) +- `Data`: + - `SubjectTypeId`: nummer van het type dossieritem. + - `SubjectId`: nummer van het dossieritem. + - `ReactionId`: nummer van de reactie. + +#### Inhoud van een notificatie op workflow + +- `EventType`: + - `workflow.action.executed` (workflowactie uitgevoerd) + - `workflow.task.entered` (workflowtaak gestart) +- `Data`: + - `SubjectTypeId`: nummer van het type dossieritem. + - `SubjectId`: nummer van het dossieritem. + - `WorkflowName`: GUID van de workflow. + - `TaskName`: GUID van de workflowtaak / `ActionName`: GUID van de workflowactie. + +> GUID's (kunnen) wijzigen als de inrichting van de workflow wijzigt. Er zijn twee methoden om GUID's op te halen. De tweede methode kun je bijvoorbeeld elke dag (geautomatiseerd) uitvoeren, waardoor de GUID's in je koppeling elke dag actueel zijn. + +##### Methode 1: GUID's opzoeken in Profit + +1. Ga naar: CRM / Dossier / Inrichting / Type dossieritem. +2. Ga naar het tabblad: Workflows. +3. Open de workflow in de Workflow Editor. +4. Open de weergave: Weergave taken en acties. + +In deze weergave zie je per regel de `WorkflowName`, `TaskName` en `ActionName` met de bijbehorende `Workflowcode`, `Taakcode` en `Actiecode` (de GUID's). + +##### Methode 2: GUID's ophalen via een GetConnector + +1. Ga naar: Algemeen / Uitvoer / Beheer / GetConnector. +2. Maak een kopie van standaard-GetConnector `Profit_Workflowactions`. +3. Je kan de velden Omschrijving en Type dossieritem toevoegen uit 'Actie per taak / Taak / Workflow' om makkelijker te herkennen welke gegevens bij welke workflow en type dossieritem horen. +4. Filter op het veld `WorkflowName` om alleen de informatie te tonen van de workflows die relevant zijn voor deze koppeling. Bijvoorbeeld `WorkflowName=2448365B41A82343F00FC89A8EFDB394`. +5. Autoriseer de GetConnector door deze toe te voegen aan de juiste app connector. +6. Geef aan de ontwikkelpartij door onder welke GetConnector-naam de externe software deze informatie kan ophalen. + +### Afleveringsmechanisme en retry-logica + +Webhook-events worden niet direct verstuurd op het moment van de mutatie. Het proces is als volgt: + +- Het event wordt geregistreerd (status: `Registered`). +- Een batch job wordt ingepland (type: Webhooks versturen). +- De batch job verstuurt de events asynchroon via HTTP POST. + +Dit zorgt ervoor dat een trage of onbereikbare ontvanger geen invloed heeft op de gebruiker die de mutatie uitvoert. + +Bij een mislukte aflevering (niet-2xx HTTP-respons, of timeout) wordt automatisch geprobeerd opnieuw een notificatie te versturen. De interval tussen twee opeenvolgende pogingen wordt steeds langer. Na teveel mislukte pogingen krijgt de notificatie de status `Failed`. + +### HTTP timeout + +Het HTTP POST-verzoek heeft een timeout van 2 seconden. De ontvanger moet het verzoek snel bevestigen (HTTP 2xx) en verdere verwerking asynchroon doen. Als de ontvanger er langer over doet, telt het als een mislukte poging en wordt het event opnieuw aangeboden. + +### Event-statussen + +Status | Beschrijving | +--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| +`Registered` | Event aangemaakt, wacht op verwerking. | +`Pending` | In verwerking. | +`Success` | Succesvol verzonden. | +`Retry` | Mislukt, staat gepland voor nieuwe poging. | +`Failed` | Definitief mislukt. | +`EntityRateLimited` | Onderdrukt door rate-limiting. Als er snel na elkaar identieke events ontstaan, dan wordt alleen de laatste event gebruikt voor het verzenden van een notificatie. | + +## Webhooks per app connector inrichten + +Je richt de webhooks per app connector in. Per app connector kun je meerdere webhooks inrichten. Later bepaal je in de inrichting op type dossieritem en/of workflow welke webhooks je concreet gaat gebruiken. + +App connector inrichten: + +1. Ga naar: Algemeen / Beheer / App connector. +2. Open de eigenschappen van de app connector. +3. Ga naar het tabblad: Webhooks. +4. Klik op: Nieuw. +5. Vul de omschrijving van de webhook in. De naam is voor intern gebruik, met één uitzondering: als je een testbericht verstuurt, dan bevat het testbericht de omschrijving van de webhook. +6. Vul de URL van de endpoint in (de endpoint van de applicatie die de notificatie ontvangt). Het endpoint moet anoniem en publiek via internet beschikbaar zijn. Het protocol HTTPS wordt ondersteund, HTTP wordt niet ondersteund. +7. Vul het wachtwoord in. Het wachtwoord wordt versleuteld opgeslagen en kan niet via Profit worden geraadpleegd. Je kunt de endpoint zodanig inrichten, dat deze alleen notificaties met het juiste wachtwoord accepteert. Hiermee voorkom je dat er notificaties van kwaadwillenden binnenkomen. Je kunt het wachtwoord achteraf wijzigen in de eigenschappen van de webhook, via Acties / Wachtwoord wijzigen. +8. Klik op: Voltooien. +9. Open de eigenschappen van de nieuwe webhook. +10. Klik op: Acties / Verstuur testbericht. Hiermee verstuur je een testbericht naar de endpoint van de webhook. +11. Kijk in de externe koppeling of het testbericht is aangekomen. Het testbericht bevat o.a. de volgende velden: + - `EventType`: `test.executed` + - `SubscriptionId`: code van de webhook in de app connector. + - `SubscriptionName`: naam van de webhook in de app connector. + + De ontvanger kan hiermee verifiëren dat de verbinding werkt en de signature-validatie correct is ingesteld. +12. Ga terug naar Profit. Open het tabblad Events in de eigenschappen van de webhook. Check de status van het testbericht. In de eigenschappen van een event vind je aanvullende informatie, zoals het verzonden bericht en eventuele foutmeldingen. +13. Op het tabblad Koppelingen zie je alle typen dossieritem en workflows waaraan de webhook gekoppeld is. Hier zie je dus uit welke bronnen de notificaties van de webhook afkomstig zijn. + +Ingerichte webhooks (tijdelijk) niet gebruiken: + +- Als je een app connector blokkeert, dan kan er geen dataverkeer meer plaatsvinden via die app connector. Dit geldt ook voor de webhooks die aan de app connector gekoppeld zijn. +- Als je een specifieke webhook niet wilt gebruiken, dan kun je deze blokkeren of verwijderen. +- Als Profit constateert dat het dataverkeer met de endpoint van een webhook gedurende langere periode niet meer mogelijk is, dan wordt de webhook automatisch door Profit geblokkeerd. Dit wordt gelogd in het omgevingslogboek. + +## Type dossieritem en workflow inrichten + +Je bepaalt per type dossieritem en workflow wanneer er notificaties verstuurd worden op basis van een webhook. Je kunt per type dossieritem, workflowtaak of -actie verschillende webhooks koppelen, zodat je verschillende koppelingen kunt bedienen. + +- **Type dossieritem** — Je stelt per type dossieritem webhooks in voor het toevoegen, wijzigen of verwijderen van dossieritems en voor het toevoegen, wijzigen of verwijderen van reacties. Deze instelling geldt voor alle dossieritems van het type dossieritem, ongeacht of het dossieritem een workflow heeft of niet. +- **Workflowtaak of -actie** — Je opent een workflow en je stelt een webhook in bij een specifieke workflowtaak of -actie. Als een webhook is ingesteld bij een workflowtaak, dan zal de webhook een notificatie versturen als de workflow in de workflowtaak komt. Als de webhook is ingesteld bij een workflowactie, dan zal de webhook een notificatie versturen als de workflowactie wordt uitgevoerd. + +> Het inrichten van type dossieritem en/of workflow is de laatste stap. Hierna zal Profit direct notificaties gaan versturen op basis van webhooks, als de rest van de inrichting correct is. + +Type dossieritem inrichten: + +Je kunt webhooks inrichten voor meegeleverde typen dossieritem (met een negatieve code) en eigen typen dossieritem. + +1. Ga naar: CRM / Dossier / Inrichting / Type dossieritem. +2. Open de eigenschappen van een type dossieritem. +3. Ga naar het tabblad: Webhooks. Je kunt hier meerdere webhooks koppelen, bijvoorbeeld een webhook voor dossieritems en een andere voor reacties. Let op dat je de juiste opties per webhook aanvinkt. +4. Klik op: Nieuw. Selecteer de webhook, deze bepaalt naar welke endpoint (en dus naar welke koppeling) de notificatie verstuurd wordt. Bepaal of je een notificatie wilt bij het toevoegen, wijzigen of verwijderen van dossieritems en bij het toevoegen of verwijderen van reacties. +5. Klik op: Voltooien. + +Workflow inrichten: + +1. Open de workflow. +2. Klik op de taak waaraan je een webhook wilt koppelen. Op de starttaak van een workflow kun je geen webhooks inrichten, op andere taken wel. +3. Klik op de actie waaraan je een webhook wilt koppelen. Op de meeste acties en speciale acties zijn webhooks mogelijk. Je kunt geen webhooks inrichten op de speciale actie Maak mij verantwoordelijk en op de Jonas-acties. +4. Klik op: Publiceren. Hierdoor treedt de workflow in werking. + +## Notificaties op basis van webhooks + +Elke gebeurtenis waarbij een notificatie moet worden verstuurd, wordt een event genoemd. Je kunt per webhook de events raadplegen om te kijken of notificaties succesvol zijn verzonden. + +1. Ga naar: Algemeen / Beheer / App connector. +2. Ga naar het tabblad: Webhooks. +3. Open de eigenschappen van de webhook. +4. Ga naar het tabblad: Events. +5. Je ziet de events met de status. In de eigenschappen van de event vind je o.a. de verzonden notificatie. + +### Lees verder + +- [GetConnector](./get-connector) +- [Profit API Authenticatie](./authentication) +- [Webhooks op dossieritems en workflows (AFAS Help Center)](https://help.afas.nl/help/NL/SE/140869.htm) diff --git a/menustructures/multilanguage_menu.json b/menustructures/multilanguage_menu.json index d51842c..660d710 100644 --- a/menustructures/multilanguage_menu.json +++ b/menustructures/multilanguage_menu.json @@ -43,6 +43,10 @@ { "name": "BI-models", "path": "en/bi-models.md" + }, + { + "name": "Webhooks", + "path": "en/webhooks.md" } ], "nl": [ @@ -73,6 +77,10 @@ { "name": "BI-modellen", "path": "nl/bi-modellen.md" + }, + { + "name": "Webhooks", + "path": "nl/webhooks.md" } ] },