Mapping Salesforce Records with Existing Containers

Salesforce records of any type can be mapped to a Content Manager Container.
By default, when a configured sObject (Salesforce or custom) record is created in Salesforce, a new Container is created in Content Manager.
But when a Salesforce Org has existing records or imported migrated data, and those records have an existing Content Manager Container, then a bulk creation of T4S Container pointers can be created to map those Salesforce records with their existing Containers.

The mapping between a Salesforce record and a Content Manager container is held in the T4S-managed package Container record.

The bulk creation of these records can be created within a CSV spreadsheet and then imported into Salesforce using the Salesforce Data Loader.

To create the mapping Spreadsheet there will need to be an export of the Salesforce records that need mapping, and an export of the Content Manager Containers through Container Search.

The Salesforce data required for the mapping consists of the following:

  • The T4S Setting ID for the sObject the records blowing to.
    i.e. For Salesforce Cases, you could use this SOQL query:
    Select Id from fuseit_t4s__Trim_Setting__c Where fuseit_t4s__sObject_Name__c = 'Case'

  • The list of Salesforce record IDs to map against the Content Manager Containers
    e.g. List of Salesforce Case Ids

  • The lookup field in the Salesforce records will be used to identify the correct Content Manager Container the record should be mapped.
    i.e. A Salesforce migration ID field, a Name field, an external ID field, etc.
    Something from the Salesforce records that can be used to identify the correct Content Manager Container record.

The Content Manager Container search results and export should contain the following:

  • Container Title

  • Container Record Number

  • Container Unique Identifier

  • Container Record Type (optional)

  • Container property, title, or value that will allow the mapping with the Salesforce record lookup field.

  • Container parent Container Unique Identifier (optional)

Using the information exported from Salesforce and the Container data exported from Content Manager, then the mapping CSV Spreadsheet can be created.

The mapping will create a list of T4S Container pointers that can be bulk imported, so the Salesforce records are correctly mapped to their Content Manager Containers.

The mapping for the T4S Container pointer is as follows.

  • fuseit_t4s__Trim_Settings_Container__c

    • fuseit_t4s__Trim_Setting__c = fuseit_t4s__Trim_Setting__c.Id (e.g. Id for T4S Case Setting)

    • Name = Container Title

    • fuseit_t4s__RecordType_Name__c = Container Record Type (Optional)

    • fuseit_t4s__Trim_Container_Record_Number__c = Container Record Number

    • fuseit_t4s__Trim_Container_Uri__c = Container Unique Identifier

    • fuseit_t4s__sObject_ID__c = Salesforce record Id (e.g. Case Id)

    • fuseit_t4s__Trim_Parent_Container_Uri__c = Container parent Unique Identifier (Optional)

Once the mapping has been created, the CSV Spreadsheet can be bulk imported, and the mapping between the existing Salesforce records and their Content Manager Container is complete.