Relationship Between Attrribute | Community
Skip to main content
Level 2
September 18, 2024
Solved

Relationship Between Attrribute

  • September 18, 2024
  • 3 replies
  • 838 views

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?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by DavidRoss91

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

3 replies

DavidRoss91
Community Advisor
DavidRoss91Community AdvisorAccepted solution
Community Advisor
September 18, 2024

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

abhinavbalooni
Community Advisor
Community Advisor
September 25, 2024

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

brekrut
Adobe Employee
Adobe Employee
September 30, 2024

@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.