Subscribe to Privacy Events

Learn how to subscribe to Privacy Events to automate job-status-based workflows. For more information, please visit the Privacy Services documentation.

Transcript
In this video, we’ll talk about privacy events and how they can help you monitor jobs in Adobe Experience Platform Privacy Service. We’ll also show you how to subscribe to these events and have them sent to a configured webhook. When processing access and delete requests in Privacy Service, different Experience Cloud applications will take varying amounts of time to complete their jobs. If you have many privacy requests processing at the same time, relying on the Privacy Service UI or API to constantly check on the statuses and respond to errors can quickly become time consuming and expensive. To help automate this process, you can subscribe to privacy events. Powered by Adobe IO Events, privacy events are messages that you can set up to automatically fire whenever certain processes complete or result in an error. These messages are sent to a webhook that you configure yourself, where you can set up additional protocols to respond to these events. Let’s walk through the process of subscribing a webhook to privacy events. You can configure your webhook using the client of your choice, but for this demo, we’re using a temporary webhook address from webhook.site. If you don’t have a server to handle your webhooks, Adobe IO Events is integrated with the Adobe IO Runtime, a serverless platform that allows you to quickly deploy custom code to respond to events and execute functions in the cloud. See the documentation on Adobe IO Runtime for more information. During the initial validation process, Adobe IO sends a challenge query parameter in a GET request to the webhook. We need to configure our webhook to return the value of the challenge parameter in the response payload. We’ll hit edit, and then type the following template string in the response body. This will resolve to the value of the challenge parameter. Hit save to finish. Now that we’ve configured our webhook, we can subscribe it to privacy events. We’ll copy the webhook URL to our clipboard, and then we’ll head over to Adobe Developer Console. We’ll open the project that we made in a previous video when setting up Privacy Service API so we can use the same service account credentials. If you want to generate separate credentials for your privacy events registration, you can opt to create a new project instead. With the project page open, we’ll select add to project, then select event from the dropdown. In the dialog that appears, find privacy service events from the list before selecting next. The next screen gives us some options for the types of events we want to subscribe to. We can see notifications when a privacy job completes or produces an error, and also receive the same kinds of notifications for individual products within those jobs. Once we’ve chosen our subscriptions, we’ll hit next. Since we created service account credentials when setting up the API in a previous video, the next screen asks us to confirm if we want to use the same public and private key. If we did not have this set up, we can generate and download a new key pair here. Select next to continue. The next screen lets us set up the details for the event registration. We’ll call the registration Privacy Events. We can also provide an optional description if we wish. Down below, we have two options for how we want to receive the events. We’ll select the webhook option, and we’ll paste the URL for our webhook that we copied earlier. Under delivery style, we can choose whether to receive these events one at a time, or to receive multiple events as batches. Once we’re finished, we’ll select save configured events. The system runs through the authentication process, and if successful, we’ll see our new event registration appear on our project. If we select Debug Tracing, we can view the details of the authentication request that was sent to the webhook, as well as the response that was sent back. Our webhook is now subscribed to Privacy Events, and we can start setting up protocols to automatically respond to job completions and errors. When you receive a Privacy Event, the payload will look something like this. Every event includes a unique ID, a timestamp, and a type. There are four types of Privacy Events. Product Complete means that one of the applications associated with the job has completed its work. Product Error means one or more applications have reported an error while processing the request. Job Complete means that all Experience Cloud applications have reported back, and the overall status of the job has been marked as complete. And finally, Job Error means that one or more applications have reported an error while processing the request. The data object provides contextual information about the event. Specifically, it includes the ID of the Privacy Job that triggered the event, and a message regarding the specific status of the job. By watching this video, you now know how to subscribe to Privacy Events using a configured webhook in order to monitor Privacy Job statuses. For the latest information on managing operations in Privacy Service, please refer to the documentation. Thanks for watching.
recommendation-more-help
9051d869-e959-46c8-8c52-f0759cee3763