Expand my Community achievements bar.

SOLVED

Relationship Between Attrribute

Avatar

Level 2

How to establish relationship between two attributes within different schema?

 

Scenrio: We have two schemas -

    • ABC Schema:
      • Attributes: first name, last name, profile ID.
    • XYZ Schema:
      • Attributes (within an array object): address ID, address code, address name.
  • Goal:

    • Establish a relationship between these two schemas with the help of these below attribute:
      • Profile ID (from ABC Schema)
      • Address ID (from XYZ Schema)

How can we achieve that?

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @BellaSnow5378 

You can use the Relationship feature in AEP to connect the two schemas. Attached documentation on this below.

https://experienceleague.adobe.com/en/docs/experience-platform/xdm/tutorials/relationship-ui

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @BellaSnow5378 

You can use the Relationship feature in AEP to connect the two schemas. Attached documentation on this below.

https://experienceleague.adobe.com/en/docs/experience-platform/xdm/tutorials/relationship-ui

Avatar

Community Advisor

Hi @BellaSnow5378 

 

There are a couple of things you need to look at before you look at creating relationships in the above scenario.

 

Are the above two schemas from the same class or different classes ? By the fields you’ve mentioned, it seems these belong to different classes. If that is the case, @DavidRoss91 shared the link to schema relationship documentation which should help but in your case above, you do not have a field in the source schema which can reference the primary identity field in the reference schema. Essentially, there is no ‘link’ currently between the two schemas and you would need one to create a relationship.

 

Do let us know how you go with it.

 

Cheers,

Abhinav

Avatar

Employee

@BellaSnow5378 

 

With the use case you have mentioned above it appears you are attempting to create reference between a individual profile and one or more addresses which they are associated with.

 

You can create an array upon the ABC schema which maps to a lookup schema.  The lookup schema would be a schema defined as the Address information.  

 

The connection would be an attribute in the address array upon the ABC schema to the XYZ schema.