Hi Experts,
Could someone help me understand, how to use same field group in different schemas with different classes in AEP.
Views
Replies
Total Likes
From the AI Assistant within AEP:
Using the same field group in different schemas with different classes in Adobe Experience Platform (AEP) is a common practice that allows for reusability and consistency across data models. Here's how you can achieve this:
Create a Field Group: Start by creating a field group that defines the fields you want to reuse across different schemas. Field groups are reusable components that define one or more fields implementing certain functions, such as personal details, hotel preferences, or address. You can define your own field group to capture specific information that may not be covered by standard field groups.
Add Field Groups to Schemas: Once you have created a field group, you can add it to different schemas with different classes. To do this, open the schema within the Schema Editor and select "Add" next to "Field groups" in the left rail. A dialog will appear, showing a list of field groups that you can select for the schema. Since field groups are only compatible with one class, only those field groups associated with the schema’s selected class will be listed. You can select the checkbox next to the name of the field group that you wish to add to the schema.
Save and Reuse: When you save the schema, the new field group will be saved and it will be reusable in any other schema sharing the same base class. Any changes you make to the field groups or class of one schema will be reflected in all other schemas that employ them.
By following these steps, you can effectively use the same field group in different schemas with different classes in AEP, ensuring consistency and reusability across your data models.
Views
Replies
Total Likes
At the bottom of that response was a suggested prompt:
Reusing field groups across schemas in Adobe Experience Platform is a best practice that can help maintain consistency and efficiency in your data modeling efforts. Here are some key considerations and best practices for reusing field groups across schemas:
Standard Field Groups: Whenever possible, it is recommended to use standard field groups provided by Adobe Experience Platform. These field groups define common concepts such as personal details, contact information, and loyalty program status. By using standard field groups, you ensure that your schemas align with industry best practices and are compatible with Adobe's services and components.
Custom Field Groups: For concepts that are specific to your organization and not covered by standard field groups, you can define your own custom field groups. This allows you to capture information that is unique to your business requirements. When creating custom field groups, it's important to follow a consistent naming convention and ensure that the fields are well-documented for future reference.
Compatibility with Classes: Field groups are intended to be included as part of a schema that implements a compatible class. When reusing field groups across schemas, it's essential to ensure that the field groups are compatible with the classes they are being included in. This ensures that the structure and behavior of the data remain consistent across schemas.
Schema Composition: Schemas are composed of "zero or more" field groups, which means that you have the flexibility to reuse field groups across multiple schemas. When composing a schema, consider the compatibility of field groups with the class and the specific data structure you are aiming to achieve.
Schema Reusability: By reusing field groups across schemas, you can create a library of reusable components that define common data structures. This promotes consistency, reduces redundancy, and simplifies the process of creating new schemas.
By following these best practices, you can effectively reuse field groups across schemas in Adobe Experience Platform, leading to improved data consistency, efficiency, and maintainability.
Views
Replies
Total Likes
Hi @ShivaniMa
You are able to use OOTB or custom field groups in different schemas via API or UI. Using the API, you can create or add field groups via POST and PATCH calls referring back to the schema which you are looking to update. All field groups are re-usable across schemas dependent on Profile or Event classes.
Views
Replies
Total Likes
I want to use a fieldgroup across profile and event schemas but when I try to add the fielgroup to the schema I get:
Views
Replies
Total Likes
@Robsay you can't interchange the field groups between Profile and Event classes. The field group will either be one or the other. That is why you are receiving that error.
Views
Replies
Total Likes
When the field group is created there is a section in the body of meta: intendedToExtend. If you do not define a class when creating the field group via the API, there is an option to use the field group across classes.
Views
Replies
Total Likes
Thanks that's only part of the truth , so I had it actually figured out first , a patch to the fieldgroup with the payload:
[
{
"op": "replace",
"path": "/meta:intendedToExtend",
"value": [
"https://ns.adobe.com/xdm/context/profile",
"https://ns.adobe.com/xdm/context/experienceevent"
]
}
]
and then I had to find the schema and add it to the it, again with a patch
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies