mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
feat(Salesforce Node): Add HasOptedOutOfEmail field to lead resource (#5235)
This commit is contained in:
parent
43b4a8a589
commit
59f290fe85
|
@ -235,6 +235,14 @@ export const leadFields: INodeProperties[] = [
|
||||||
default: '',
|
default: '',
|
||||||
description: 'First name of the lead. Limited to 40 characters.',
|
description: 'First name of the lead. Limited to 40 characters.',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Has Opted Out of Email',
|
||||||
|
name: 'hasOptedOutOfEmail',
|
||||||
|
type: 'boolean',
|
||||||
|
default: false,
|
||||||
|
description:
|
||||||
|
'Whether the lead doesn’t want to receive email from Salesforce (true) or does (false). Label is Email Opt Out.',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Industry',
|
displayName: 'Industry',
|
||||||
name: 'industry',
|
name: 'industry',
|
||||||
|
@ -496,6 +504,14 @@ export const leadFields: INodeProperties[] = [
|
||||||
default: '',
|
default: '',
|
||||||
description: 'First name of the lead. Limited to 40 characters.',
|
description: 'First name of the lead. Limited to 40 characters.',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Has Opted Out of Email',
|
||||||
|
name: 'hasOptedOutOfEmail',
|
||||||
|
type: 'boolean',
|
||||||
|
default: false,
|
||||||
|
description:
|
||||||
|
'Whether the lead doesn’t want to receive email from Salesforce (true) or does (false). Label is Email Opt Out.',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Industry',
|
displayName: 'Industry',
|
||||||
name: 'industry',
|
name: 'industry',
|
||||||
|
|
|
@ -24,4 +24,5 @@ export interface ILead {
|
||||||
IsUnreadByOwner?: boolean;
|
IsUnreadByOwner?: boolean;
|
||||||
NumberOfEmployees?: number;
|
NumberOfEmployees?: number;
|
||||||
MobilePhone?: string;
|
MobilePhone?: string;
|
||||||
|
HasOptedOutOfEmail?: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1081,6 +1081,9 @@ export class Salesforce implements INodeType {
|
||||||
Company: company,
|
Company: company,
|
||||||
LastName: lastname,
|
LastName: lastname,
|
||||||
};
|
};
|
||||||
|
if (additionalFields.hasOptedOutOfEmail !== undefined) {
|
||||||
|
body.HasOptedOutOfEmail = additionalFields.hasOptedOutOfEmail as boolean;
|
||||||
|
}
|
||||||
if (additionalFields.email !== undefined) {
|
if (additionalFields.email !== undefined) {
|
||||||
body.Email = additionalFields.email as string;
|
body.Email = additionalFields.email as string;
|
||||||
}
|
}
|
||||||
|
@ -1185,6 +1188,9 @@ export class Salesforce implements INodeType {
|
||||||
{ itemIndex: i },
|
{ itemIndex: i },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (updateFields.hasOptedOutOfEmail !== undefined) {
|
||||||
|
body.HasOptedOutOfEmail = updateFields.hasOptedOutOfEmail as boolean;
|
||||||
|
}
|
||||||
if (updateFields.lastname !== undefined) {
|
if (updateFields.lastname !== undefined) {
|
||||||
body.LastName = updateFields.lastname as string;
|
body.LastName = updateFields.lastname as string;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue