Relating Data Objects via Import
When managing data imports in SPOTIO, it’s essential to understand how data objects are structured to ensure accurate relationships between them. SPOTIO uses a Parent/Child object hierarchy, where child objects (like Contacts) are related to parent objects (like Accounts). This article outlines how to relate your dataObjects via import by linking child records to parent records through the SPOTIO ID of the parent. Step 1: Understand Your dataObject Structure SPOTIO has customizable record types called dataObjects that can be related in a Parent/Child hierarchy. For example a common data model is Accounts and Contacts with Accounts as the parent object, and Contacts are the child object. To relate a child object to its parent, the SPOTIO dataObject Id of the parent record must be assigned in the Related To field of the child object when formatting the child object import template. Step 2: Import Your Parent dataObject Begin by importing your parent object (e.g., Accounts). To make future steps easier, we recommend including an External Record ID (such as an Account ID from Salesforce) in your data. This External Record ID should also be available on your child objects (e.g., Contacts) so you can link them later. You can use any piece of data that would be shared between the Contact and the Account to match them later (such as an Address), but it is best to use a value that does not change over time and is unique to the specific entities you want to link together. If you are already using External Record ID for something else, you can create an additional custom field for your other unique identifier on your Parent dataObject. Example: If importing Accounts, include an Account ID field from your external system (e.g., Salesforce) so it can be used for matching with Contacts later. Step 3: Export the Parent Objects to Get SPOTIO IDs After importing your parent objects, export them to obtain their SPOTIO record IDs. These IDs are crucial for relating the child objects to their parent records. In SPOTIO, navigate to the Export feature and download the file containing the recently imported parent objects (e.g., Accounts), which will include their SPOTIO record IDs. You can use the Date filter and “Record Created on” date option to zero in on the records you imported Step 4: Match SPOTIO IDs in Your Child Object Data Now, return to your child object data (e.g., Contacts) and use formulas like VLOOKUP or INDEX and MATCH in Excel or Google Sheets to match the parent records (using their External Record IDs) with the SPOTIO IDs. Example Formulas: VLOOKUP: =VLOOKUP([@ExternalRecordID], 'AccountsExport'!A:B, 2, FALSE) In this example, the formula looks up the External Record ID in your child object data and finds the corresponding SPOTIO ID from the parent object export (e.g., the 'AccountsExport' sheet where Column A has the External IDs, and Column B has the SPOTIO IDs). INDEX + MATCH: =INDEX('AccountsExport'!B:B, MATCH([@ExternalRecordID], 'AccountsExport'!A:A, 0)) Here, INDEX + MATCH is used to find the SPOTIO ID in Column B of the parent export, based on a match with the External Record ID in Column A. Once you’ve matched and populated the Related To field in the child object data with the SPOTIO ID of the parent, you’re ready to proceed with the import. Step 5: Import Your Child Objects With the Related To field correctly populated in your child object file, proceed to import the child objects (e.g., Contacts) into SPOTIO. This will establish the relationship between parent and child records based on the SPOTIO ID of the parent objects. Now that you’ve followed these steps, your data import will link child objects to their parent objects in SPOTIO, ensuring Contacts are associated with their appropriate accounts.