How to Display a Salesforce "Contact Role" Field in the Insight Contact View (via XML Layout)

Grace Wannapongsai
Grace Wannapongsai
  • Updated

Overview

This article explains how to add a Salesforce Contact field (e.g., Contact Role) to the Insight contact view by exporting configuration XML, updating the Contact layout/field definition, and re-importing it. It also covers why a field may not appear even after a successful import, commonly because the Salesforce connection's Contact object definition/metadata doesn't include that field yet. 

Prerequisites

Getting the Salesforce Field API Name

Before updating Insight, confirm the field's API name in Salesforce (example format: Contact_Role__c).

  1. In Salesforce, go to Setup.

    Setup-zoom.PNG

  2. Navigate to Objects and Field > Object Manager > Contact.

    setup-obj-manager.png

    obj-manager-contact-marked.PNG

  3. Select Fields & Relationships.

    Contact_Role__c.png

  4. Find your field (e.g., "Contact Role") and copy its API Name.

    Contact_Role__c-marked.PNG

Note: If you don't have a "data plugin" or field list elsewhere, Salesforce Setup is the reliable way to get the exact API name. 

Export the Insight Configuration XML

  1. In the Insight panel, click Settings
  2. Go to Import/Export.

    cropped-im-ex.PNG

  3. Select Export > Export Custom.

    export-custom.png
  4. Download the configuration XML.

Update the Contact Layout in the XML

Adding the field to the Contact view layout (the area that already contains field like phone/email).

  1. Open the exported XML in a text editor (e.g., Notepad).
  2. Turn Word Wrap OFF (make it easier to validate structure).

    word_wrap_off.png

  3. Locate the Contact layout section for the summary/detail view. 
  4. Add a new field entry to the layout list in the desired position.

Quick Tip: Keep the ordering intentional. If the layout is a list, where you insert the field typically determines where it appears in the UI.

Add the Field Definition in the <fields> Block

Defining how the field is labeled and mapped.

  1. Find the <fields> ... </fields> section for Contact in the XML.
  2. Add a new field definition that matches the layout key you added previously
  3. Configure the field definition:
    • Label: use a user-friendly label (e.g., Contact Role).
    • Format: 0.
    • Tooltip: remove it if you do not want hover text.
    • Mapping: point the field to the Salesforce Contact field using the expected custom field pattern (e.g., custom.<API_NAME> such as custom.Contact_Role__c). 

Important: Be careful with XML syntax. A common reason for import failure is broken nesting or missing closing tags around <fields> and related blocks. 

Save and Import the Updated XML

  1. Save the file with a clean name and ensure it is saved as .xml (not a .txt renamed).
  2. In the Insight panel, click Settings.
  3. Go to Import/Export.
  4. Choose Import configuration from file.

    import_config_file.PNG
  5. Click Browse, select your updated XML, and click Import.

  6. If prompted, select Reload settings.

Troubleshooting

If the Field Still Doesn't Appear: Check Salesforce Connection Object Definitions 

If import succeeds but the field is still missing in Insight, the most common blocker is that the Salesforce connection configuration does not include the field in the Contact object definition/metadata. 

Have someone who manages the Salesforce connection do the following:

  1. Open the relevant Salesforce connection (for your policy/tenant).
  2. Go to Object Definitions.
  3. Select Contacts.
  4. Find the custom field (e.g., Contact_Role__c) and move/enable it so it's included in the allowed fields.
  5. Refresh the Contact object definition/metadata.
  6. Re-test in Insight.

Import fails with an error

  • Confirm the file is a real .xml file (not a .txt renamed).
  • Re-check XML structure (matching open/close tags, correct nesting).
  • Remove the accidental duplicates or malformed attributes that may have been introduced during editing.