@@ -8,7 +8,7 @@ Open Klant can emit cloud events when configured to do so via the
88
99Currently, Open Klant emits the following cloud event:
1010
11- * ``nl.overheid.zaken.zaak-gelinkt ``: emitted when an ``Onderwerpobject `` is created that links to a
11+ * ``nl.overheid.zaken.zaak-gekoppeld ``: emitted when an ``Onderwerpobject `` is created or updated that links to a
1212 Zaak (i.e. when ``codeObjecttype="zaak" `` in the ``onderwerpobjectidentificator `` field).
1313
1414Cloud events are only sent when both of the following are true:
@@ -18,14 +18,14 @@ Cloud events are only sent when both of the following are true:
1818
1919If either of these settings is missing, cloud events will **not ** be emitted.
2020
21- Example of a ``nl.overheid.zaken.zaak-gelinkt `` cloud event in its current shape:
21+ Example of a ``nl.overheid.zaken.zaak-gekoppeld `` cloud event in its current shape:
2222
2323.. code-block :: json
2424
2525 {
2626 "specversion" : " 1.0" ,
27- "type" : " nl.overheid.zaken.zaak-gelinkt " ,
28- "source" : " urn:nld:oin:01823288444:openzaak " ,
27+ "type" : " nl.overheid.zaken.zaak-gekoppeld " ,
28+ "source" : " urn:nld:oin:01823288444:openklant " ,
2929 "subject" : " a7b3c8d9-e4f5-6a7b-8c9d-e0f1a2b3c4d5" ,
3030 "id" : " f347fd1f-dac1-4870-9dd0-f6c00edf4bf7" ,
3131 "time" : " 2025-10-10T00:00:00Z" ,
@@ -42,3 +42,37 @@ Example of a ``nl.overheid.zaken.zaak-gelinkt`` cloud event in its current shape
4242
4343The shape of these cloud events and the actions that trigger them are still subject to
4444change.
45+
46+ In addition to linking events, Open Klant can also emit *unlink * events when a Zaak
47+ is no longer related to an Onderwerpobject.
48+
49+ * ``nl.overheid.zaken.zaak-ontkoppeld ``: emitted when a Zaak that was previously
50+ linked becomes unlinked. This happens when an ``Onderwerpobject `` that pointed
51+ to a Zaak is deleted, or otherwise changed such that the relationship with the
52+ Zaak disappears.
53+
54+ The payload of a ``nl.overheid.zaken.zaak-ontkoppeld `` event matches the shape of
55+ the original ``zaak-gekoppeld `` event so that Open Zaak can correctly identify
56+ and remove the corresponding ZaakObject relation.
57+
58+ Example of a ``nl.overheid.zaken.zaak-ontkoppeld `` cloud event:
59+
60+ .. code-block :: json
61+
62+ {
63+ "specversion" : " 1.0" ,
64+ "type" : " nl.overheid.zaken.zaak-ontkoppeld" ,
65+ "source" : " urn:nld:oin:01823288444:openklant" ,
66+ "subject" : " a7b3c8d9-e4f5-6a7b-8c9d-e0f1a2b3c4d5" ,
67+ "id" : " f347fd1f-dac1-4870-9dd0-f6c00edf4bf7" ,
68+ "time" : " 2025-10-10T00:00:00Z" ,
69+ "datacontenttype" : " application/json" ,
70+ "data" : {
71+ "zaak" : " urn:uuid:a7b3c8d9-e4f5-6a7b-8c9d-e0f1a2b3c4d5" ,
72+ "linkTo" : " http://open-klant.local:8000/klantinteracties/api/v1/onderwerpobjecten/5fee9673-216c-41e7-91d2-69a8d1526b9f" ,
73+ "label" : " Mijn Klantcontact Onderwerp" ,
74+ "linkObjectType" : " Onderwerpobject"
75+ }
76+ }
77+
78+ *Note: * The ``subject `` field again contains the UUID of the Zaak.
0 commit comments