Data Annotation and Retention in Personalization

Personalization segment data, when perceived as sensitive, should be included in the audit report and removed once the customer decides to close the account.

Data Annotation

If you perceive segment data as sensitive, it is recommended to annotate it in the audit report configuration file. Follow the instructions on configuring the audit report in the creating report configuration section of Generic Data Report and Audit, and include the following configuration to make sure your data is properly annotated.
<type code="User">
...
    <virtual-attributes>
...
        <virtual-attribute expression="user" type="CxUserToSegment" many="true" displayName="cxUserToSegment"/>
...
    </virtual-attributes>
...
</type>
 
<type code="CxUserToSegment" displayName="CxUserToSegment">
  <atomic-attributes>
    <atomic-attribute qualifier="affinity" displayName="Affinity" />
  </atomic-attributes>
  <reference-attributes>
    <reference-attribute qualifier="segment" displayName="Segment" type="CxSegment" />
  </reference-attributes>
</type>
<type code="CxSegment" displayName="CxSegment">
  <atomic-attributes>
    <atomic-attribute qualifier="code" displayName="code" />
  </atomic-attributes>
</type>

Data Retention

When you use Personalization to collect the personal data of your customers, you may want to make sure the data is removed or anonymized after a certain period. The retention mechanisms provided by the Data Retention Framework included in the Platform help you do it.

The data removal mechanisms cover the following scenarios:
  • the user withdraws the consent, so the segments related to this user are no longer processed,
  • no consent is given during segment update, so we store an empty list as user segment effectively erasing all segments related to the user,
  • the user account is removed after retention period, so we remove all related data.

By adding a hook to the list of customerCleanupHooks we made sure that the user segment information is removed once the customerCleanupRelatedObjectsAction is executed. The action is defined in the yacceleratorcore extension and referenced by the customersWithOrdersRetentionCronJob/customersWithoutOrdersRetentionCronJob. For details on available cronJobs and Customer and Order Cleanup Hooking Mechanism, see Personal Data Erasure. For general information on the Data Retention Framework, see Data Retention.

cxCustomerSegmentRetentionJob

It may happen that the user does not give consent for data processing or withdraws such a consent. Since consent management is supported, segment information is still in the system, even if the user doesn't visit the page again. To handle such situations we provide (as part of the personalization essential data) a cxCustomerSegmentRetentionJob cronjob, which is not triggered by default, but may be easily configured. The cron job is looking for all user to segment relations for users that did not give any consent or have withdrawn their consent for consent templates defined in all personalization configuration objects.

The user to segment relation is base site aware. It means that removing the data depends on personalization configuration for a specific base site.

The relation will be removed only if:
  • the personalization configuration for a specific base site requires consent,
  • the user did not give any consent for required templates or has withdrawn consent for all required templates.
The relation will not be removed if:
  • there is no consent template defined in personalization configuration for base site
  • the user has at least one active consent defined in the personalization configurations for a base site

Removing Data for Several Base Sites

Have a look at the following scenario to learn more about data removal in a situation when the user has access to several base sites.
  • The user defined in the system has access to many base sites.
  • Let's assume electronics site requires consent, and apparel-uk doesn't. The user visits apparel site, and doesn't give any consent, because it is not required. Additionally, the user visits the electronics site and gives the needed consent there.
  • At that moment customer have segments for electronics and apparel-uk.
  • Let's assume that later the user withdrew the consent for electronics.
  • If the cronjob is executed, the system removes the user to segment relation only for electronics.

For general information on data deletion, see Deletion.