Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions packages/nodes-base/nodes/Salesforce/ContactDescription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,14 @@ export const contactFields: INodeProperties[] = [
default: '',
description: 'First name of the contact. Maximum size is 40 characters.',
},
{
displayName: 'Has Opted Out of Email',
name: 'hasOptedOutOfEmail',
type: 'boolean',
default: false,
description:
'Whether the contact doesn’t want to receive email from Salesforce (true) or does (false). Label is Email Opt Out.',
},
{
displayName: 'Home Phone',
name: 'homePhone',
Expand Down Expand Up @@ -559,6 +567,14 @@ export const contactFields: INodeProperties[] = [
default: '',
description: 'First name of the contact. Maximum size is 40 characters.',
},
{
displayName: 'Has Opted Out of Email',
name: 'hasOptedOutOfEmail',
type: 'boolean',
default: false,
description:
'Whether the contact doesn’t want to receive email from Salesforce (true) or does (false). Label is Email Opt Out.',
},
{
displayName: 'Home Phone',
name: 'homePhone',
Expand Down
1 change: 1 addition & 0 deletions packages/nodes-base/nodes/Salesforce/ContactInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export interface IContact {
LastName?: string;
Fax?: string;
Email?: string;
HasOptedOutOfEmail?: boolean;
Phone?: string;
Title?: string;
Jigsaw?: string;
Expand Down
6 changes: 6 additions & 0 deletions packages/nodes-base/nodes/Salesforce/Salesforce.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1378,6 +1378,9 @@ export class Salesforce implements INodeType {
if (additionalFields.fax !== undefined) {
body.Fax = additionalFields.fax as string;
}
if (additionalFields.hasOptedOutOfEmail !== undefined) {
body.HasOptedOutOfEmail = additionalFields.hasOptedOutOfEmail as boolean;
}
if (additionalFields.email !== undefined) {
body.Email = additionalFields.email as string;
}
Expand Down Expand Up @@ -1511,6 +1514,9 @@ export class Salesforce implements INodeType {
if (updateFields.email !== undefined) {
body.Email = updateFields.email as string;
}
if (updateFields.hasOptedOutOfEmail !== undefined) {
body.HasOptedOutOfEmail = updateFields.hasOptedOutOfEmail as boolean;
}
if (updateFields.recordTypeId !== undefined) {
body.RecordTypeId = updateFields.recordTypeId as string;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"CreatedDate": {
"type": "string"
},
"HasOptedOutOfEmail": {
"type": "boolean"
},
"HomePhone": {
"type": "null"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1942,6 +1942,7 @@ describe('Salesforce', () => {
additionalFields: {
fax: '1234567890',
email: '[email protected]',
hasOptedOutOfEmail: true,
phone: '+1234567890',
title: 'Director',
jigsaw: 'JIGSAW456',
Expand Down Expand Up @@ -1992,6 +1993,7 @@ describe('Salesforce', () => {
LastName: 'Smith',
Fax: '1234567890',
Email: '[email protected]',
HasOptedOutOfEmail: true,
Phone: '+1234567890',
Title: 'Director',
Jigsaw: 'JIGSAW456',
Expand Down Expand Up @@ -2080,6 +2082,7 @@ describe('Salesforce', () => {
lastName: 'Updated Contact',
fax: '9876543210',
email: '[email protected]',
hasOptedOutOfEmail: false,
recordTypeId: 'rt999',
phone: '+1999999999',
title: 'Updated Director',
Expand Down