Skip to main content
All CollectionsPredict (Sensai) HelpFeature Guides
Define a Primary and a Child Entity Schema
Define a Primary and a Child Entity Schema
Updated over 8 months ago

An example of this would be where you have 2 files one for Opportunities and a second for Activities. In this case, the Primary Entity is OPPORTUNITY and the second Entity is ACTIVITY and they have a relationship.

  1. Press the Options button in the top left of the Navigation Bar and select Schemas

  2. Press Create Schema button

  3. Give the Schema a name - e.g. Opportunity and Activities

  4. Select Other as the Source

  5. Press Add Primary Entity button

  6. Add the Primary Entity Name - eg OPPORTUNITY and specify a Primary Entity Label

  7. Specify the column name that is unique for each row as the Primary Key

  8. Specify the Sort Order the same as the Primary Key

  9. Press the Add Entity button

  10. Add the Secondary Entity Name - eg ACTIVITY and specify a Primary Entity Label

  11. Specify the column name that is unique for each row as the Primary Key

  12. Specify the Sort Order as the Foreign Key to Opportunity followed by its Primary Key

    Schema_-_Child.png
  13. Press the Next button

  14. Press the Add Relationship button

  15. Select OPPORTUNITY as the Entity

  16. Select ACTIVITY as the Related Entity

  17. Specify the column on the ACTIVITY Entity that is the Foreign Key to OPPORTUNITY - eg OPPORTUNITYID

    Schema_-_Child_-_Relationship0.png
  18. Press the Create button

  19. Drill on the Schema and the overview should look like this

    Schema_-_Child_-_Overview0.png

Tip: You can add multiple child Entities related to the Primary Entitiy

Did this answer your question?