---
schema_version: "1"
id: d24a5254bbf00fb3999b50698d341709102fd0ff1d8253c5d52fe9648ddad015
title: Configure an External Integration Component for Bulk Sends
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_for_bulk_sends.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.mc_dm_configure_external_integration_for_bulk_sends.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: dad8100be2a77bc4672f3cfd0495d65232ee82837122e7040d51f6eb7c247efb
description: To create an interaction for bulk sends in Distributed Marketing, configure an external integration component.
products:
  - Marketing
  - Cross Cloud
release: "264"
---
# Configure an External Integration Component for Bulk Sends

To create an interaction for bulk sends in Distributed Marketing, configure an external integration component.

Your Custom Personalization Interaction component must have its controller set to an Apex class name that implements the BulkSendPlugin interface for back-end processing. See “BulkSendPluginImplOne” in the `<aura:component>` in the code.

```
<aura:component access="GLOBAL" implements="mcdm_15:MessagePersonalizationHandler" controller="BulkSendPluginImplOne">
    <aura:attribute access="GLOBAL" name="personalizationReadyHandler" type="Aura.Action" default="{!c.messagePersonalizationReady}"/>
    
    <aura:attribute name="foo1" access="private" type="String" description="Variable foo1"/>
    
    <aura:attribute name="selectedMembers" access="private" type="Object[]" description="The currently selected object"/>
    
    <aura:handler name="init" value="{!this}" action="{!c.init}"/>
    
    <lightning:spinner variant="brand" size="large" aura:id="mySpinner"/>

    <div class="slds-card">
        <div class="slds-card__header">
            <div class="slds-media slds-media_center">
                <div class="slds-media__figure">
                    <lightning:icon iconName="custom:custom24" size="large"/>
                </div>
                <div class="slds-media__body">
                    <p class="slds-text-heading_small">Bulk Plugin One - foo1</p>
                    <p>Every change fires a <span class="slds-theme_shade">mcdm_15:JourneyApprovalsDataProvided</span> event</p>
                </div>
            </div>
        </div>
        
        <div class="slds-card__body slds-card__body_inner">
            <div>
                <p class="slds-text-title slds-text-align_center">'{!v.selectedMembers.length}' user(s) selected</p>
            </div>
            <div class="slds-m-around_medium">
                <lightning:input class="slds-m-bottom_small" label="foo1" value="{!v.foo1}" onchange="{!c.handleInputChanged}"/>
            </div>
        </div>
    </div>
</aura:component>
```

Input from the Custom Personalization Interaction component is tracked differently depending on the workflow. In Bulk Send for Campaign or Bulk Send for Quick Send List View, the CPI input is tracked as part of the customData on the selectedMember record. Auto Send has no selectedMember records in context, so CPI input is tracked in a separate customData parameter.

```
({
    init: function(cmp) {
        cmp.set('v.selectedMembers', []);
    },
    
    messagePersonalizationReady: function(cmp, event) {
        var selectedMembers = event.getParam('arguments').members;
        var customData = event.getParam('arguments').customData;
        cmp.set('v.selectedMembers', selectedMembers);
        
        if (selectedMembers.length) {
            var data = selectedMembers[0].customData || {};
            cmp.set('v.foo1', data.foo1 || '');
        } else if (customData != null) {
            var data = customData.autosend || {};
            cmp.set('v.foo1', data.foo1 || '');
        }
 
        var spinner = cmp.find('mySpinner');
        $A.util.addClass(spinner, 'slds-hide');
    },
    
    handleInputChanged: function(cmp) {
        var data = {
            foo1: cmp.get('v.foo1')
        };
        
        var selectedMembers = cmp.get('v.selectedMembers'),
            id,
            dataProvidedEvent;
        
        if (selectedMembers.length) {
            selectedMembers.forEach(function(member) {
                dataProvidedEvent = $A.get('e.mcdm_15:JourneyApprovalsDataProvided');
                id = member.campaignMemberId || member.objectId;
                dataProvidedEvent.setParams({
                    id: id,
                    data: data
                });
                dataProvidedEvent.fire();
            });
        } else {
            dataProvidedEvent = $A.get('e.mcdm_15:JourneyApprovalsDataProvided');
            dataProvidedEvent.setParams({
                id: 'autosend',
                data: data
            });
            dataProvidedEvent.fire();
        }
    }
})
```