-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Associate a new prospect to a list in Salesforce Account Engagement when a new subscriber is created in MailChimp
- Loading branch information
1 parent
d1cd946
commit 01ffa2f
Showing
1 changed file
with
323 additions
and
0 deletions.
There are no files selected for viewing
323 changes: 323 additions & 0 deletions
323
... list in Salesforce Account Engagement when a new subscriber is created in MailChimp.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,323 @@ | ||
$integration: http://ibm.com/appconnect/integration/v2/integrationFile | ||
integration: | ||
type: trigger-action | ||
trigger-interfaces: | ||
trigger-interface-1: | ||
type: event-trigger | ||
triggers: | ||
CREATED: | ||
input-context: | ||
data: Members | ||
assembly: | ||
$ref: '#/integration/assemblies/assembly-1' | ||
options: | ||
list_id: 6fc8383307 | ||
parentFilter: | ||
list_id: 6fc8383307 | ||
connector-type: mailchimp | ||
action-interfaces: | ||
action-interface-3: | ||
type: api-action | ||
business-object: getApiV5ObjectsLists_model | ||
connector-type: salesforceae | ||
actions: | ||
RETRIEVEALL: {} | ||
action-interface-4: | ||
type: api-action | ||
business-object: postApiV5ObjectsLists_model | ||
connector-type: salesforceae | ||
actions: | ||
postApiV5ObjectsLists: {} | ||
action-interface-5: | ||
type: api-action | ||
business-object: postApiV5ObjectsProspects_model | ||
connector-type: salesforceae | ||
actions: | ||
postApiV5ObjectsProspects: {} | ||
action-interface-6: | ||
type: api-action | ||
business-object: postApiV5ObjectsListMemberships_model | ||
connector-type: salesforceae | ||
actions: | ||
postApiV5ObjectsListMemberships: {} | ||
action-interface-7: | ||
type: api-action | ||
business-object: postApiV5ObjectsProspects_model | ||
connector-type: salesforceae | ||
actions: | ||
postApiV5ObjectsProspects: {} | ||
action-interface-8: | ||
type: api-action | ||
business-object: postApiV5ObjectsListMemberships_model | ||
connector-type: salesforceae | ||
actions: | ||
postApiV5ObjectsListMemberships: {} | ||
action-interface-1: | ||
type: api-action | ||
business-object: Lists | ||
connector-type: mailchimp | ||
actions: | ||
RETRIEVEALL: {} | ||
assemblies: | ||
assembly-1: | ||
assembly: | ||
execute: | ||
- retrieve-action: | ||
name: MailChimp Retrieve lists | ||
target: | ||
$ref: '#/integration/action-interfaces/action-interface-1' | ||
filter: | ||
where: | ||
id: '{{$Trigger.list_id}}' | ||
input: | ||
- variable: Trigger | ||
$ref: '#/trigger/payload' | ||
- variable: flowDetails | ||
$ref: '#/flowDetails' | ||
limit: 10 | ||
allow-truncation: false | ||
pagination-type: SKIP_LIMIT | ||
allow-empty-output: false | ||
- retrieve-action: | ||
name: Salesforce Account Engagement Retrieve lists | ||
target: | ||
$ref: '#/integration/action-interfaces/action-interface-3' | ||
filter: | ||
where: | ||
and: | ||
- Pardot-Business-Unit-Id: 0Uv4L000000blJTSAY | ||
- name: '{{$MailChimpRetrievelists.name}}' | ||
input: | ||
- variable: Trigger | ||
$ref: '#/trigger/payload' | ||
- variable: MailChimpRetrievelists | ||
$ref: '#/node-output/MailChimp Retrieve lists/response/payload' | ||
- variable: MailChimpRetrievelistsMetadata | ||
$ref: '#/node-output/MailChimp Retrieve lists/response' | ||
- variable: flowDetails | ||
$ref: '#/flowDetails' | ||
limit: 10 | ||
allow-truncation: true | ||
pagination-type: TOKEN | ||
allow-empty-output: true | ||
- if: | ||
name: If | ||
input: | ||
- variable: Trigger | ||
$ref: '#/trigger/payload' | ||
- variable: MailChimpRetrievemembers | ||
$ref: '#/node-output/MailChimp Retrieve members/response/payload' | ||
- variable: MailChimpRetrievemembersMetadata | ||
$ref: '#/node-output/MailChimp Retrieve members/response' | ||
- variable: MailChimpRetrievelists | ||
$ref: '#/node-output/MailChimp Retrieve lists/response/payload' | ||
- variable: MailChimpRetrievelistsMetadata | ||
$ref: '#/node-output/MailChimp Retrieve lists/response' | ||
- variable: SalesforceAccountEngagementRetrievelists | ||
$ref: >- | ||
#/node-output/Salesforce Account Engagement Retrieve | ||
lists/response/payload | ||
- variable: SalesforceAccountEngagementRetrievelistsMetadata | ||
$ref: >- | ||
#/node-output/Salesforce Account Engagement Retrieve | ||
lists/response | ||
- variable: flowDetails | ||
$ref: '#/flowDetails' | ||
branch: | ||
- condition: | ||
'{{$SalesforceAccountEngagementRetrievelistsMetadata."status-code"}}': '204' | ||
execute: | ||
- custom-action: | ||
name: Salesforce Account Engagement Create list | ||
target: | ||
$ref: '#/integration/action-interfaces/action-interface-4' | ||
action: postApiV5ObjectsLists | ||
map: | ||
mappings: | ||
- Pardot-Business-Unit-Id: | ||
template: 0Uv4L000000blJTSAY | ||
- name: | ||
template: '{{$MailChimpRetrievelists.name}}' | ||
$map: http://ibm.com/appconnect/map/v1 | ||
input: | ||
- variable: Trigger | ||
$ref: '#/trigger/payload' | ||
- variable: MailChimpRetrievelists | ||
$ref: >- | ||
#/node-output/MailChimp Retrieve | ||
lists/response/payload | ||
- variable: MailChimpRetrievelistsMetadata | ||
$ref: '#/node-output/MailChimp Retrieve lists/response' | ||
- variable: SalesforceAccountEngagementRetrievelists | ||
$ref: >- | ||
#/node-output/Salesforce Account Engagement | ||
Retrieve lists/response/payload | ||
- variable: SalesforceAccountEngagementRetrievelistsMetadata | ||
$ref: >- | ||
#/node-output/Salesforce Account Engagement | ||
Retrieve lists/response | ||
- variable: flowDetails | ||
$ref: '#/flowDetails' | ||
- custom-action: | ||
name: Salesforce Account Engagement Create prospect | ||
target: | ||
$ref: '#/integration/action-interfaces/action-interface-5' | ||
action: postApiV5ObjectsProspects | ||
map: | ||
mappings: | ||
- Pardot-Business-Unit-Id: | ||
template: 0Uv4L000000blJTSAY | ||
- email: | ||
template: '{{$Trigger.email_address}}' | ||
- firstName: | ||
template: '{{$Trigger.merge_fields.FNAME}}' | ||
- lastName: | ||
template: '{{$Trigger.merge_fields.LNAME}}' | ||
$map: http://ibm.com/appconnect/map/v1 | ||
input: | ||
- variable: Trigger | ||
$ref: '#/trigger/payload' | ||
- variable: SalesforceAccountEngagementCreatelist | ||
$ref: >- | ||
#/block/If/node-output/Salesforce Account | ||
Engagement Create list/response/payload | ||
- variable: MailChimpRetrievelists | ||
$ref: >- | ||
#/node-output/MailChimp Retrieve | ||
lists/response/payload | ||
- variable: MailChimpRetrievelistsMetadata | ||
$ref: '#/node-output/MailChimp Retrieve lists/response' | ||
- variable: SalesforceAccountEngagementRetrievelists | ||
$ref: >- | ||
#/node-output/Salesforce Account Engagement | ||
Retrieve lists/response/payload | ||
- variable: SalesforceAccountEngagementRetrievelistsMetadata | ||
$ref: >- | ||
#/node-output/Salesforce Account Engagement | ||
Retrieve lists/response | ||
- variable: flowDetails | ||
$ref: '#/flowDetails' | ||
- custom-action: | ||
name: Salesforce Account Engagement Create list membership | ||
target: | ||
$ref: '#/integration/action-interfaces/action-interface-6' | ||
action: postApiV5ObjectsListMemberships | ||
map: | ||
mappings: | ||
- Pardot-Business-Unit-Id: | ||
template: 0Uv4L000000blJTSAY | ||
- listId: | ||
expression: '$SalesforceAccountEngagementCreatelist.id ' | ||
- prospectId: | ||
expression: '$SalesforceAccountEngagementCreateprospect.id ' | ||
$map: http://ibm.com/appconnect/map/v1 | ||
input: | ||
- variable: Trigger | ||
$ref: '#/trigger/payload' | ||
- variable: SalesforceAccountEngagementCreatelist | ||
$ref: >- | ||
#/block/If/node-output/Salesforce Account | ||
Engagement Create list/response/payload | ||
- variable: SalesforceAccountEngagementCreateprospect | ||
$ref: >- | ||
#/block/If/node-output/Salesforce Account | ||
Engagement Create prospect/response/payload | ||
- variable: MailChimpRetrievelists | ||
$ref: >- | ||
#/node-output/MailChimp Retrieve | ||
lists/response/payload | ||
- variable: MailChimpRetrievelistsMetadata | ||
$ref: '#/node-output/MailChimp Retrieve lists/response' | ||
- variable: SalesforceAccountEngagementRetrievelists | ||
$ref: >- | ||
#/node-output/Salesforce Account Engagement | ||
Retrieve lists/response/payload | ||
- variable: SalesforceAccountEngagementRetrievelistsMetadata | ||
$ref: >- | ||
#/node-output/Salesforce Account Engagement | ||
Retrieve lists/response | ||
- variable: flowDetails | ||
$ref: '#/flowDetails' | ||
else: | ||
execute: | ||
- custom-action: | ||
name: Salesforce Account Engagement Create prospect 2 | ||
target: | ||
$ref: '#/integration/action-interfaces/action-interface-7' | ||
action: postApiV5ObjectsProspects | ||
map: | ||
mappings: | ||
- Pardot-Business-Unit-Id: | ||
template: 0Uv4L000000blJTSAY | ||
- email: | ||
template: '{{$Trigger.email_address}}' | ||
- firstName: | ||
template: '{{$Trigger.merge_fields.FNAME}}' | ||
- lastName: | ||
template: '{{$Trigger.merge_fields.LNAME}}' | ||
$map: http://ibm.com/appconnect/map/v1 | ||
input: | ||
- variable: Trigger | ||
$ref: '#/trigger/payload' | ||
- variable: MailChimpRetrievelists | ||
$ref: >- | ||
#/node-output/MailChimp Retrieve | ||
lists/response/payload | ||
- variable: MailChimpRetrievelistsMetadata | ||
$ref: '#/node-output/MailChimp Retrieve lists/response' | ||
- variable: SalesforceAccountEngagementRetrievelists | ||
$ref: >- | ||
#/node-output/Salesforce Account Engagement | ||
Retrieve lists/response/payload | ||
- variable: SalesforceAccountEngagementRetrievelistsMetadata | ||
$ref: >- | ||
#/node-output/Salesforce Account Engagement | ||
Retrieve lists/response | ||
- variable: flowDetails | ||
$ref: '#/flowDetails' | ||
- custom-action: | ||
name: Salesforce Account Engagement Create list membership 2 | ||
target: | ||
$ref: '#/integration/action-interfaces/action-interface-8' | ||
action: postApiV5ObjectsListMemberships | ||
map: | ||
mappings: | ||
- Pardot-Business-Unit-Id: | ||
template: 0Uv4L000000blJTSAY | ||
- listId: | ||
expression: '$SalesforceAccountEngagementRetrievelists.id ' | ||
- prospectId: | ||
expression: '$SalesforceAccountEngagementCreateprospect2.id ' | ||
$map: http://ibm.com/appconnect/map/v1 | ||
input: | ||
- variable: Trigger | ||
$ref: '#/trigger/payload' | ||
- variable: SalesforceAccountEngagementCreateprospect2 | ||
$ref: >- | ||
#/block/If/node-output/Salesforce Account | ||
Engagement Create prospect 2/response/payload | ||
- variable: MailChimpRetrievemembers | ||
$ref: >- | ||
#/node-output/MailChimp Retrieve | ||
members/response/payload | ||
- variable: MailChimpRetrievemembersMetadata | ||
$ref: '#/node-output/MailChimp Retrieve members/response' | ||
- variable: MailChimpRetrievelists | ||
$ref: >- | ||
#/node-output/MailChimp Retrieve | ||
lists/response/payload | ||
- variable: MailChimpRetrievelistsMetadata | ||
$ref: '#/node-output/MailChimp Retrieve lists/response' | ||
- variable: SalesforceAccountEngagementRetrievelists | ||
$ref: >- | ||
#/node-output/Salesforce Account Engagement | ||
Retrieve lists/response/payload | ||
- variable: SalesforceAccountEngagementRetrievelistsMetadata | ||
$ref: >- | ||
#/node-output/Salesforce Account Engagement | ||
Retrieve lists/response | ||
- variable: flowDetails | ||
$ref: '#/flowDetails' | ||
output-schema: {} | ||
name: Associate a new prospect to a list in Salesforce Account Engagement when a new subscriber is created in MailChimp | ||
models: {} |