You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cdp/cdp_activation/cdp_data_export.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,9 @@ There are two versions of this command `--draft/--no-draft`.
45
45
The first one is used to send the test user data to the Data Manager.
46
46
If it passes a validation test in the **Activation** section, use the latter one to send a full version.
47
47
48
+
You can extend exported user data with custom fields from your user content, such as date of birth, preferences, or other profile information.
49
+
For more information, see [Data customization](cdp_data_customization.md#export-additional-user-data).
50
+
48
51
Next, go back to [[= product_name_cdp =]] and select **Validate & download**.
49
52
If the file passes, you can see a confirmation message.
50
53
Now, you can go to the **File mapping** section.
@@ -63,6 +66,9 @@ If you make any alterations, select the **Parse File** to generate columns with
63
66
In the **Transform & Map** section you transform data and map it to a schema.
64
67
At this point, you can map **email** to **email** and **id** to **integer** fields to get custom columns.
65
68
69
+
If you have [extended user data export with custom fields](cdp_data_customization.md#export-additional-user-data), those fields appear as additional columns in this section.
70
+
Make sure to add them to your schema in Raptor so they can be used for segmentation and personalization.
71
+
66
72
Next, select **Create schema based on the downloaded columns**.
67
73
It moves you to Schema Creator.
68
74
There, choose **PersonalData** as a parent and name the schema.
Copy file name to clipboardExpand all lines: docs/cdp/cdp_data_customization.md
+47-6Lines changed: 47 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,14 +5,55 @@ edition: experience
5
5
6
6
# Data customization
7
7
8
-
You can customize content and product data exported to CDP and you can control what field type information you want to export.
8
+
You can customize user, content, and product data exported to CDP and you can control what field type information you want to export.
9
9
By default, custom field types have basic export functionality.
10
10
It casts their `Value` object to string, thanks to `\Stringable` implementation.
11
11
12
+
## Export additional user data
13
+
14
+
You can extend user data exported to CDP by attaching custom information, for example user content fields or user preferences.
15
+
Use it for advanced customer segmentation and personalization in marketing campaigns.
16
+
17
+
To add custom data to user exports, create a class that extends [`\Ibexa\Contracts\Cdp\Export\User\AbstractUserItemProcessor`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Cdp-Export-User-AbstractUserItemProcessor.html) and implement the `doProcess()` method.
18
+
The base class handles user field validation and provides helper methods for working with user content.
19
+
20
+
The following example adds a custom date of birth field to the exported data:
The `priority` parameter controls the order of execution when multiple processors are registered.
38
+
Higher priority values run first.
39
+
Your custom processor can modify the data returned from the previous processors, for example by adding new entries or modifying the existing ones.
40
+
41
+
The exported user data includes your custom fields:
42
+
43
+
```json
44
+
{
45
+
"date_of_birth": "2000-01-01",
46
+
"id": 1,
47
+
"login": "example",
48
+
"email": "example@example.org",
49
+
"name": "John Doe",
50
+
}
51
+
```
52
+
12
53
## Export field types
13
54
14
55
Field types are exported with metadata, for example, ID, field definition name, type, or value.
15
-
You can also provide your own `\Ibexa\Contracts\Cdp\Export\Content\FieldProcessorInterface` instance to extend metadata.
56
+
You can also provide your own [`\Ibexa\Contracts\Cdp\Export\Content\FieldProcessorInterface`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Cdp-Export-Content-FieldProcessorInterface.html) instance to extend metadata.
16
57
The provided implementation has to be defined as a service and tagged with `ibexa.cdp.export.content.field_processor`.
17
58
Additionally, you can specify `priority` to override the default behavior.
18
59
All system Field Processors use `-100` priority, and any higher priority value overrides them.
@@ -47,7 +88,7 @@ You can only use scalar values.
47
88
48
89
You can provide your own CDP export functionality by using one of the system Field Processors:
To customize export of field type values, provide your own `\Ibexa\Contracts\Cdp\Export\Content\FieldValueProcessorInterface` instance.
108
+
To customize export of field type values, provide your own [`\Ibexa\Contracts\Cdp\Export\Content\FieldValueProcessorInterface`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Cdp-Export-Content-FieldValueProcessorInterface.html) instance.
68
109
New implementation has to be registered as a service manually or by using autoconfiguration.
69
110
The service has to use the tag `ibexa.cdp.export.content.field_value_processor`.
70
111
You can also provide `priority` property to override other Field Value Processors.
@@ -85,7 +126,7 @@ This Processor is a default one, as long as no other Processor with higher prior
This Processor generates JSON data from hash representation of the field type (it uses `\Ibexa\Contracts\Core\FieldType\FieldType::toHash` method).
129
+
This Processor generates JSON data from hash representation of the field type (it uses [`\Ibexa\Contracts\Core\FieldType\FieldType::toHash`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-FieldType-FieldType.html#method_toHash) method).
0 commit comments