Skip to content

Pass Error_Recipient into the unsubscribe subflows - #239

Open
RubenHalman wants to merge 1 commit into
SFDO-Community:mainfrom
RubenHalman:fix/error-recipient-subflow-input
Open

RubenHalman wants to merge 1 commit into
SFDO-Community:mainfrom
RubenHalman:fix/error-recipient-subflow-input

Conversation

@RubenHalman

Copy link
Copy Markdown
Member

Summary

Pressing Next on the public unsubscribe page faulted the interview and rolled the opt-out back:

Subflow "Unsubscribe_Contacts" is invalid: In the input assignment, ErrorRecipient isn't a variable in the referenced flow.

Unsubscribe_Link_Quick passed an input named ErrorRecipient. Unsubscribe_Contacts and Unsubscribe_Leads define that input as Error_Recipient, and their error-email actions read Error_Recipient. The Leads call also had an empty Error_Recipient assignment.

This passes {!ErrorRecipient} into Error_Recipient on both subflows and removes the invalid assignment. The subflow variables are unchanged.

Fixes #238.

Test

Deployed the flow to a scratch org with a live Experience Cloud site and opened /Unsubscribe/s/unsubscribe?varRecId=C… as the guest user.

  • The confirmation screen showed the contact email.
  • Next completed with “You are unsubscribed.”
  • The contact HasOptedOutOfEmail is true.
  • An Unsubscribe__c row was saved with status Unsubscribed and that contact.

Unsubscribe Link Quick assigned an input named ErrorRecipient, which
Unsubscribe Contacts and Unsubscribe Leads do not define. Their input
is Error_Recipient. Next on the public page faulted the interview and
rolled the opt-out back.

Fixes SFDO-Community#238
@CraigRWarren

Copy link
Copy Markdown
Contributor

@RubenHalman I thought I fixed that. Thanks for catching it!

@CraigRWarren CraigRWarren left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good

@RubenHalman

Copy link
Copy Markdown
Member Author

@CraigRWarren Thank you. Feature Test fails before any test runs: the Dev Hub auth URL secret is empty on pull requests from a fork, so it cannot log in. The same check fails on my other open pull requests, and it passes for pull requests opened from this repo. I cannot merge without write access. Could a maintainer merge this?

@DKeatonDC

Copy link
Copy Markdown
Contributor

@RubenHalman your changes aren't passing the feature test because they are built on a fork. Is there any chance you could build them on a branch in SFDO-Community? You should have permission to do this.

@RubenHalman

Copy link
Copy Markdown
Member Author

@DKeatonDC what is your reasoning behind rejecting pull requests from forks? The code is the same ..

@DKeatonDC

Copy link
Copy Markdown
Contributor

@RubenHalman -- it's not my reasoning--it's a feature of how the SFDO-Community's cumulus cloud instance is set up. We were puzzled for months as to why we were getting similar failures, but building on branches addressed the issue.

@RubenHalman

RubenHalman commented Oct 31, 2026 •

Copy link
Copy Markdown
Member Author

@DKeatonDC @CraigRWarren
The Feature Test fails on every fork PR because GitHub withholds secrets from them. That is expected platform behavior, not a problem with this change. Requiring people to push branches into this repository instead of opening a normal PR from a fork is a workaround for your CI setup. It excludes normal external contributions. I am not going to do that.

The change is already reviewed and fixes the issue. A maintainer can still merge it, even if configured feature tests fails. If the check is required, please adjust the workflow or merge after review.

@DKeatonDC

Copy link
Copy Markdown
Contributor

@RubenHalman we don't have the ability to change the workflow. The github site is managed by salesforce and this is what they have asked us to do. If you do not want to rebuild on a fork, we can do it (unless you object to having us do so).

@RubenHalman

RubenHalman commented Oct 31, 2026 •

Copy link
Copy Markdown
Member Author

@DKeatonDC
These changes come from two days of work we were asked by Salesforce to do as external contributors. I kept the fork in sync with that request.

External contributions should not have to be reauthored or rebuilt on a branch inside the repository just to pass CI. That is not a normal open-source process.

The Feature Test fails on every fork PR by design. That is a pipeline problem. How can we raise this with sfdo-release-engineers or Salesforce.org so external contributors are not blocked from normal PRs?

@DKeatonDC

DKeatonDC commented Oct 31, 2026 via email

Copy link
Copy Markdown
Contributor

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unsubscribe Link Quick fails on Next: ErrorRecipient is not an input on Unsubscribe Contacts

3 participants