---
schema_version: "1"
id: 18b6779d22393d2ed5eb27bbf0f00744c9f6d1c30abc688d19286951536f5449
title: Configure an External Integration Component
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/mc_dm_configure_external_integration_component.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.mc_dm_configure_external_integration_component.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 67ad009c7525e9a742b69e3b01d1aeea869814924154c6987203b70bd185f347
description: The first step to create an interaction in Distributed Marketing is to configure an external integration component. Your component works with Distributed Marketing as follows.
products:
  - Marketing
  - Cross Cloud
release: "264"
---
# Configure an External Integration Component

The first step to create an interaction in Distributed Marketing is to configure an external integration component. Your component works with Distributed Marketing as follows.

1. When the personalization window is loaded, Distributed Marketing calls an interface method on the integration component with the list of selected members.
2. Standard Distributed Marketing users interact with the external integration component as you define. For example, select a value from a pick list populated with available alternate email addresses.
3. The external integration component can fire an event anytime with custom data for individual campaign members. To set custom data for multiple members, multiple events can fire.

Your custom component must be flagged as global and implement the `mcdm_15:MessagePersonalizationHandler` interface.

To use this interface, create an `Aura.Action` attribute named personalizationReadyHandler with a default method to capture the list of selected members when the personalization window loads. Each selected member object contains properties such as the campaign member’s name and ID. Your component can use these properties to further customize your user experience.

```
<aura:component access="GLOBAL" implements="mcdm_15:MessagePersonalizationHandler">
    
    <aura:attribute
        access="GLOBAL"
        name="personalizationReadyHandler"
        type="Aura.Action"
        default="{!c.messagePersonalizationReady}"
    />
    
    Hello, world!
</aura:component>
```

This example controller method accepts the list of selected pending campaign members and sets custom data for each member by firing an `mcdm_15:JourneyApprovalsDataProvided` event for each one. Each approved member’s record in the associated journey’s event data extension receives the value bar for the custom field foo.

```
({
    //Handler for action personalizationReadyHandler to receive member data
    messagePersonalizationReady: function(component, data) {
        // Get array of members (JourneyApproval objects)
        var members = data.getParam('arguments').members;

        // Loop through each member
        members.forEach(function(member) {        
            // Get, configure and Fire an event (e.mcdm_15:JourneyApprovalsDataProvided) 
            // with updated custom data for each member.
            $A.get('e.mcdm_15:JourneyApprovalsDataProvided')
                .setParams({
                    id: member.campaignMemberId,
                    data: {
                        'foo' : 'bar'
                    }
                })
                .fire();
        });
    }
})
```

This outline includes the shape of each selected member object, called a JourneyApproval object. You can reference this data within your external integration component.

```
JourneyApproval: {
    /**
     * The ID of the Marketing Cloud Engagement Journey.
     * 
     * @type {String}
     */
    externalJourneyId,

    /**
     * The Salesforce ID of the associated Contact or Lead object.
     * 
     * @type {String}
     */
    objectId,

    /**
     * The type of Campaign Member object, e.g. Lead or Contact.
     * 
     * @type {String}
     */
    objectType,

    /**
     * The Salesforce ID of the associated Campaign.
     * 
     * @type {String}
     */
    campaignId,

    /**
     * The Salesforce ID of the associated Campaign Member
     * 
     * @type {String}
     */
    campaignMemberId,

    /**
     * The first name of the associated Campaign Member.
     * 
     * @type {String}
     */
    firstName,

    /**
     * The last name of the associated Campaign Member.
     * 
     * @type {String}
     */
    lastName,

    /**
    * Maps messages to personalization values via their ID's.
    *
    * e.g., introduction and closing values for the message
    * with ID 'abc' can be accessed on a JourneyApproval object
    * using the following syntax:
    * journeyApproval.messages['abc'].introduction
    * journeyApproval.messages['abc'].closing
    * 
    * @type {Object}
    */
    messages,

    /**
    * The currently selected greeting option.
    * 
    * This object contains the following properties:
    * greeting.label - The UI display text
    * greeting.value - The greeting payload
    *
    * @type {Object}
    */
    greeting,

    /**
    * A map of key value pairs set by a registered 
    * plugin component
    *
    * @type {Object}
    */
    customData,

    /**
     * The current status (Pending, Rejected, Failed) of 
     * the associated Campaign Member.
     * 
     * @type {String}
     */
    status
}
```

#### See Also

- [Components](https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/intro_components.htm)