mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
⚡ Add upsert operation to various resources (Salesforce) (#1743)
* ⚡ Add upsert operation to various resources (Salesforce) The operation was added to the resources: Contact, Account, Lead, Opportunity and Custom Object. * ⚡ Rename operation create/update to Create or Update * ⚡ Improvements Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
@@ -30,6 +30,11 @@ export const leadOperations = [
|
||||
value: 'create',
|
||||
description: 'Create a lead',
|
||||
},
|
||||
{
|
||||
name: 'Create or Update',
|
||||
value: 'upsert',
|
||||
description: 'Create a new lead, or update the current one if it already exists (upsert)',
|
||||
},
|
||||
{
|
||||
name: 'Delete',
|
||||
value: 'delete',
|
||||
@@ -66,6 +71,48 @@ export const leadFields = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* lead:create */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Match Against',
|
||||
name: 'externalId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getExternalIdFields',
|
||||
loadOptionsDependsOn: [
|
||||
'resource',
|
||||
],
|
||||
},
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'lead',
|
||||
],
|
||||
operation: [
|
||||
'upsert',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: `The field to check to see if the lead already exists`,
|
||||
},
|
||||
{
|
||||
displayName: 'Value to Match',
|
||||
name: 'externalIdValue',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'lead',
|
||||
],
|
||||
operation: [
|
||||
'upsert',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: `If this value exists in the 'match against' field, update the lead. Otherwise create a new one`,
|
||||
},
|
||||
{
|
||||
displayName: 'Company',
|
||||
name: 'company',
|
||||
@@ -79,6 +126,7 @@ export const leadFields = [
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
'upsert',
|
||||
],
|
||||
},
|
||||
},
|
||||
@@ -97,6 +145,7 @@ export const leadFields = [
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
'upsert',
|
||||
],
|
||||
},
|
||||
},
|
||||
@@ -115,6 +164,7 @@ export const leadFields = [
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
'upsert',
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user