Skip to content

Commit

Permalink
Merge branch 'main' into wrike
Browse files Browse the repository at this point in the history
  • Loading branch information
RaghuRam168 authored Jul 5, 2024
2 parents 1065062 + 8639d61 commit 9a08ac0
Show file tree
Hide file tree
Showing 21 changed files with 1,205 additions and 27 deletions.
262 changes: 262 additions & 0 deletions resources/Convert Insightly leads to Zoho CRM leads.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,262 @@
$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: Lead
assembly:
$ref: '#/integration/assemblies/assembly-1'
options: {}
connector-type: insightly
action-interfaces:
action-interface-1:
type: api-action
business-object: getLeadsSearch_model
connector-type: zohocrm
actions:
RETRIEVEALL: {}
action-interface-2:
type: api-action
business-object: getUsers_model
connector-type: zohocrm
actions:
RETRIEVEALL: {}
action-interface-3:
type: api-action
business-object: postLeads_model
connector-type: zohocrm
actions:
postLeads: {}
action-interface-4:
type: api-action
business-object: getLeadsByRecordIdConversionOptions_model
connector-type: zohocrm
actions:
getLeadsByRecordIdConversionOptions: {}
action-interface-5:
type: api-action
business-object: postLeads528450000000311120ActionsConvert_model
connector-type: zohocrm
actions:
postLeads528450000000311120ActionsConvert: {}
action-interface-6:
type: api-action
business-object: postLeads528450000000311120ActionsConvert_model
connector-type: zohocrm
actions:
postLeads528450000000311120ActionsConvert: {}
assemblies:
assembly-1:
assembly:
execute:
- retrieve-action:
name: Zoho CRM Retrieve leads
target:
$ref: '#/integration/action-interfaces/action-interface-1'
filter:
where:
Email: '{{$Trigger.EMAIL}}'
input:
- variable: Trigger
$ref: '#/trigger/payload'
- variable: flowDetails
$ref: '#/flowDetails'
limit: 10
allow-truncation: false
pagination-type: SKIP_LIMIT
allow-empty-output: true
- if:
name: If
input:
- variable: flowDetails
$ref: '#/flowDetails'
branch:
- condition:
'{{$ZohoCRMRetrieveleadsMetadata."status-code"}}': '204'
execute:
- retrieve-action:
name: Zoho CRM Retrieve users
target:
$ref: '#/integration/action-interfaces/action-interface-2'
filter:
where:
___type: AdminUsers
input:
- variable: Trigger
$ref: '#/trigger/payload'
- variable: ZohoCRMRetrieveleads
$ref: >-
#/node-output/Zoho CRM Retrieve
leads/response/payload
- variable: ZohoCRMRetrieveleadsMetadata
$ref: '#/node-output/Zoho CRM Retrieve leads/response'
- variable: flowDetails
$ref: '#/flowDetails'
limit: 10
allow-truncation: false
pagination-type: SKIP_LIMIT
allow-empty-output: false
- custom-action:
name: Zoho CRM Create lead
target:
$ref: '#/integration/action-interfaces/action-interface-3'
action: postLeads
map:
mappings:
- data:
foreach:
input: '[{}]'
iterator: dataItem
mappings:
- City:
template: '{{$Trigger.ADDRESS_CITY}}'
- Company:
template: '{{$Trigger.ORGANISATION_NAME}}'
- Country:
template: '{{$Trigger.ADDRESS_COUNTRY}}'
- Email:
template: '{{$Trigger.EMAIL}}'
- Fax:
template: '{{$Trigger.FAX}}'
- First_Name:
template: '{{$Trigger.FIRST_NAME}}'
- Industry:
template: '{{$Trigger.INDUSTRY}}'
- Last_Name:
template: '{{$Trigger.LAST_NAME}}'
- Lead_Source:
template: '{{$Trigger.LEAD_SOURCE_ID}}'
- Lead_Status:
template: Attempted to Contact
- Mobile:
template: '{{$Trigger.MOBILE}}'
- No_of_Employees:
expression: '$Trigger.EMPLOYEE_COUNT '
- Owner:
mappings:
- full_name:
template: '{{$ZohoCRMRetrieveusers[0].full_name}}'
- id:
template: '{{$ZohoCRMRetrieveusers[0].id}}'
- Phone:
template: '{{$Trigger.PHONE}}'
- Salutation:
template: '{{$Trigger.SALUTATION}}'
- State:
template: '{{$Trigger.ADDRESS_STATE}}'
- Street:
template: '{{$Trigger.ADDRESS_STREET}}'
- Website:
template: '{{$Trigger.WEBSITE}}'
- Zip_Code:
template: '{{$Trigger.ADDRESS_POSTCODE}}'
$map: http://ibm.com/appconnect/map/v1
input:
- variable: flowDetails
$ref: '#/flowDetails'
- custom-action:
name: Zoho CRM Retrieve lead conversion options
target:
$ref: '#/integration/action-interfaces/action-interface-4'
action: getLeadsByRecordIdConversionOptions
map:
mappings:
- record_id:
template: '{{$ZohoCRMCreatelead._data_[0].details.id}}'
$map: http://ibm.com/appconnect/map/v1
input:
- variable: flowDetails
$ref: '#/flowDetails'
- if:
name: If 2
input:
- variable: flowDetails
$ref: '#/flowDetails'
branch:
- condition:
and:
- '{{$ZohoCRMRetrieveleadconversionoptions}}':
neq: ''
- '{{$ZohoCRMRetrieveleadconversionoptions.__conversion_options}}':
neq: ''
hashKey: object:22
- '{{$ZohoCRMRetrieveleadconversionoptions.__conversion_options.Contacts}}':
neq: ''
hashKey: object:536
execute:
- custom-action:
name: Zoho CRM Convert lead
target:
$ref: >-
#/integration/action-interfaces/action-interface-5
action: postLeads528450000000311120ActionsConvert
map:
mappings:
- data:
foreach:
input: '[{}]'
iterator: dataItem
mappings:
- Accounts:
mappings:
- id:
template: >-
{{$ZohoCRMRetrieveleadconversionoptions.__conversion_options.Accounts[0].id}}
- Contacts:
mappings:
- id:
template: >-
{{$ZohoCRMRetrieveleadconversionoptions.__conversion_options.Contacts[0].id}}
- assign_to:
mappings:
- full_name:
template: >-
{{$ZohoCRMRetrieveleadconversionoptions.__conversion_options.Contacts[0].Full_Name}}
- id:
template: >-
{{$ZohoCRMRetrieveleadconversionoptions.__conversion_options.Contacts[0].id}}
- lead_id:
template: >-
{{$ZohoCRMCreatelead._data_[0].details.id}}
$map: http://ibm.com/appconnect/map/v1
input:
- variable: flowDetails
$ref: '#/flowDetails'
else:
execute:
- custom-action:
name: Zoho CRM Convert lead 2
target:
$ref: >-
#/integration/action-interfaces/action-interface-6
action: postLeads528450000000311120ActionsConvert
map:
mappings:
- data:
foreach:
input: '[{}]'
iterator: dataItem
mappings:
- assign_to:
mappings:
- full_name:
template: ' {{$ZohoCRMRetrieveusers[0].full_name}}'
- id:
template: '{{$ZohoCRMRetrieveusers[0].id}}'
- lead_id:
template: >-
{{$ZohoCRMCreatelead._data_[0].details.id}}
$map: http://ibm.com/appconnect/map/v1
input:
- variable: flowDetails
$ref: '#/flowDetails'
output-schema: {}
else:
execute: []
output-schema: {}
name: Convert Insightly leads to Zoho CRM leads
models: {}
Loading

0 comments on commit 9a08ac0

Please sign in to comment.