The Webhook for the PEP data is going to send three different types of events; ADD, UPDATE and DELETE. These are descriptive in their naming but still:
Will be sent when a person that was not a PEP becomes one. In this case it is important to use the identifying information in the "keyMap" field of the event in order to match against ones customer database.
These matchings will sometimes be easy, for example matching a Swedish personal number against personal numbers in ones customer database, or more difficult like in the case where the only identifying information in the keyMap is a first and last name. In the latter case the suggested method will be that if a match on names are found, fetch the PEP information store it and mark it for manual control.
Will be sent when a PEP person information was updated, e.g. name change, role change etc. In this case (if you have done what you should) you should already know if this PEP is a customer of yours on account of you having its personId stored in your database and fast webhook storage.
If you don't have the information there you know directly that this information is uninteresting for you.
Will be sent when a person no longer is to be considered PEP. In this case if the PEP that is no longer to be considered pep is a customer of yours you just need to match the personId in the keyMap and remove the PEP information and status you have on this customer.
In order to have a customer database with up to date PEP information you need to start the process up in a certain order:
1. Build webhook integration (webhook setup guide) and subscribe you webhook integration to PEP webhook updates.
Keep a fast storage with information about your customers that will need to be checked against the incoming webhook events in order to decide if the information is something that you need to download or take action on.
For PEP data, the information about your customers that you will need to keep in this storage is: personal number (for Swedish citizens), first name, last name, birth date and the unique personId received from our PEP service.
2. Build the PEP lookup against the PEP service part of your customer onboarding.
3. Make a full clean of your customer database against the PEP service where you save the PEP information for all hits you get from the service. Make sure to store the personId in the fast webhook storage that you have created.
4. Your automatic update chain is complete!