feat(Salesforce Node): Add fax field to lead option (#7030)

Closes:
https://community.n8n.io/t/there-is-no-fax-field-in-the-saleforce-lead-cretion/29829
This commit is contained in:
MC Naveen 2023-09-07 12:37:37 +05:30 committed by GitHub
parent 9af626a1b3
commit 01f875a94d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 44 additions and 0 deletions

View file

@ -228,6 +228,13 @@ export const leadFields: INodeProperties[] = [
default: '',
description: 'Email address for the lead',
},
{
displayName: 'Fax',
name: 'fax',
type: 'number',
default: '',
description: 'Fax number of the lead',
},
{
displayName: 'First Name',
name: 'firstname',
@ -243,6 +250,14 @@ export const leadFields: INodeProperties[] = [
description:
'Whether the lead doesnt want to receive email from Salesforce (true) or does (false). Label is Email Opt Out.',
},
{
displayName: 'Has Opted Out of Fax',
name: 'hasOptedOutOfFax',
type: 'boolean',
default: false,
description:
'Whether the lead doesnt want to receive fax from Salesforce (true) or does (false). Label is Email Opt Out.',
},
{
displayName: 'Industry',
name: 'industry',
@ -497,6 +512,13 @@ export const leadFields: INodeProperties[] = [
default: '',
description: 'Email address for the lead',
},
{
displayName: 'Fax',
name: 'fax',
type: 'number',
default: '',
description: 'Fax Number of the lead',
},
{
displayName: 'First Name',
name: 'firstname',
@ -512,6 +534,14 @@ export const leadFields: INodeProperties[] = [
description:
'Whether the lead doesnt want to receive email from Salesforce (true) or does (false). Label is Email Opt Out.',
},
{
displayName: 'Has Opted Out of Fax',
name: 'HasOptedOutOfFax',
type: 'boolean',
default: false,
description:
'Whether the lead doesnt want to receive fax from Salesforce (true) or does (false). Label is Fax Opt Out.',
},
{
displayName: 'Industry',
name: 'industry',

View file

@ -3,6 +3,7 @@ export interface ILead {
Company?: string;
LastName?: string;
Email?: string;
Fax?: number;
City?: string;
Phone?: string;
State?: string;
@ -25,4 +26,5 @@ export interface ILead {
NumberOfEmployees?: number;
MobilePhone?: string;
HasOptedOutOfEmail?: boolean;
HasOptedOutOfFax?: boolean;
}

View file

@ -1084,6 +1084,9 @@ export class Salesforce implements INodeType {
if (additionalFields.hasOptedOutOfEmail !== undefined) {
body.HasOptedOutOfEmail = additionalFields.hasOptedOutOfEmail as boolean;
}
if (additionalFields.hasOptedOutOfFax !== undefined) {
body.HasOptedOutOfFax = additionalFields.hasOptedOutOfFax as boolean;
}
if (additionalFields.email !== undefined) {
body.Email = additionalFields.email as string;
}
@ -1123,6 +1126,9 @@ export class Salesforce implements INodeType {
if (additionalFields.industry !== undefined) {
body.Industry = additionalFields.industry as string;
}
if (additionalFields.fax !== undefined) {
body.Fax = additionalFields.fax as number;
}
if (additionalFields.firstname !== undefined) {
body.FirstName = additionalFields.firstname as string;
}
@ -1190,6 +1196,9 @@ export class Salesforce implements INodeType {
if (updateFields.hasOptedOutOfEmail !== undefined) {
body.HasOptedOutOfEmail = updateFields.hasOptedOutOfEmail as boolean;
}
if (updateFields.hasOptedOutOfFax !== undefined) {
body.hasOptedOutOfFax = updateFields.hasOptedOutOfFax as boolean;
}
if (updateFields.lastname !== undefined) {
body.LastName = updateFields.lastname as string;
}
@ -1238,6 +1247,9 @@ export class Salesforce implements INodeType {
if (updateFields.firstname !== undefined) {
body.FirstName = updateFields.firstname as string;
}
if (updateFields.fax !== undefined) {
body.Fax = updateFields.fax as number;
}
if (updateFields.leadSource !== undefined) {
body.LeadSource = updateFields.leadSource as string;
}