Skip to content

feat(Salesforce Node): Add HasOptedOutOfEmail field to contact resource#28259

Open
colons-litzmann wants to merge 2 commits inton8n-io:masterfrom
colons-litzmann:add_HasOptedOutOfEmail_field_to_contact_resource
Open

feat(Salesforce Node): Add HasOptedOutOfEmail field to contact resource#28259
colons-litzmann wants to merge 2 commits inton8n-io:masterfrom
colons-litzmann:add_HasOptedOutOfEmail_field_to_contact_resource

Conversation

@colons-litzmann
Copy link
Copy Markdown

Summary

In a previous pull request from 2023 the HasOptedOutOfEmail field has been added to the Lead Object since it was missing, but it was still missing on the Contact Object.

Related Linear tickets, Github issues, and Community forum posts

#5235
https://community.n8n.io/t/there-is-no-email-opt-out-field-in-the-saleforce-create-lead/18616/9

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created. (Not required here I would say?)
  • Tests included.
  • PR Labeled with Backport to Beta, Backport to Stable, or Backport to v1 (if the PR is an urgent fix that needs to be backported)

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

Architecture diagram
sequenceDiagram
    participant User as n8n UI / Node Editor
    participant Node as Salesforce Node Execution
    participant SF as Salesforce REST API

    Note over User,SF: Contact Create/Update Flow

    User->>Node: Select Resource: Contact / Operation: Create or Update
    Node-->>User: Load field definitions (ContactDescription.ts)
    Note right of User: NEW: Display 'Has Opted Out of Email' toggle

    User->>Node: Input data (e.g., hasOptedOutOfEmail: true)
    
    Node->>Node: Process 'additionalFields' or 'updateFields'
    Note right of Node: NEW: Map 'hasOptedOutOfEmail' to<br/>API field 'HasOptedOutOfEmail'

    Node->>SF: POST/PATCH /services/data/vXX.X/sobjects/Contact
    Note right of SF: Payload includes:<br/>{ "HasOptedOutOfEmail": true, ... }

    alt Success Path
        SF-->>Node: 201 Created / 204 No Content
        Node-->>User: Return Contact object
    else Error Path
        SF-->>Node: 400 Bad Request (e.g. Invalid Field)
        Node-->>User: Throw NodeApiError
    end
Loading

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 9, 2026

CLA assistant check
All committers have signed the CLA.

@n8n-assistant n8n-assistant bot added community Authored by a community member node/improvement New feature or request in linear DEPRECATED labels Apr 9, 2026
@n8n-assistant
Copy link
Copy Markdown
Contributor

n8n-assistant bot commented Apr 9, 2026

Hey @colons-litzmann,

Thank you for your contribution. We appreciate the time and effort you’ve taken to submit this pull request.

Before we can proceed, please ensure the following:
• Tests are included for any new functionality, logic changes or bug fixes.
• The PR aligns with our contribution guidelines.

Regarding new nodes:
We no longer accept new nodes directly into the core codebase. Instead, we encourage contributors to follow our Community Node Submission Guide to publish nodes independently.

If your node integrates with an AI service that you own or represent, please email nodes@n8n.io and we will be happy to discuss the best approach.

About review timelines:
This PR has been added to our internal tracker as "GHC-7666". While we plan to review it, we are currently unable to provide an exact timeframe. Our goal is to begin reviews within a month, but this may change depending on team priorities. We will reach out when the review begins.

Thank you again for contributing to n8n.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Authored by a community member in linear DEPRECATED node/improvement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants