Skip to content

Commit

Permalink
Usecase added for Crystal Ball (#456)
Browse files Browse the repository at this point in the history
* Add files via upload

* Update template-metadata.json

* Create Create an annotation in Crystal Ball for new Mailchimp campaigns_instructions.md

* Create Create an annotation in Crystal Ball for any new product created in Shopify_instructions.md

* Create Create an annotation in Crystal Ball for any new contact created in Salesforce_instructions.md

* Update Create an annotation in Crystal Ball for new Mailchimp campaigns_instructions.md

* Update Create an annotation in Crystal Ball for any new product created in Shopify_instructions.md

* Update Create an annotation in Crystal Ball for any new contact created in Salesforce_instructions.md

* Update Create an annotation in Crystal Ball for any new contact created in Salesforce_instructions.md

* Update Create an annotation in Crystal Ball for any new contact created in Salesforce.yaml

* Update Create an annotation in Crystal Ball for any new product created in Shopify.yaml

* Update Create an annotation in Crystal Ball for new Mailchimp campaigns.yaml

* Update and rename Create an annotation in Crystal Ball for any new contact created in Salesforce.yaml to Create an annotation in Crystal Ball for each new contact created in Salesforce.yaml

* Update and rename Create an annotation in Crystal Ball for any new product created in Shopify.yaml to Create an annotation in Crystal Ball for each new product created in Shopify.yaml

* Rename Create an annotation in Crystal Ball for any new contact created in Salesforce_instructions.md to Create an annotation in Crystal Ball for each new contact created in Salesforce_instructions.md

* Rename Create an annotation in Crystal Ball for any new product created in Shopify_instructions.md to Create an annotation in Crystal Ball for each new product created in Shopify_instructions.md

* Update template-metadata.json

* Corrections

---------

Co-authored-by: Deepak Ayilliath <[email protected]>
  • Loading branch information
calisha-noronha and Deepak-Ayilliath authored Jul 3, 2024
1 parent f14b0e1 commit cda4bd0
Show file tree
Hide file tree
Showing 7 changed files with 347 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
$integration: http://ibm.com/appconnect/integration/v2/integrationFile
integration:
type: trigger-action
trigger-interfaces:
trigger-interface-1:
type: event-trigger
connector-type: streaming-connector-scheduler
triggers:
SCHEDULE:
assembly:
$ref: '#/integration/assemblies/assembly-1'
input-context:
data: scheduler
options:
subscription:
scheduleConfiguration:
interval:
unit: minute
value: 1
runOnceOncheck: false
days:
- MON
- TUE
- WED
- THU
- FRI
- SAT
- SUN
timeZone: UTC
action-interfaces:
action-interface-1:
type: api-action
business-object: Contact
connector-type: salesforce
actions:
RETRIEVEALL: {}
action-interface-2:
type: api-action
business-object: postApiV1Annotations_model
connector-type: crystalball
actions:
postApiV1Annotations: {}
assemblies:
assembly-1:
assembly:
execute:
- retrieve-action:
allow-empty-output: false
allow-truncation: true
name: Salesforce Retrieve contacts
target:
$ref: '#/integration/action-interfaces/action-interface-1'
filter:
limit: 10
where:
CreatedDate: time
input:
- variable: Trigger
$ref: '#/trigger/payload'
- variable: flowDetails
$ref: '#/flowDetails'
pagination-type: TOKEN
- for-each:
map:
$map: http://ibm.com/appconnect/map/v1
mappings: []
source:
expression: '$SalesforceRetrievecontacts '
input:
- variable: Trigger
$ref: '#/trigger/payload'
- variable: SalesforceRetrievecontacts
$ref: >-
#/node-output/Salesforce Retrieve
contacts/response/payload
- variable: SalesforceRetrievecontactsMetadata
$ref: '#/node-output/Salesforce Retrieve contacts/response'
- variable: flowDetails
$ref: '#/flowDetails'
mode: sequential
continue-on-error: true
name: For each
assembly:
$ref: '#/integration/assemblies/assembly-2'
display-name: Salesforce Contact
assembly-2:
assembly:
execute:
- custom-action:
action: postApiV1Annotations
name: Crystal Ball Create annotation
target:
$ref: '#/integration/action-interfaces/action-interface-2'
map:
mappings:
- category:
template: salesforce {{$Foreachitem.Id}}
- description:
template: '{{$Foreachitem.Description}}'
- event_name:
template: contact_create {{$SalesforceRetrievecontacts.LastName}}
- url:
template: salesforce.com
$map: http://ibm.com/appconnect/map/v1
input:
- variable: Trigger
$ref: '#/trigger/payload'
- variable: SalesforceRetrievecontacts
$ref: >-
#/node-output/Salesforce Retrieve
contacts/response/payload
- variable: SalesforceRetrievecontactsMetadata
$ref: '#/node-output/Salesforce Retrieve contacts/response'
- variable: Foreachitem
$ref: '#/block/For each/current-item'
- variable: flowDetails
$ref: '#/flowDetails'
name: Create an annotation in Crystal Ball for each new contact created in Salesforce
models: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
$integration: http://ibm.com/appconnect/integration/v2/integrationFile
integration:
type: trigger-action
trigger-interfaces:
trigger-interface-1:
type: event-trigger
connector-type: streaming-connector-scheduler
triggers:
SCHEDULE:
assembly:
$ref: '#/integration/assemblies/assembly-1'
input-context:
data: scheduler
options:
subscription:
scheduleConfiguration:
interval:
unit: minute
value: 1
runOnceOncheck: false
days:
- MON
- TUE
- WED
- THU
- FRI
- SAT
- SUN
timeZone: UTC
action-interfaces:
action-interface-1:
type: api-action
business-object: product
connector-type: shopify
actions:
RETRIEVEALL: {}
action-interface-2:
type: api-action
business-object: postApiV1Annotations_model
connector-type: crystalball
actions:
postApiV1Annotations: {}
assemblies:
assembly-1:
assembly:
execute:
- retrieve-action:
allow-empty-output: false
allow-truncation: true
name: Shopify Retrieve products
target:
$ref: '#/integration/action-interfaces/action-interface-1'
filter:
limit: 10
where:
and:
- created_at_min: '{{$Trigger.lastEventTime}}'
- status: active
input:
- variable: Trigger
$ref: '#/trigger/payload'
- variable: flowDetails
$ref: '#/flowDetails'
pagination-type: TOKEN
- for-each:
map:
$map: http://ibm.com/appconnect/map/v1
mappings: []
source:
expression: '$ShopifyRetrieveproducts '
input:
- variable: Trigger
$ref: '#/trigger/payload'
- variable: ShopifyRetrieveproducts
$ref: '#/node-output/Shopify Retrieve products/response/payload'
- variable: ShopifyRetrieveproductsMetadata
$ref: '#/node-output/Shopify Retrieve products/response'
- variable: flowDetails
$ref: '#/flowDetails'
mode: sequential
continue-on-error: true
name: For each
assembly:
$ref: '#/integration/assemblies/assembly-2'
display-name: Shopify product
assembly-2:
assembly:
execute:
- custom-action:
action: postApiV1Annotations
name: Crystal Ball Create annotation
target:
$ref: '#/integration/action-interfaces/action-interface-2'
map:
mappings:
- category:
template: shopify {{$Foreachitem.id}}
- description:
template: '{{$Foreachitem.body_html}}'
- event_name:
template: product_create
- url:
template: shopify.com
$map: http://ibm.com/appconnect/map/v1
input:
- variable: Trigger
$ref: '#/trigger/payload'
- variable: ShopifyRetrieveproducts
$ref: '#/node-output/Shopify Retrieve products/response/payload'
- variable: ShopifyRetrieveproductsMetadata
$ref: '#/node-output/Shopify Retrieve products/response'
- variable: Foreachitem
$ref: '#/block/For each/current-item'
- variable: flowDetails
$ref: '#/flowDetails'
name: Create an annotation in Crystal Ball for each new product created in Shopify
models: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
$integration: http://ibm.com/appconnect/integration/v2/integrationFile
integration:
type: trigger-action
trigger-interfaces:
trigger-interface-1:
type: event-trigger
connector-type: mailchimp
triggers:
CREATED:
assembly:
$ref: '#/integration/assemblies/assembly-1'
input-context:
data: Campaigns
options:
list_id: 6fc8383307
parentFilter:
list_id: 6fc8383307
action-interfaces:
action-interface-1:
type: api-action
business-object: postApiV1Annotations_model
connector-type: crystalball
actions:
postApiV1Annotations: {}
assemblies:
assembly-1:
assembly:
execute:
- custom-action:
action: postApiV1Annotations
name: Crystal Ball Create annotation
target:
$ref: '#/integration/action-interfaces/action-interface-1'
map:
mappings:
- category:
template: '{{$Trigger.id}} created'
- description:
template: mailchimp
- event_name:
template: campaign
- url:
template: https://mailchimp.com/
$map: http://ibm.com/appconnect/map/v1
input:
- variable: Trigger
$ref: '#/trigger/payload'
- variable: flowDetails
$ref: '#/flowDetails'
name: Create an annotation in Crystal Ball for new Mailchimp campaigns
models: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
To refer to these instructions while editing the flow, open the [GitHub page](https://github.com/ot4i/app-connect-templates/blob/main/resources/markdown/Create%20an%20annotation%20in%20Crystal%20Ball%20for%20each%20new%20contact%20created%20in%20Salesforce_instructions.md) (opens in a new window).

1. Click **Use this template** to start using the template.
2. Connect to the following accounts by using your credentials:
- [Salesforce](https://www.ibm.com/docs/en/app-connect/containers_cd?topic=apps-salesforce)
- [Crystal Ball](https://www.ibm.com/docs/en/app-connect/containers_cd?topic=apps-crystal-ball)
3. To start the flow, in the banner, click **Start flow**.


Use this template to create an annotation in Crystal Ball for each new contact that is created in Salesforce.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
To refer to these instructions while editing the flow, open the [GitHub page](https://github.com/ot4i/app-connect-templates/blob/main/resources/markdown/Create%20an%20annotation%20in%20Crystal%20Ball%20for%20each%20new%20product%20created%20in%20Shopify_instructions.md) (opens in a new window).

1. Click **Use this template** to start using the template.
2. Connect to the following accounts by using your credentials:
- [Shopify](https://www.ibm.com/docs/en/app-connect/containers_cd?topic=apps-shopify)
- [Crystal Ball](https://www.ibm.com/docs/en/app-connect/containers_cd?topic=apps-crystal-ball)
3. To start the flow, in the banner, click **Start flow**.


Use this template to create an annotation in Crystal Ball for each new product that is created in Shopify.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
To refer to these instructions while editing the flow, open the [GitHub page](https://github.com/ot4i/app-connect-templates/blob/main/resources/markdown/Create%20an%20annotation%20in%20Crystal%20Ball%20for%20new%20Mailchimp%20campaigns_instructions.md) (opens in a new window).

1. Click **Use this template** to start using the template.
2. Connect to the following accounts by using your credentials:
- [MailChimp](https://www.ibm.com/docs/en/app-connect/containers_cd?topic=apps-mailchimp)
- [Crystal Ball](https://www.ibm.com/docs/en/app-connect/containers_cd?topic=apps-crystal-ball)
3. To start the flow, in the banner, click **Start flow**.


Use this template to create an annotation in Crystal Ball for every new Mailchimp campaign.

29 changes: 28 additions & 1 deletion resources/template-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -3526,6 +3526,33 @@
"targetApps": ["bamboohr", "apptiotargetprocess"],
"tags": ["streaming-connector-scheduler", "bamboohr", "apptiotargetprocess"],
"offerings": ["app connect professional"]
},
{
"name": "Create an annotation in Crystal Ball for each new product created in Shopify",
"description": "Use this template to create an annotation in Crystal Ball for each new product created in Shopify.",
"summary": "Scheduler to 2 applications",
"sourceApp": "streaming-connector-scheduler",
"targetApps": ["crystalball", "shopify"],
"tags": ["streaming-connector-scheduler", "crystalball", "shopify", "foreach"],
"offerings": ["app connect professional"]
},
{
"name": "Create an annotation in Crystal Ball for new Mailchimp campaigns",
"description": "Use this template to create an annotation in Crystal Ball for any new Mailchimp campaigns.",
"summary": "MailChimp to Crystal Ball",
"sourceApp": "mailchimp",
"targetApps": ["crystalball"],
"tags": ["crystalball", "mailchimp"],
"offerings": ["app connect professional"]
},
{
"name": "Create an annotation in Crystal Ball for each new contact created in Salesforce",
"description": "Use this template to create an annotation in Crystal Ball for each new contact created in Salesforce.",
"summary": "Scheduler to 2 applications",
"sourceApp": "streaming-connector-scheduler",
"targetApps": ["salesforce", "crystalball"],
"tags": ["streaming-connector-scheduler", "crystalball", "salesforce", "foreach"],
"offerings": ["app connect professional"]
}
]
}
}

0 comments on commit cda4bd0

Please sign in to comment.