Walkthrough: Adding a new field to a data extension

Current version: 7.0

The default data extension definitions include a number of predefined fields. If you want to add other fields to a Salesforce Marketing Cloud (SFMC) data extension, you can change the data extension definition in the tenant.

This walkthrough uses the example of adding a text field to the xDB Contact data extension, and describes how to:

  • Add a field to the tenant

  • Create a source value accessor

  • Create a target value accessor

  • Create a mapping between the value accessors

  • Update the data extension.

Add a field to the tenant

This example assumes you want to add a new attribute to the contact record. To do this, you must first define the new attribute by adding a new field to your tenant.

To add a field to your tenant:

  1. In Sitecore, in the Content Editor, find your tenant and go to Tenant Settings/Providers/SFMC/Object Definitions/Data Extensions/xDB Contact.

  2. In the Insert menu, click Text. Enter a name for the field.

  3. In the Required Settings section, fill in the following properties:

    • Length – the maximum length of the data in the field.

    • Name – a unique attribute key for accessing the attribute.

    • Type – the type of data the field contains.

  4. In the Optional Settings section, fill in the following properties or leave them blank:

    • Default Value – enter a default value for the attribute.

    • Primary Key – make the attribute the primary key.

    • Required – make the attribute a required field.

    Text field settings
  5. Click Save.

Create a source value accessor

You must add a value accessor that can read the field value in xConnect.

To add a source value accessor:

  1. Go to Data Access/Value Accessor Sets/Providers/xConnect/Contact.

  2. Right-click Contact and in the Insert menu, click xConnect Entity Facet Property Value Accessor.

  3. Enter the item name and then click OK.

  4. In the Settings section, in the Facet Property field, click the field that you want the accessor to connect to.

  5. Click Save.

Create a target value accessor

You must add a value accessor that can update the field value in SFMC.

To add a target value accessor:

  1. In your tenant, go to Data Access/Value Accessor Sets/Providers/SFMC/Sitecore - xDB Contact.

  2. Open the Insert menu. Click the Flat Object - Data Extension Template Field Value Accessor accessor.

    Insert accessors menu
    Note

    You can also click the Flat Object - Value Accessor By Key accessor, but you must then manually maintain the field name, if it is changed in the data definition.

  3. In the Settings section, in the Field field, click the field the accessor connects to.

    Value accessor settings
  4. Click Save.

Create a mapping between the value accessors

You must create a mapping between the source value accessor and the target value accessor.

To create a mapping:

  1. In your tenant, go to Value Mapping Sets/Sitecore - xConnect Contact To SFMC/xConnect Contact – To Flat Object.

  2. In the Insert menu, click Value Mapping. Enter a name for the mapping.

  3. In the Source Accessor field, select the value accessor that reads the value from xConnect.

  4. In the Target Accessor field, select the value accessor that writes the value to SFMC.

  5. Click Save.

Update the data extension

Finally, you must add the new field to the data extension in SFMC.

To add the field to the data extension, you can do one of the following two things:

  • Create the field manually in the data extension in SFMC.

  • Delete the data extension in SFMC and run the Setup - SFMC Account Infrastructure pipeline batch.

    Important

    If you choose to delete the data extension, you must link the Sitecore data to the SFMC data extension again, as described in Walkthrough: Linking Sitecore data to the Salesforce data extensions.

Do you have some feedback for us?

If you have suggestions for improving this article,