Skip to content

Commit

Permalink
shahmini cp4i epic3358 [5]
Browse files Browse the repository at this point in the history
Batch 5

Adding templates for existing connectors; total 10 UCs
  • Loading branch information
shahminiaru authored Sep 13, 2023
1 parent e44934b commit 9293415
Show file tree
Hide file tree
Showing 10 changed files with 2,012 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
$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: Campaign
assembly:
$ref: '#/integration/assemblies/assembly-1'
options: {}
connector-type: salesforce

action-interfaces:
action-interface-3:
type: api-action
business-object: CampaignMember
connector-type: salesforce
account-name: Account 1
actions:
RETRIEVEALL: {}
action-interface-1:
type: api-action
business-object: events
connector-type: googlecalendar
actions:
CREATE: {}
assemblies:
assembly-1:
assembly:
execute:
- retrieve-action:
name: Salesforce Retrieve campaign members
target:
$ref: '#/integration/action-interfaces/action-interface-3'
filter:
where:
CampaignId: '{{$Trigger.Id}}'
input:
- variable: Trigger
$ref: '#/trigger/payload'
- variable: flowDetails
$ref: '#/flowDetails'
limit: 10
allow-truncation: false
pagination-type: TOKEN
allow-empty-output: false
- for-each:
name: For each
assembly:
$ref: '#/integration/assemblies/assembly-2'
source:
expression: '$SalesforceRetrievecampaignmembers '
input:
- variable: Trigger
$ref: '#/trigger/payload'
- variable: SalesforceRetrievecampaignmembers
$ref: >-
#/node-output/Salesforce Retrieve campaign
members/response/payload
- variable: SalesforceRetrievecampaignmembersMetadata
$ref: >-
#/node-output/Salesforce Retrieve campaign
members/response
- variable: flowDetails
$ref: '#/flowDetails'
mode: sequential
continue-on-error: true
map:
$map: http://ibm.com/appconnect/map/v1
mappings: []
display-name: Salesforce Campaign Member
assembly-2:
assembly:
execute:
- if:
name: If
input:
- variable: Foreachitem
$ref: '#/block/For each/current-item'
- variable: Trigger
$ref: '#/trigger/payload'
- variable: SalesforceRetrievecampaignmembers
$ref: >-
#/node-output/Salesforce Retrieve campaign
members/response/payload
- variable: SalesforceRetrievecampaignmembersMetadata
$ref: '#/node-output/Salesforce Retrieve campaign members/response'
- variable: flowDetails
$ref: '#/flowDetails'
branch:
- condition:
'{{$Trigger.Status}}': Completed
execute:
- create-action:
name: Google Calendar Create event
target:
$ref: '#/integration/action-interfaces/action-interface-1'
map:
mappings:
- attendees:
foreach:
input: '[0]'
iterator: attendeesItem
mappings:
- email:
template: '{{$Foreachitem.Email}}'
- endTime:
template: '2023-09-05 11:00:00'
- id:
template: >-
[email protected]
- startTime:
template: '2023-09-05 10:00:00'
- summary:
template: '{{$Trigger.Name}}'
- timeZone:
template: Asia/Kolkata
$map: http://ibm.com/appconnect/map/v1
input:
- variable: Foreachitem
$ref: '#/block/For each/current-item'
- variable: Trigger
$ref: '#/trigger/payload'
- variable: SalesforceRetrievecampaignmembers
$ref: >-
#/node-output/Salesforce Retrieve campaign
members/response/payload
- variable: SalesforceRetrievecampaignmembersMetadata
$ref: >-
#/node-output/Salesforce Retrieve campaign
members/response
- variable: flowDetails
$ref: '#/flowDetails'
else:
execute: []
output-schema: {}
name: Create a Google Calendar when a campaign is created in Salesforce for members who have completed the registration
models: {}
Loading

0 comments on commit 9293415

Please sign in to comment.