From 2daa0be656828cda652d393a94b8a58e8876972d Mon Sep 17 00:00:00 2001 From: Sarah Pilzer Date: Thu, 31 Jul 2025 14:36:28 -0400 Subject: [PATCH 01/11] Usability and design updates to unsubscribe link setup flow --- .../Unsubscribe_Link_Setup.flow-meta.xml | 263 +++++++++--------- 1 file changed, 130 insertions(+), 133 deletions(-) diff --git a/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml b/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml index 9f92119..cd5132e 100644 --- a/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml +++ b/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml @@ -3,8 +3,8 @@ Contact_Batch - 577 - 4010 + 182 + 3122 UUIDBatchInvocable apex @@ -30,13 +30,12 @@ UUIDBatchInvocable - 1 LeadBatch - 577 - 4118 + 182 + 3230 UUIDBatchInvocable apex @@ -62,14 +61,13 @@ UUIDBatchInvocable - 1 61.0 ass_final_value_of_sender_email - 445 - 1238 + 50 + 974 var_FinalRecord.Org_Wide_Email_Address__c Assign @@ -91,8 +89,8 @@ ass_final_value_of_sender_email_0 - 709 - 1022 + 314 + 866 var_FinalRecord.Org_Wide_Email_Address__c Assign @@ -115,8 +113,8 @@ Assign selections made on previous screens Assign_Modified_Value - 577 - 3494 + 182 + 2606 var_FinalRecord.Screen_1_Part_2__c Assign @@ -188,8 +186,8 @@ Assign values to the default if this is their first time creating a record. Default_AssignValues - 709 - 506 + 314 + 458 var_FinalRecord.Screen_3__c Assign @@ -289,8 +287,8 @@ Assign values to the final variable if this is their second or later time filling this out. EXISTINGAssignValues - 445 - 398 + 50 + 350 var_FinalRecord.Screen_3__c Assign @@ -390,8 +388,8 @@ Assign values to the final variable based on answers to the initial screen. UpdateFinalValues - 578 - 1373 + 182 + 1166 var_FinalRecord.Confirmation_Email_Text__c Assign @@ -460,8 +458,8 @@ Confirmation_EmailSend - 577 - 2978 + 182 + 2090 Get_Experience_Site @@ -485,8 +483,8 @@ dec_Org_wide_confirmation_email_sender - 577 - 914 + 182 + 758 ass_final_value_of_sender_email_0 @@ -511,8 +509,8 @@ Does a setup record exist already ExistingRecordSameName_0 - 577 - 290 + 182 + 242 CompanyName @@ -537,8 +535,8 @@ Does a setup record exist already ExistingRecordSameName_0_0 - 577 - 3602 + 182 + 2714 Create_Record @@ -562,8 +560,8 @@ Include_screen_1 - 577 - 2270 + 182 + 1382 Screen2PreviewScreen_0 @@ -587,8 +585,8 @@ IncludeScreen3Decision - 577 - 2678 + 182 + 1790 Confirmation_EmailSend @@ -609,7 +607,14 @@ - Included creating an org wide email address for confirmation email sender. And profile security. + Included creating an org wide email address for confirmation email sender. And profile security. + +July 2025 Updates: +added progress bar (issue #113) +added explanation of implications for company name (issue #93) +resolved unhandled faults related to org-wide email address creation by preventing users to back track to previous screens and updated the record choice set to include non-verified email addresses (issue #114) +updated final screen to clarify the flow is finished but can be run again if needed (issue #105) +added explanation text to all preview screens (issue #144) Pick another org wide email to get an error message. ErrorEmailAddress @@ -633,27 +638,13 @@ senderOrgWideEmails String - DisplayName - 1 AND (2 OR 3) - - IsVerified - EqualTo - - true - - - - Purpose - EqualTo - - DefaultNoreply - - + Address + and Purpose - EqualTo + NotEqualTo - UserSelectionAndDefaultNoReply + UserSelection OrgWideEmailAddress @@ -693,7 +684,7 @@ CanvasMode - FREE_FORM_CANVAS + AUTO_LAYOUT_CANVAS @@ -707,8 +698,8 @@ Create the Org wide email address used by the confirmation email as the sender. Create_Org_Wide_Email_0 - 445 - 1022 + 50 + 866 ass_final_value_of_sender_email @@ -743,8 +734,8 @@ Create the UL record. Create_Record - 709 - 3710 + 314 + 2822 Create_Public_Ids @@ -754,8 +745,8 @@ Collect Experience Site informations Get_Experience_Site - 577 - 3278 + 182 + 2390 false Get_My_Domain @@ -768,8 +759,8 @@ Collect URL from Experience Site Get_My_Domain - 577 - 3386 + 182 + 2498 false Assign_Modified_Value @@ -789,8 +780,8 @@ getULSetup - 577 - 182 + 182 + 134 false ExistingRecordSameName_0 @@ -802,8 +793,8 @@ Update_existing_record - 445 - 3710 + 50 + 2822 Create_Public_Ids @@ -812,8 +803,8 @@ CompanyName - 709 - 398 + 314 + 350 false true false @@ -821,43 +812,20 @@ Default_AssignValues - CompanyName_Section1 - RegionContainer - - CompanyName_Section1_Column1 - Region - - FinalOrgName - String - - $Organization.Name - - What is your organization or company name? - InputField - UseStoredValues - false - - - width - - 6 - - - false - - - CompanyName_Section1_Column2 - Region - - width - - 6 - - - false - + S01_T01_CompanyNameInstructions + <p><strong style="font-size: 16px;">Set Company Name</strong></p><p><br></p><p>When someone clicks the unsubscribe link they will see a confirmation page that includes your company's name.</p><p>We have pre-populated the text with the name listed in Setup under Company Info but you may customize it here, if desired.</p> + DisplayText + + + FinalOrgName + String + + $Organization.Name + + Company name as it will appear on the unsubscribe confirmation page: + InputField + UseStoredValues false - SectionWithoutHeader Next true @@ -866,25 +834,26 @@ completeScreen - 577 - 4226 - true + 182 + 3338 + false true - true + false DonedisplayText - <p><span style="font-size: 20px;">You are done!</span></p> + <p><span style="font-size: 20px;">You are done! </span></p><p><br></p><p><span style="font-size: 20px;">If you need to make any changes, click Run Again. </span><span style="font-size: 20px; background-color: rgb(255, 255, 255);">Otherwise, just close this window.</span></p> DisplayText + Run Again true false ConfirmationEmailPreviewScreen - 445 - 3086 - true + 50 + 2198 + false true false @@ -892,7 +861,7 @@ confirmationEmailDisplayText - <p><strong style="font-size: 20px;">PREVIEW</strong></p><p><em>The email recipient receives an email. </em></p><p>{!horizontalLine1}</p><p><br></p><p><span style="font-size: 20px;">From: {!varT_OrgWideEmailDisplayName}</span></p><p><span style="font-size: 20px;">Email body: {!ConfirmEmailText}</span></p> + <p><strong style="font-size: 20px;">PREVIEW</strong></p><p><em>If you opted to send a confirmation email, the recipient receives a message that looks like this. </em></p><p>{!horizontalLine1}</p><p><br></p><p><span style="font-size: 20px;">From: {!varT_OrgWideEmailDisplayName}</span></p><p><span style="font-size: 20px;">Email body: {!ConfirmEmailText}</span></p> DisplayText true @@ -901,9 +870,9 @@ Create_Public_Ids - 577 - 3902 - true + 182 + 3014 + false true false @@ -921,9 +890,9 @@ A preview of the email with the option to modify the text of the link EmailModifyScreen - 578 - 1565 - true + 182 + 1274 + false true false @@ -931,7 +900,7 @@ SampleEmailDisplayText_0 - <p><strong style="font-size: 22px;"><u></u>PREVIEW</strong></p><p><em>Your email recipient gets an email like this with an unsubscribe link at the bottom. </em></p><p>{!horizontalLine1}</p><p><br></p><p><span style="font-size: 20px;">Dear Friend,</span></p><p><br></p><p><span style="font-size: 20px;">It's Thursday! You love to order a pizza on Thursdays! If you order before 5, I'll also throw in some free drinks!</span></p><p><br></p><p><span style="font-size: 20px;">Your friend,</span></p><p><span style="font-size: 20px;">Bob</span></p><p><br></p><p><u style="color: rgb(2, 54, 244); font-size: 20px;">{!var_FinalRecord.Link_Text__c}</u></p> + <p><strong style="font-size: 22px;"><u></u>PREVIEW</strong></p><p><em>Your email recipient gets an email like this with an unsubscribe link at the bottom. </em></p><p>{!horizontalLine1}</p><p><br></p><p><span style="font-size: 20px;">Dear Friend,</span></p><p><br></p><p><span style="font-size: 20px;">It's Thursday! You love to order a pizza on Thursdays! If you order before 5, I'll also throw in some free drinks!</span></p><p><br></p><p><span style="font-size: 20px;">Your friend,</span></p><p><span style="font-size: 20px;">Bob</span></p><p><br></p><p><u style="font-size: 20px; color: rgb(2, 54, 244);">{!var_FinalRecord.Link_Text__c}</u></p> DisplayText @@ -957,9 +926,9 @@ Give the option to have a confirmation screen before Opt Out, but this is not recommended. Screen1Preview - 445 - 2378 - true + 50 + 1490 + false true false @@ -1105,9 +1074,9 @@ This screen will display the confirmation message you want the user to see Screen2PreviewScreen_0 - 577 - 2570 - true + 182 + 1682 + false true false @@ -1115,7 +1084,7 @@ screen2previewDisplayText_0 - <p><strong style="font-size: 20px;">PREVIEW</strong><span style="font-size: 20px;"> </span></p><p>{!horizontalLine1}</p><p><br></p><p><span style="font-size: 20px; color: rgb(0, 0, 0);">{!var_FinalRecord.Screen_2_Part_1__c} {!frm_screen2part2}</span></p> + <p><strong style="font-size: 20px;">PREVIEW</strong><span style="font-size: 20px;"> </span></p><p><em style="background-color: rgb(255, 255, 255);">This is what the email recipient will see on the confirmation page after they have been unsubscribed. </em></p><p>{!horizontalLine1}</p><p><br></p><p><span style="color: rgb(0, 0, 0); font-size: 20px;">{!var_FinalRecord.Screen_2_Part_1__c} {!frm_screen2part2}</span></p> DisplayText @@ -1192,11 +1161,11 @@ This is an optional screen to allow user to enter their email if not found in the database. Screen3PreviewScreen - 445 - 2786 - true + 50 + 1898 + false true - true + false Confirmation_EmailSend @@ -1269,9 +1238,9 @@ Select informations to set up the unsubscribe link Set_Up_Unsubscribe_Link_0 - 577 - 698 - true + 182 + 650 + false true false @@ -1515,14 +1484,42 @@ true false + + Set the company name and unsubscribe configurations and then create the Unsubscribe Link Setup record. + STG01_InitialConfiguration + true + + 1 + + + Preview the text for the experience cloud flow pages and the confirmation email. + STG02_Previews + true + + 2 + + + Stage for creating the required public IDs for the contact and lead objects. + STG03_PublicIDs + true + + 3 + + + The final confirmation screen. + STG04_Done + true + + 4 + - 451 - 48 + 56 + 0 getULSetup - Draft + Active horizontalLine1 true From 456c68eed241beca34912d847b1986f96e531784 Mon Sep 17 00:00:00 2001 From: DKeatonDC <165526945+DKeatonDC@users.noreply.github.com> Date: Sat, 2 Aug 2025 09:48:10 -0400 Subject: [PATCH 02/11] Activates flow headers --- .../Unsubscribe_Link_Setup.flow-meta.xml | 122 +++++++++--------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml b/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml index cd5132e..4bb5f20 100644 --- a/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml +++ b/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml @@ -3,8 +3,8 @@ Contact_Batch - 182 - 3122 + 0 + 0 UUIDBatchInvocable apex @@ -34,8 +34,8 @@ LeadBatch - 182 - 3230 + 0 + 0 UUIDBatchInvocable apex @@ -62,12 +62,12 @@ UUIDBatchInvocable - 61.0 + 64.0 ass_final_value_of_sender_email - 50 - 974 + 0 + 0 var_FinalRecord.Org_Wide_Email_Address__c Assign @@ -89,8 +89,8 @@ ass_final_value_of_sender_email_0 - 314 - 866 + 0 + 0 var_FinalRecord.Org_Wide_Email_Address__c Assign @@ -113,8 +113,8 @@ Assign selections made on previous screens Assign_Modified_Value - 182 - 2606 + 0 + 0 var_FinalRecord.Screen_1_Part_2__c Assign @@ -186,8 +186,8 @@ Assign values to the default if this is their first time creating a record. Default_AssignValues - 314 - 458 + 0 + 0 var_FinalRecord.Screen_3__c Assign @@ -287,8 +287,8 @@ Assign values to the final variable if this is their second or later time filling this out. EXISTINGAssignValues - 50 - 350 + 0 + 0 var_FinalRecord.Screen_3__c Assign @@ -388,8 +388,8 @@ Assign values to the final variable based on answers to the initial screen. UpdateFinalValues - 182 - 1166 + 0 + 0 var_FinalRecord.Confirmation_Email_Text__c Assign @@ -458,8 +458,8 @@ Confirmation_EmailSend - 182 - 2090 + 0 + 0 Get_Experience_Site @@ -483,8 +483,8 @@ dec_Org_wide_confirmation_email_sender - 182 - 758 + 0 + 0 ass_final_value_of_sender_email_0 @@ -509,8 +509,8 @@ Does a setup record exist already ExistingRecordSameName_0 - 182 - 242 + 0 + 0 CompanyName @@ -535,8 +535,8 @@ Does a setup record exist already ExistingRecordSameName_0_0 - 182 - 2714 + 0 + 0 Create_Record @@ -560,8 +560,8 @@ Include_screen_1 - 182 - 1382 + 0 + 0 Screen2PreviewScreen_0 @@ -585,8 +585,8 @@ IncludeScreen3Decision - 182 - 1790 + 0 + 0 Confirmation_EmailSend @@ -610,7 +610,7 @@ Included creating an org wide email address for confirmation email sender. And profile security. July 2025 Updates: -added progress bar (issue #113) +added progress bar (issue #113)--activated progress bar (was not active in version connected to pull request) added explanation of implications for company name (issue #93) resolved unhandled faults related to org-wide email address creation by preventing users to back track to previous screens and updated the record choice set to include non-verified email addresses (issue #114) updated final screen to clarify the flow is finished but can be run again if needed (issue #105) @@ -698,8 +698,8 @@ added explanation text to all preview screens (issue #144) Create the Org wide email address used by the confirmation email as the sender. Create_Org_Wide_Email_0 - 50 - 866 + 0 + 0 ass_final_value_of_sender_email @@ -734,8 +734,8 @@ added explanation text to all preview screens (issue #144) Create the UL record. Create_Record - 314 - 2822 + 0 + 0 Create_Public_Ids @@ -745,8 +745,8 @@ added explanation text to all preview screens (issue #144) Collect Experience Site informations Get_Experience_Site - 182 - 2390 + 0 + 0 false Get_My_Domain @@ -759,8 +759,8 @@ added explanation text to all preview screens (issue #144) Collect URL from Experience Site Get_My_Domain - 182 - 2498 + 0 + 0 false Assign_Modified_Value @@ -780,8 +780,8 @@ added explanation text to all preview screens (issue #144) getULSetup - 182 - 134 + 0 + 0 false ExistingRecordSameName_0 @@ -793,8 +793,8 @@ added explanation text to all preview screens (issue #144) Update_existing_record - 50 - 2822 + 0 + 0 Create_Public_Ids @@ -803,8 +803,8 @@ added explanation text to all preview screens (issue #144) CompanyName - 314 - 350 + 0 + 0 false true false @@ -834,8 +834,8 @@ added explanation text to all preview screens (issue #144) completeScreen - 182 - 3338 + 0 + 0 false true false @@ -851,8 +851,8 @@ added explanation text to all preview screens (issue #144) ConfirmationEmailPreviewScreen - 50 - 2198 + 0 + 0 false true false @@ -870,8 +870,8 @@ added explanation text to all preview screens (issue #144) Create_Public_Ids - 182 - 3014 + 0 + 0 false true false @@ -890,8 +890,8 @@ added explanation text to all preview screens (issue #144) A preview of the email with the option to modify the text of the link EmailModifyScreen - 182 - 1274 + 0 + 0 false true false @@ -926,8 +926,8 @@ added explanation text to all preview screens (issue #144) Give the option to have a confirmation screen before Opt Out, but this is not recommended. Screen1Preview - 50 - 1490 + 0 + 0 false true false @@ -1074,8 +1074,8 @@ added explanation text to all preview screens (issue #144) This screen will display the confirmation message you want the user to see Screen2PreviewScreen_0 - 182 - 1682 + 0 + 0 false true false @@ -1161,8 +1161,8 @@ added explanation text to all preview screens (issue #144) This is an optional screen to allow user to enter their email if not found in the database. Screen3PreviewScreen - 50 - 1898 + 0 + 0 false true false @@ -1238,8 +1238,8 @@ added explanation text to all preview screens (issue #144) Select informations to set up the unsubscribe link Set_Up_Unsubscribe_Link_0 - 182 - 650 + 0 + 0 false true false @@ -1513,7 +1513,7 @@ added explanation text to all preview screens (issue #144) 4 - 56 + 0 0 getULSetup From 79bf861ac88916d3db8c28222124e3da177c5b22 Mon Sep 17 00:00:00 2001 From: esnorris <99896740+esnorris@users.noreply.github.com> Date: Thu, 22 Jan 2026 12:03:37 -0600 Subject: [PATCH 03/11] Created before create flow that will check to see if any existing Unsubscribe Link Setup records exist, and throw an error if one already exists as only one should be in the org at a time. --- ..._Setup_Maximum_of_One_Record.flow-meta.xml | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 force-app/main/default/flows/Unsubscribe_Link_Setup_Maximum_of_One_Record.flow-meta.xml diff --git a/force-app/main/default/flows/Unsubscribe_Link_Setup_Maximum_of_One_Record.flow-meta.xml b/force-app/main/default/flows/Unsubscribe_Link_Setup_Maximum_of_One_Record.flow-meta.xml new file mode 100644 index 0000000..b4aff8c --- /dev/null +++ b/force-app/main/default/flows/Unsubscribe_Link_Setup_Maximum_of_One_Record.flow-meta.xml @@ -0,0 +1,92 @@ + + + 65.0 + + Error_Limit_of_1_Record + + 0 + 0 + + Only one Unsubscribe Link Setup record can exist at a time. Use the setup flow rather than creating a record manually. + false + + + + Record_Found + + 0 + 0 + Default Outcome + + Yes_Found + and + + Get_Existing_Unsubscribe_Link_Setups + IsNull + + false + + + + Error_Limit_of_1_Record + + + + + Before create, will check to see if any existing Unsubscribe Link Setup records exist, and throw an error if one already exists as only one should be in the org at a time. + Default + Unsubscribe Link Setup {!$Flow.CurrentDateTime} + + + BuilderType + + LightningFlowBuilder + + + + CanvasMode + + AUTO_LAYOUT_CANVAS + + + + OriginBuilderType + + LightningFlowBuilder + + + AutoLaunchedFlow + + Query for any existing Unsubscribe Link Setup records + Get_Existing_Unsubscribe_Link_Setups + + 0 + 0 + false + + Record_Found + + and + + Id + NotEqualTo + + $Record.Id + + + true + Unsubscribe_Link_Setup__c + true + + + 0 + 0 + + Get_Existing_Unsubscribe_Link_Setups + + Unsubscribe_Link_Setup__c + Create + RecordBeforeSave + + Active + From f7b41526689405a1bb2328e0a38bb180c6e67175 Mon Sep 17 00:00:00 2001 From: esnorris <99896740+esnorris@users.noreply.github.com> Date: Thu, 22 Jan 2026 12:19:38 -0600 Subject: [PATCH 04/11] Reports and Dashboard for admin or users to monitor Unsubscribes --- .../UnsubscribeLink.dashboardFolder-meta.xml | 9 ++ ...TEZoKnENXvhvZGaktqUAOxo.dashboard-meta.xml | 141 ++++++++++++++++++ .../UnsubscribeLink.reportFolder-meta.xml | 9 ++ .../Unsubscribes_Errors_Roa.report-meta.xml | 47 ++++++ .../Unsubscribes_by_Month_du8.report-meta.xml | 64 ++++++++ ...Unsubscribes_by_Status_GpS.report-meta.xml | 65 ++++++++ 6 files changed, 335 insertions(+) create mode 100644 force-app/main/default/dashboards/UnsubscribeLink.dashboardFolder-meta.xml create mode 100644 force-app/main/default/dashboards/UnsubscribeLink/tkaMbgmTEZoKnENXvhvZGaktqUAOxo.dashboard-meta.xml create mode 100644 force-app/main/default/reports/UnsubscribeLink.reportFolder-meta.xml create mode 100644 force-app/main/default/reports/UnsubscribeLink/Unsubscribes_Errors_Roa.report-meta.xml create mode 100644 force-app/main/default/reports/UnsubscribeLink/Unsubscribes_by_Month_du8.report-meta.xml create mode 100644 force-app/main/default/reports/UnsubscribeLink/Unsubscribes_by_Status_GpS.report-meta.xml diff --git a/force-app/main/default/dashboards/UnsubscribeLink.dashboardFolder-meta.xml b/force-app/main/default/dashboards/UnsubscribeLink.dashboardFolder-meta.xml new file mode 100644 index 0000000..13efe30 --- /dev/null +++ b/force-app/main/default/dashboards/UnsubscribeLink.dashboardFolder-meta.xml @@ -0,0 +1,9 @@ + + + + Manage + ethansnorris.fd4368263b35@agentforce.com + User + + Unsubscribe Link + diff --git a/force-app/main/default/dashboards/UnsubscribeLink/tkaMbgmTEZoKnENXvhvZGaktqUAOxo.dashboard-meta.xml b/force-app/main/default/dashboards/UnsubscribeLink/tkaMbgmTEZoKnENXvhvZGaktqUAOxo.dashboard-meta.xml new file mode 100644 index 0000000..de5f271 --- /dev/null +++ b/force-app/main/default/dashboards/UnsubscribeLink/tkaMbgmTEZoKnENXvhvZGaktqUAOxo.dashboard-meta.xml @@ -0,0 +1,141 @@ + + + #FFFFFF + Diagonal + #FFFFFF + light + unity + light + unity + + + 8 + 0 + + true + Auto + Bar + Auto + false + false + false + false + +
Unsubscribes by Month
+ UnsubscribeLink/Unsubscribes_by_Month_du8 + false + false + false + RowLabelAscending + true +
+ 0 + 15 +
+ + 4 + 8 + + false + Auto + + y + RowCount + + Donut + -1 + Auto + false + false + false + false + Unsubscribe__c.Status__c + + + g1 + a + + +
Unsubscribes by Status
+ Right + 6 + UnsubscribeLink/Unsubscribes_by_Status_GpS + false + true + true + RowLabelAscending + false +
+ 0 + 8 +
+ + 4 + 8 + + false + FlexTable + + -1 + + CUST_NAME + false + false + detail + + + Unsubscribe__c.Unsubscribe_Email__c + false + false + detail + + + Unsubscribe__c.Contact__c + false + false + detail + + + Unsubscribe__c.Lead__c + false + false + detail + + + Unsubscribe__c.Status__c + false + false + detail + + + CUST_CREATED_DATE + false + false + detail + + + CUST_CREATED_DATE + 2 + + true + +
Errors may imply an issue with opt out and should be reviewed.
+ +
Unsubscribes | Errors
+ UnsubscribeLink/Unsubscribes_Errors_Roa +
+ 8 + 7 +
+ 12 + 36 +
+ SpecifiedUser + true + ethansnorris.fd4368263b35@agentforce.com + ethansnorris.fd4368263b35@agentforce.com + #000000 + Unsubscribe Link + #000000 + 12 +
diff --git a/force-app/main/default/reports/UnsubscribeLink.reportFolder-meta.xml b/force-app/main/default/reports/UnsubscribeLink.reportFolder-meta.xml new file mode 100644 index 0000000..669b9e5 --- /dev/null +++ b/force-app/main/default/reports/UnsubscribeLink.reportFolder-meta.xml @@ -0,0 +1,9 @@ + + + + Manage + ethansnorris.fd4368263b35@agentforce.com + User + + Unsubscribe Link + diff --git a/force-app/main/default/reports/UnsubscribeLink/Unsubscribes_Errors_Roa.report-meta.xml b/force-app/main/default/reports/UnsubscribeLink/Unsubscribes_Errors_Roa.report-meta.xml new file mode 100644 index 0000000..bf9839d --- /dev/null +++ b/force-app/main/default/reports/UnsubscribeLink/Unsubscribes_Errors_Roa.report-meta.xml @@ -0,0 +1,47 @@ + + + + CUST_NAME + + + Unsubscribe__c.Unsubscribe_Email__c + + + Unsubscribe__c.Status__c + + + Unsubscribe__c.Contact__c + + + Unsubscribe__c.Lead__c + + + CUST_CREATED_DATE + + All Unsubscribe records with Status 'Error'. Errors should be reviewed as they may infer an issue with the opt out. + + + Unsubscribe__c.Status__c + false + true + equals + Error + + en_US + + Tabular + Unsubscribes | Errors + + co + 1 + + CustomEntity$Unsubscribe__c + organization + true + true + true + + CUST_CREATED_DATE + INTERVAL_CUSTOM + + diff --git a/force-app/main/default/reports/UnsubscribeLink/Unsubscribes_by_Month_du8.report-meta.xml b/force-app/main/default/reports/UnsubscribeLink/Unsubscribes_by_Month_du8.report-meta.xml new file mode 100644 index 0000000..ce5250f --- /dev/null +++ b/force-app/main/default/reports/UnsubscribeLink/Unsubscribes_by_Month_du8.report-meta.xml @@ -0,0 +1,64 @@ + + + + #FFFFFF + #FFFFFF + Diagonal + + y + RowCount + + Line + false + true + CUST_CREATED_DATE + CHART_BOTTOM + true + false + false + false + Medium + Auto + #000000 + 12 + All Unsubscribes by Month + #000000 + 18 + + + CUST_NAME + + + Unsubscribe__c.Unsubscribe_Email__c + + + Unsubscribe__c.Status__c + + + Unsubscribe__c.Contact__c + + + Unsubscribe__c.Lead__c + + All Unsubscribe records by Month + Summary + + Month + CUST_CREATED_DATE + Asc + + Unsubscribes by Month + + co + 1 + + CustomEntity$Unsubscribe__c + organization + true + true + true + + CUST_CREATED_DATE + INTERVAL_CUSTOM + + diff --git a/force-app/main/default/reports/UnsubscribeLink/Unsubscribes_by_Status_GpS.report-meta.xml b/force-app/main/default/reports/UnsubscribeLink/Unsubscribes_by_Status_GpS.report-meta.xml new file mode 100644 index 0000000..02389be --- /dev/null +++ b/force-app/main/default/reports/UnsubscribeLink/Unsubscribes_by_Status_GpS.report-meta.xml @@ -0,0 +1,65 @@ + + + + #FFFFFF + #FFFFFF + Diagonal + + y + RowCount + + Donut + false + false + Unsubscribe__c.Status__c + Right + CHART_BOTTOM + false + true + true + true + Medium + Auto + #000000 + 12 + All Unsubscribes by Month + #000000 + 18 + + + CUST_NAME + + + Unsubscribe__c.Unsubscribe_Email__c + + + Unsubscribe__c.Contact__c + + + Unsubscribe__c.Lead__c + + + CUST_CREATED_DATE + + All Unsubscribe records by Status + Summary + + Day + Unsubscribe__c.Status__c + Asc + + Unsubscribes by Status + + co + 1 + + CustomEntity$Unsubscribe__c + organization + true + true + true + + CUST_CREATED_DATE + INTERVAL_CUSTOM + + From 1c231dc1673843294664cfd022572328a32d1f14 Mon Sep 17 00:00:00 2001 From: DKeatonDC <165526945+DKeatonDC@users.noreply.github.com> Date: Thu, 22 Jan 2026 13:24:57 -0500 Subject: [PATCH 05/11] Delete force-app/main/default/flows/Unsubscribe_Link_Setup_Maximum_of_One_Record.flow-meta.xml Deleted to revert unnecessary dependency Signed-off-by: DKeatonDC <165526945+DKeatonDC@users.noreply.github.com> --- ..._Setup_Maximum_of_One_Record.flow-meta.xml | 92 ------------------- 1 file changed, 92 deletions(-) delete mode 100644 force-app/main/default/flows/Unsubscribe_Link_Setup_Maximum_of_One_Record.flow-meta.xml diff --git a/force-app/main/default/flows/Unsubscribe_Link_Setup_Maximum_of_One_Record.flow-meta.xml b/force-app/main/default/flows/Unsubscribe_Link_Setup_Maximum_of_One_Record.flow-meta.xml deleted file mode 100644 index b4aff8c..0000000 --- a/force-app/main/default/flows/Unsubscribe_Link_Setup_Maximum_of_One_Record.flow-meta.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - 65.0 - - Error_Limit_of_1_Record - - 0 - 0 - - Only one Unsubscribe Link Setup record can exist at a time. Use the setup flow rather than creating a record manually. - false - - - - Record_Found - - 0 - 0 - Default Outcome - - Yes_Found - and - - Get_Existing_Unsubscribe_Link_Setups - IsNull - - false - - - - Error_Limit_of_1_Record - - - - - Before create, will check to see if any existing Unsubscribe Link Setup records exist, and throw an error if one already exists as only one should be in the org at a time. - Default - Unsubscribe Link Setup {!$Flow.CurrentDateTime} - - - BuilderType - - LightningFlowBuilder - - - - CanvasMode - - AUTO_LAYOUT_CANVAS - - - - OriginBuilderType - - LightningFlowBuilder - - - AutoLaunchedFlow - - Query for any existing Unsubscribe Link Setup records - Get_Existing_Unsubscribe_Link_Setups - - 0 - 0 - false - - Record_Found - - and - - Id - NotEqualTo - - $Record.Id - - - true - Unsubscribe_Link_Setup__c - true - - - 0 - 0 - - Get_Existing_Unsubscribe_Link_Setups - - Unsubscribe_Link_Setup__c - Create - RecordBeforeSave - - Active - From 56a0bff39662f02823d2e573cadff86a7c58f291 Mon Sep 17 00:00:00 2001 From: DKeatonDC <165526945+DKeatonDC@users.noreply.github.com> Date: Thu, 22 Jan 2026 13:25:46 -0500 Subject: [PATCH 06/11] Delete force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml Deleted to revert unnecessary dependency Signed-off-by: DKeatonDC <165526945+DKeatonDC@users.noreply.github.com> --- .../Unsubscribe_Link_Setup.flow-meta.xml | 1585 ----------------- 1 file changed, 1585 deletions(-) delete mode 100644 force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml diff --git a/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml b/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml deleted file mode 100644 index 4bb5f20..0000000 --- a/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml +++ /dev/null @@ -1,1585 +0,0 @@ - - - - Contact_Batch - - 0 - 0 - UUIDBatchInvocable - apex - - LeadBatch - - Automatic - - fieldName - - Public_Id__c - - - - linkText - - LinkText - - - - objectType - - Contact - - - UUIDBatchInvocable - - - LeadBatch - - 0 - 0 - UUIDBatchInvocable - apex - - completeScreen - - Automatic - - fieldName - - Public_Id__c - - - - linkText - - LinkText - - - - objectType - - Lead - - - UUIDBatchInvocable - - 64.0 - - ass_final_value_of_sender_email - - 0 - 0 - - var_FinalRecord.Org_Wide_Email_Address__c - Assign - - orgWideEmail.value - - - - varT_OrgWideEmailDisplayName - Assign - - Display_NameOrgWideEmail - - - - UpdateFinalValues - - - - ass_final_value_of_sender_email_0 - - 0 - 0 - - var_FinalRecord.Org_Wide_Email_Address__c - Assign - - OrgWideEmailQ - - - - varT_OrgWideEmailDisplayName - Assign - - OrgWideEmailQ - - - - UpdateFinalValues - - - - Assign selections made on previous screens - Assign_Modified_Value - - 0 - 0 - - var_FinalRecord.Screen_1_Part_2__c - Assign - - ModifyScreen1Part2 - - - - var_FinalRecord.Screen_2_Part_1__c - Assign - - ModifyScreen2Part1 - - - - var_FinalRecord.Screen_2_Part_2__c - Assign - - ModifyScreen2Part2 - - - - var_FinalRecord.Screen_3__c - Assign - - ModifyScreen3Text - - - - var_FinalRecord.Screen_1_Part_1__c - Assign - - ModifyScreen1Part1 - - - - var_FinalRecord.Link_Text__c - Assign - - LinkText - - - - var_FinalRecord.Site_Domain__c - Assign - - Get_My_Domain.Domain.Domain - - - - var_FinalRecord.Confirmation_Page__c - Assign - - EnableOneClick - - - - var_FinalRecord.Id - Assign - - getULSetup.Id - - - - ExistingRecordSameName_0_0 - - - - Assign values to the default if this is their first time creating a record. - Default_AssignValues - - 0 - 0 - - var_FinalRecord.Screen_3__c - Assign - - txt_Screen3 - - - - var_FinalRecord.Confirmation_Page__c - Assign - - Yes - - - - var_FinalRecord.Enable_Type_in_Email_Address__c - Assign - - No - - - - var_FinalRecord.Confirmation_Email_Text__c - Assign - - text_DefaultConfirmationEmailText - - - - var_FinalRecord.Screen_1_Part_1__c - Assign - - To unsubscribe - - - - var_FinalRecord.Screen_1_Part_2__c - Assign - - screen1part2 - - - - var_FinalRecord.Screen_2_Part_1__c - Assign - - txt_screen2Part1 - - - - var_FinalRecord.Screen_2_Part_2__c - Assign - - You can expect a confirmation email shortly. - - - - var_FinalRecord.Error_Email_Recipient__c - Assign - - $User.Email - - - - var_FinalRecord.Our_Organization__c - Assign - - FinalOrgName - - - - var_FinalRecord.Link_Text__c - Assign - - Click here to unsubscribe. - - - - var_FinalRecord.Send_Confirmation_Email__c - Assign - - No - - - - var_FinalRecord.Error_Email_Recipient__c - Assign - - $User.Email - - - - Set_Up_Unsubscribe_Link_0 - - - - Assign values to the final variable if this is their second or later time filling this out. - EXISTINGAssignValues - - 0 - 0 - - var_FinalRecord.Screen_3__c - Assign - - getULSetup.Screen_3__c - - - - var_FinalRecord.Confirmation_Page__c - Assign - - getULSetup.Confirmation_Page__c - - - - var_FinalRecord.Enable_Type_in_Email_Address__c - Assign - - getULSetup.Enable_Type_in_Email_Address__c - - - - var_FinalRecord.Confirmation_Email_Text__c - Assign - - getULSetup.Confirmation_Email_Text__c - - - - var_FinalRecord.Screen_1_Part_1__c - Assign - - getULSetup.Screen_1_Part_1__c - - - - var_FinalRecord.Our_Organization__c - Assign - - getULSetup.Our_Organization__c - - - - var_FinalRecord.Screen_1_Part_2__c - Assign - - getULSetup.Screen_1_Part_2__c - - - - var_FinalRecord.Screen_2_Part_1__c - Assign - - getULSetup.Screen_2_Part_1__c - - - - var_FinalRecord.Screen_2_Part_2__c - Assign - - getULSetup.Screen_2_Part_2__c - - - - var_FinalRecord.Link_Text__c - Assign - - getULSetup.Link_Text__c - - - - var_FinalRecord.Error_Email_Recipient__c - Assign - - getULSetup.Error_Email_Recipient__c - - - - var_FinalRecord.Send_Confirmation_Email__c - Assign - - getULSetup.Send_Confirmation_Email__c - - - - var_FinalRecord.Org_Wide_Email_Address__c - Assign - - getULSetup.Org_Wide_Email_Address__c - - - - Set_Up_Unsubscribe_Link_0 - - - - Assign values to the final variable based on answers to the initial screen. - UpdateFinalValues - - 0 - 0 - - var_FinalRecord.Confirmation_Email_Text__c - Assign - - ConfirmEmailText - - - - var_FinalRecord.Send_Confirmation_Email__c - Assign - - confirmEmailQ - - - - var_FinalRecord.Enable_Type_in_Email_Address__c - Assign - - type_in_unsubscribe - - - - EmailModifyScreen - - - - Create_an_org_wide_email_now - Create an org wide email now. - String - - Create an org wide email now. - - - - Default_No_Reply_Address - Default No-Reply Address - String - - DefaultNoReply - - - - No - No - String - - No - - - - User_Selection_and_Default_No_Reply_Address - User Selection and Default No-Reply Address - String - - UserSelectionAndDefaultNoReply - - - - Yes - Yes - String - - Yes - - - - Confirmation_EmailSend - - 0 - 0 - - Get_Experience_Site - - No - - YesSend - and - - confirmEmailQ - EqualTo - - Yes - - - - ConfirmationEmailPreviewScreen - - - - - - dec_Org_wide_confirmation_email_sender - - 0 - 0 - - ass_final_value_of_sender_email_0 - - Use Existing - - out_Createnew - and - - OrgWideEmailQ - EqualTo - - Create_an_org_wide_email_now - - - - Create_Org_Wide_Email_0 - - - - - - Does a setup record exist already - ExistingRecordSameName_0 - - 0 - 0 - - CompanyName - - No record - - RecordExists - and - - getULSetup - IsNull - - false - - - - EXISTINGAssignValues - - - - - - Does a setup record exist already - ExistingRecordSameName_0_0 - - 0 - 0 - - Create_Record - - No record - - RecordExists_0 - and - - getULSetup - IsNull - - false - - - - Update_existing_record - - - - - - Include_screen_1 - - 0 - 0 - - Screen2PreviewScreen_0 - - No - - YesScreen1 - and - - var_FinalRecord.Confirmation_Page__c - EqualTo - - Yes - - - - Screen1Preview - - - - - - IncludeScreen3Decision - - 0 - 0 - - Confirmation_EmailSend - - Skip Confirmation Screen - - IncludeScreen3Outcome - and - - type_in_unsubscribe - EqualTo - - Yes - - - - Screen3PreviewScreen - - - - - Included creating an org wide email address for confirmation email sender. And profile security. - -July 2025 Updates: -added progress bar (issue #113)--activated progress bar (was not active in version connected to pull request) -added explanation of implications for company name (issue #93) -resolved unhandled faults related to org-wide email address creation by preventing users to back track to previous screens and updated the record choice set to include non-verified email addresses (issue #114) -updated final screen to clarify the flow is finished but can be run again if needed (issue #105) -added explanation text to all preview screens (issue #144) - - Pick another org wide email to get an error message. - ErrorEmailAddress - String - Address - and - - IsVerified - EqualTo - - true - - - OrgWideEmailAddress - - var_FinalRecord.Error_Email_Recipient__c - Address - - Address - - - senderOrgWideEmails - String - Address - and - - Purpose - NotEqualTo - - UserSelection - - - OrgWideEmailAddress - - varT_OrgWideEmailDisplayName - DisplayName - - Address - - Default - - Use currentUser or existing CMDT type value - currentUserOrExisting - String - IF(ISBLANK({!getULSetup.Error_Email_Recipient__c}),{!$User.Email}, -{!getULSetup.Error_Email_Recipient__c}) - - - The question asks "Do you want to include this confirmation page?" The field says "do you want to enable one click?" so the answers need to be reversed. - EnableOneClickFormula - String - IF({!EnableOneClick}='Yes', 'No', 'Yes') - - - frm_screen2part2 - String - IF({!confirmEmailQ}='Yes', {!var_FinalRecord.Screen_2_Part_2__c},'') - - Unsubscribe Link Setup {!$Flow.CurrentDateTime} - - - BuilderType - - LightningFlowBuilder - - - - CanvasMode - - AUTO_LAYOUT_CANVAS - - - - OriginBuilderType - - LightningFlowBuilder - - - Flow - - Create the Org wide email address used by the confirmation email as the sender. - Create_Org_Wide_Email_0 - - 0 - 0 - - ass_final_value_of_sender_email - - - Address - - orgWideEmail.value - - - - DisplayName - - Display_NameOrgWideEmail - - - - IsAllowAllProfiles - - true - - - - Purpose - - Purpose - - - OrgWideEmailAddress - true - - - Create the UL record. - Create_Record - - 0 - 0 - - Create_Public_Ids - - var_FinalRecord - - - Collect Experience Site informations - Get_Experience_Site - - 0 - 0 - false - - Get_My_Domain - - true - Site - true - - - Collect URL from Experience Site - Get_My_Domain - - 0 - 0 - false - - Assign_Modified_Value - - and - - SiteId - EqualTo - - Get_Experience_Site.Id - - - true - DomainSite - true - - - getULSetup - - 0 - 0 - false - - ExistingRecordSameName_0 - - true - Unsubscribe_Link_Setup__c - true - - - Update_existing_record - - 0 - 0 - - Create_Public_Ids - - var_FinalRecord - - - CompanyName - - 0 - 0 - false - true - false - - Default_AssignValues - - - S01_T01_CompanyNameInstructions - <p><strong style="font-size: 16px;">Set Company Name</strong></p><p><br></p><p>When someone clicks the unsubscribe link they will see a confirmation page that includes your company's name.</p><p>We have pre-populated the text with the name listed in Setup under Company Info but you may customize it here, if desired.</p> - DisplayText - - - FinalOrgName - String - - $Organization.Name - - Company name as it will appear on the unsubscribe confirmation page: - InputField - UseStoredValues - false - - Next - true - false - - - completeScreen - - 0 - 0 - false - true - false - - DonedisplayText - <p><span style="font-size: 20px;">You are done! </span></p><p><br></p><p><span style="font-size: 20px;">If you need to make any changes, click Run Again. </span><span style="font-size: 20px; background-color: rgb(255, 255, 255);">Otherwise, just close this window.</span></p> - DisplayText - - Run Again - true - false - - - ConfirmationEmailPreviewScreen - - 0 - 0 - false - true - false - - Get_Experience_Site - - - confirmationEmailDisplayText - <p><strong style="font-size: 20px;">PREVIEW</strong></p><p><em>If you opted to send a confirmation email, the recipient receives a message that looks like this. </em></p><p>{!horizontalLine1}</p><p><br></p><p><span style="font-size: 20px;">From: {!varT_OrgWideEmailDisplayName}</span></p><p><span style="font-size: 20px;">Email body: {!ConfirmEmailText}</span></p> - DisplayText - - true - false - - - Create_Public_Ids - - 0 - 0 - false - true - false - - Contact_Batch - - - displayPublicIds - <p><span style="font-size: 18px;">Great! That part is done.</span></p><p><br></p><p><span style="font-size: 18px;">Last step</span></p><p>The Unsubscribe Link uses a 64 digit random id on each contact and lead, called Public_Id__c.</p><p>This may take a little while. You will receive an email when it is done.</p><p>After this, two record triggered flows will automatically create public ids when new contacts and leads are created.</p><p><br></p><p><span style="color: rgb(68, 68, 68); background-color: rgb(255, 255, 255);">Click next to populate the public ids on all your records now.</span></p> - DisplayText - - true - true - - - A preview of the email with the option to modify the text of the link - EmailModifyScreen - - 0 - 0 - false - true - false - - Include_screen_1 - - - SampleEmailDisplayText_0 - <p><strong style="font-size: 22px;"><u></u>PREVIEW</strong></p><p><em>Your email recipient gets an email like this with an unsubscribe link at the bottom. </em></p><p>{!horizontalLine1}</p><p><br></p><p><span style="font-size: 20px;">Dear Friend,</span></p><p><br></p><p><span style="font-size: 20px;">It's Thursday! You love to order a pizza on Thursdays! If you order before 5, I'll also throw in some free drinks!</span></p><p><br></p><p><span style="font-size: 20px;">Your friend,</span></p><p><span style="font-size: 20px;">Bob</span></p><p><br></p><p><u style="font-size: 20px; color: rgb(2, 54, 244);">{!var_FinalRecord.Link_Text__c}</u></p> - DisplayText - - - DisplayTextforHorizontalLine - <p><span style="background-color: rgb(255, 255, 255); color: rgb(68, 68, 68);">{!horizontalLine1}</span></p> - DisplayText - - - LinkText - String - - var_FinalRecord.Link_Text__c - - You may modify the text of the link here: - InputField - UseStoredValues - false - - true - false - - - Give the option to have a confirmation screen before Opt Out, but this is not recommended. - Screen1Preview - - 0 - 0 - false - true - false - - Screen2PreviewScreen_0 - - - Screen1PreviewDisplayText - <p><strong style="font-size: 20px;">PREVIEW</strong></p><p><em style="color: rgb(68, 68, 68); background-color: rgb(255, 255, 255);">This page allows the recipient to confirm before opting out. </em></p><p><span style="color: rgb(68, 68, 68); background-color: rgb(255, 255, 255);">{!horizontalLine1}</span></p><p><br></p><p><span style="font-size: 20px;">{!var_FinalRecord.Screen_1_Part_1__c} georgeB@bbbl.org </span><span style="font-size: 20px; background-color: rgb(255, 255, 255); color: rgb(68, 68, 68);">{!var_FinalRecord.Screen_1_Part_2__c} </span></p> - DisplayText - - - googlewarning - <p>{!horizontalLine1}</p><p><a href="https://blog.google/products/gmail/gmail-security-authentication-spam-protection/" rel="noopener noreferrer" target="_blank" style="background-color: transparent; font-size: 14px;">Gmail wants you to make it easier to unsubscribe</a><span style="background-color: transparent; font-size: 14px;"> with "one click" email opt-out so we advise against adding in this page. </span></p> - DisplayText - - - Screen1Preview_Section1 - RegionContainer - - Screen1Preview_Section1_Column1 - Region - - EnableOneClick - Yes - No - String - - var_FinalRecord.Confirmation_Page__c - - Do you want to include this confirmation page? - DropdownBox - UseStoredValues - true - - - width - - 4 - - - false - - - Screen1Preview_Section1_Column2 - Region - - width - - 4 - - - false - - - Screen1Preview_Section1_Column3 - Region - - width - - 4 - - - false - - false - SectionWithoutHeader - - - Screen1Preview_Section2 - RegionContainer - - Screen1Preview_Section2_Column1 - Region - - ModifyScreen1Part1 - String - - var_FinalRecord.Screen_1_Part_1__c - - You may modify the text of part 1 here: - InputField - UseStoredValues - false - - - width - - 5 - - - false - - - Screen1Preview_Section2_Column2 - Region - - ModifyScreen1Part2 - String - - var_FinalRecord.Screen_1_Part_2__c - - You may modify the text of part 2 here: - InputField - UseStoredValues - false - - - width - - 5 - - - false - - - Screen1Preview_Section2_Column3 - Region - - width - - 2 - - - false - - false - SectionWithoutHeader - - and - - EnableOneClick - EqualTo - - Yes - - - - - true - false - - - This screen will display the confirmation message you want the user to see - Screen2PreviewScreen_0 - - 0 - 0 - false - true - false - - IncludeScreen3Decision - - - screen2previewDisplayText_0 - <p><strong style="font-size: 20px;">PREVIEW</strong><span style="font-size: 20px;"> </span></p><p><em style="background-color: rgb(255, 255, 255);">This is what the email recipient will see on the confirmation page after they have been unsubscribed. </em></p><p>{!horizontalLine1}</p><p><br></p><p><span style="color: rgb(0, 0, 0); font-size: 20px;">{!var_FinalRecord.Screen_2_Part_1__c} {!frm_screen2part2}</span></p> - DisplayText - - - displayTextHozLine - <p><br></p><p><br></p><p><br></p><p><br></p><p><span style="background-color: rgb(255, 255, 255); color: rgb(68, 68, 68);">{!horizontalLine1}</span></p> - DisplayText - - - Screen2PreviewScreen_0_Section1 - RegionContainer - - Screen2PreviewScreen_0_Section1_Column1 - Region - - ModifyScreen2Part1 - String - - var_FinalRecord.Screen_2_Part_1__c - - You may modify the text here: - InputField - <p>Example text: You have successfully unsubscribed from all email from &lt;insert company name here&gt;.</p> - UseStoredValues - false - - - width - - 6 - - - false - - - Screen2PreviewScreen_0_Section1_Column2 - Region - - ModifyScreen2Part2 - String - - var_FinalRecord.Screen_2_Part_2__c - - You may modify the text of part 2 here. It only appears if you turn on the confirmation email. - InputField - <p>Example text: You will get a confirmation email shortly.</p> - UseStoredValues - false - - and - - confirmEmailQ - EqualTo - - Yes - - - - - - width - - 6 - - - false - - false - SectionWithoutHeader - - true - false - - - This is an optional screen to allow user to enter their email if not found in the database. - Screen3PreviewScreen - - 0 - 0 - false - true - false - - Confirmation_EmailSend - - - screen3previewDisplayText - <p><strong style="font-size: 20px;">PREVIEW</strong></p><p><em>If the email recipient's ID was not found, they can enter their email address here. You can turn off this feature. </em></p><p>{!horizontalLine1}</p> - DisplayText - - - Screen3PreviewScreen_Section1 - RegionContainer - - Screen3PreviewScreen_Section1_Column1 - Region - - screen3preview - <p><span style="font-size: 20px;">{!txt_Screen3}</span></p> - DisplayText - - - width - - 6 - - - false - - - Screen3PreviewScreen_Section1_Column2 - Region - - RecipientEntersEmail - flowruntime:email - ComponentInstance - UseStoredValues - true - true - - - width - - 6 - - - false - - false - SectionWithoutHeader - - - hozline - <p>{!horizontalLine1}</p> - DisplayText - - - ModifyScreen3Text - String - - txt_Screen3 - - You can modify the text here: - InputField - UseStoredValues - false - - true - false - - - Select informations to set up the unsubscribe link - Set_Up_Unsubscribe_Link_0 - - 0 - 0 - false - true - false - - dec_Org_wide_confirmation_email_sender - - - Set_Up_Unsubscribe_Link_0_Section1 - RegionContainer - - Set_Up_Unsubscribe_Link_0_Section1_Column1 - Region - - Company_Name - String - - var_FinalRecord.Our_Organization__c - - Company Name - InputField - UseStoredValues - false - - and - - RecordExists - EqualTo - - true - - - - - - confirmEmailQ - Yes - No - String - - var_FinalRecord.Send_Confirmation_Email__c - - Do you want to send a confirmation email immediately after the email recipient opts out? - DropdownBox - UseStoredValues - true - - - OrgWideEmailQ - senderOrgWideEmails - Create_an_org_wide_email_now - String - - var_FinalRecord.Org_Wide_Email_Address__c - - Choose an organization wide email address for this email to appear from. - DropdownBox - UseStoredValues - true - - and - - confirmEmailQ - EqualTo - - Yes - - - - - - ConfirmEmailText - String - - var_FinalRecord.Confirmation_Email_Text__c - - What should the email say? - InputField - <p>Example text: You have successfully unsubscribed from all email from &lt;insert company name&gt;.</p> - UseStoredValues - false - - and - - confirmEmailQ - EqualTo - - Yes - - - - - - width - - 6 - - - false - - - Set_Up_Unsubscribe_Link_0_Section1_Column2 - Region - - width - - 6 - - - false - - false - SectionWithoutHeader - - - Set_Up_Unsubscribe_Link_0_Section2 - RegionContainer - - Set_Up_Unsubscribe_Link_0_Section2_Column1 - Region - - dis_CreateOrgWide - <p><strong><u>Create organization wide email address</u></strong></p> - DisplayText - - - Display_NameOrgWideEmail - String - Display Name - InputField - UseStoredValues - true - - - orgWideEmail - flowruntime:email - ComponentInstance - - label - - Email - - - - required - - true - - - UseStoredValues - true - true - - - Purpose - Default_No_Reply_Address - User_Selection_and_Default_No_Reply_Address - String - Purpose - DropdownBox - UseStoredValues - true - - - width - - 6 - - - false - - - Set_Up_Unsubscribe_Link_0_Section2_Column2 - Region - - width - - 6 - - - false - - false - SectionWithoutHeader - - and - - OrgWideEmailQ - EqualTo - - Create_an_org_wide_email_now - - - - - - OneClickdisplaytext - <p>{!horizontalLine1}</p><p><strong><u>Allow Recipients to Type-In Email Address</u></strong></p><p><span style="font-size: 14px; background-color: transparent;">The unsubscribe link passes the contact or lead's Salesforce id to a flow. Sometimes an email recipient's security settings block or scramble the ID. You can allow your recipients to type in their email addresses to unsubscribe in that situation. BE CAREFUL! This allows anyone who has the link and knows any email addresses in your database to unsubscribe them. For example, if a bad guy knows that joeschmoe@ymail.com loves your newsletters and that bad guy dislikes your organization, then he could potentially unsubscribe Joe Schmoe from your newsletter!&nbsp;</span></p> - DisplayText - - - Set_Up_Unsubscribe_Link_0_Section3 - RegionContainer - - Set_Up_Unsubscribe_Link_0_Section3_Column1 - Region - - type_in_unsubscribe - Yes - No - String - - var_FinalRecord.Enable_Type_in_Email_Address__c - - Allow recipient to type in email - DropdownBox - UseStoredValues - true - - - width - - 4 - - - false - - - Set_Up_Unsubscribe_Link_0_Section3_Column2 - Region - - width - - 8 - - - false - - false - SectionWithoutHeader - - Next - true - false - - - Set the company name and unsubscribe configurations and then create the Unsubscribe Link Setup record. - STG01_InitialConfiguration - true - - 1 - - - Preview the text for the experience cloud flow pages and the confirmation email. - STG02_Previews - true - - 2 - - - Stage for creating the required public IDs for the contact and lead objects. - STG03_PublicIDs - true - - 3 - - - The final confirmation screen. - STG04_Done - true - - 4 - - - 0 - 0 - - getULSetup - - - Active - - horizontalLine1 - true - <hr> - - - questionChangeOrgName - true - Would you like to change "{!varT_OrgName}"? - - - screen1part2 - true - from all further email from {!FinalOrgName}, click NEXT. - - - text_DefaultConfirmationEmailText - true - You have successfully unsubscribed from all email from {!FinalOrgName}. - - - txt_screen2Part1 - true - You have successfully unsubscribed from all email from {!FinalOrgName}. - - - txt_Screen3 - true - To unsubscribe from all email from {!var_FinalRecord.Our_Organization__c}, enter your email address and click NEXT. - - - This record will hold default values for the fields for the initial time through. After the initial set up, the actual values will be used. - var_defaultRecordValues - SObject - false - false - false - Unsubscribe_Link_Setup__c - - - Assign this the values of the final record that will be updated. - var_FinalRecord - SObject - false - false - false - Unsubscribe_Link_Setup__c - - - varT_OrgName - String - false - false - false - - - varT_OrgWideEmailDisplayName - String - false - false - false - - From bfea3e0766149afe47d6a569a63c9b43967d9e40 Mon Sep 17 00:00:00 2001 From: DKeatonDC <165526945+DKeatonDC@users.noreply.github.com> Date: Thu, 22 Jan 2026 14:07:26 -0500 Subject: [PATCH 07/11] Revert "Delete force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml" This reverts commit 56a0bff39662f02823d2e573cadff86a7c58f291. --- .../Unsubscribe_Link_Setup.flow-meta.xml | 1585 +++++++++++++++++ 1 file changed, 1585 insertions(+) create mode 100644 force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml diff --git a/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml b/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml new file mode 100644 index 0000000..4bb5f20 --- /dev/null +++ b/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml @@ -0,0 +1,1585 @@ + + + + Contact_Batch + + 0 + 0 + UUIDBatchInvocable + apex + + LeadBatch + + Automatic + + fieldName + + Public_Id__c + + + + linkText + + LinkText + + + + objectType + + Contact + + + UUIDBatchInvocable + + + LeadBatch + + 0 + 0 + UUIDBatchInvocable + apex + + completeScreen + + Automatic + + fieldName + + Public_Id__c + + + + linkText + + LinkText + + + + objectType + + Lead + + + UUIDBatchInvocable + + 64.0 + + ass_final_value_of_sender_email + + 0 + 0 + + var_FinalRecord.Org_Wide_Email_Address__c + Assign + + orgWideEmail.value + + + + varT_OrgWideEmailDisplayName + Assign + + Display_NameOrgWideEmail + + + + UpdateFinalValues + + + + ass_final_value_of_sender_email_0 + + 0 + 0 + + var_FinalRecord.Org_Wide_Email_Address__c + Assign + + OrgWideEmailQ + + + + varT_OrgWideEmailDisplayName + Assign + + OrgWideEmailQ + + + + UpdateFinalValues + + + + Assign selections made on previous screens + Assign_Modified_Value + + 0 + 0 + + var_FinalRecord.Screen_1_Part_2__c + Assign + + ModifyScreen1Part2 + + + + var_FinalRecord.Screen_2_Part_1__c + Assign + + ModifyScreen2Part1 + + + + var_FinalRecord.Screen_2_Part_2__c + Assign + + ModifyScreen2Part2 + + + + var_FinalRecord.Screen_3__c + Assign + + ModifyScreen3Text + + + + var_FinalRecord.Screen_1_Part_1__c + Assign + + ModifyScreen1Part1 + + + + var_FinalRecord.Link_Text__c + Assign + + LinkText + + + + var_FinalRecord.Site_Domain__c + Assign + + Get_My_Domain.Domain.Domain + + + + var_FinalRecord.Confirmation_Page__c + Assign + + EnableOneClick + + + + var_FinalRecord.Id + Assign + + getULSetup.Id + + + + ExistingRecordSameName_0_0 + + + + Assign values to the default if this is their first time creating a record. + Default_AssignValues + + 0 + 0 + + var_FinalRecord.Screen_3__c + Assign + + txt_Screen3 + + + + var_FinalRecord.Confirmation_Page__c + Assign + + Yes + + + + var_FinalRecord.Enable_Type_in_Email_Address__c + Assign + + No + + + + var_FinalRecord.Confirmation_Email_Text__c + Assign + + text_DefaultConfirmationEmailText + + + + var_FinalRecord.Screen_1_Part_1__c + Assign + + To unsubscribe + + + + var_FinalRecord.Screen_1_Part_2__c + Assign + + screen1part2 + + + + var_FinalRecord.Screen_2_Part_1__c + Assign + + txt_screen2Part1 + + + + var_FinalRecord.Screen_2_Part_2__c + Assign + + You can expect a confirmation email shortly. + + + + var_FinalRecord.Error_Email_Recipient__c + Assign + + $User.Email + + + + var_FinalRecord.Our_Organization__c + Assign + + FinalOrgName + + + + var_FinalRecord.Link_Text__c + Assign + + Click here to unsubscribe. + + + + var_FinalRecord.Send_Confirmation_Email__c + Assign + + No + + + + var_FinalRecord.Error_Email_Recipient__c + Assign + + $User.Email + + + + Set_Up_Unsubscribe_Link_0 + + + + Assign values to the final variable if this is their second or later time filling this out. + EXISTINGAssignValues + + 0 + 0 + + var_FinalRecord.Screen_3__c + Assign + + getULSetup.Screen_3__c + + + + var_FinalRecord.Confirmation_Page__c + Assign + + getULSetup.Confirmation_Page__c + + + + var_FinalRecord.Enable_Type_in_Email_Address__c + Assign + + getULSetup.Enable_Type_in_Email_Address__c + + + + var_FinalRecord.Confirmation_Email_Text__c + Assign + + getULSetup.Confirmation_Email_Text__c + + + + var_FinalRecord.Screen_1_Part_1__c + Assign + + getULSetup.Screen_1_Part_1__c + + + + var_FinalRecord.Our_Organization__c + Assign + + getULSetup.Our_Organization__c + + + + var_FinalRecord.Screen_1_Part_2__c + Assign + + getULSetup.Screen_1_Part_2__c + + + + var_FinalRecord.Screen_2_Part_1__c + Assign + + getULSetup.Screen_2_Part_1__c + + + + var_FinalRecord.Screen_2_Part_2__c + Assign + + getULSetup.Screen_2_Part_2__c + + + + var_FinalRecord.Link_Text__c + Assign + + getULSetup.Link_Text__c + + + + var_FinalRecord.Error_Email_Recipient__c + Assign + + getULSetup.Error_Email_Recipient__c + + + + var_FinalRecord.Send_Confirmation_Email__c + Assign + + getULSetup.Send_Confirmation_Email__c + + + + var_FinalRecord.Org_Wide_Email_Address__c + Assign + + getULSetup.Org_Wide_Email_Address__c + + + + Set_Up_Unsubscribe_Link_0 + + + + Assign values to the final variable based on answers to the initial screen. + UpdateFinalValues + + 0 + 0 + + var_FinalRecord.Confirmation_Email_Text__c + Assign + + ConfirmEmailText + + + + var_FinalRecord.Send_Confirmation_Email__c + Assign + + confirmEmailQ + + + + var_FinalRecord.Enable_Type_in_Email_Address__c + Assign + + type_in_unsubscribe + + + + EmailModifyScreen + + + + Create_an_org_wide_email_now + Create an org wide email now. + String + + Create an org wide email now. + + + + Default_No_Reply_Address + Default No-Reply Address + String + + DefaultNoReply + + + + No + No + String + + No + + + + User_Selection_and_Default_No_Reply_Address + User Selection and Default No-Reply Address + String + + UserSelectionAndDefaultNoReply + + + + Yes + Yes + String + + Yes + + + + Confirmation_EmailSend + + 0 + 0 + + Get_Experience_Site + + No + + YesSend + and + + confirmEmailQ + EqualTo + + Yes + + + + ConfirmationEmailPreviewScreen + + + + + + dec_Org_wide_confirmation_email_sender + + 0 + 0 + + ass_final_value_of_sender_email_0 + + Use Existing + + out_Createnew + and + + OrgWideEmailQ + EqualTo + + Create_an_org_wide_email_now + + + + Create_Org_Wide_Email_0 + + + + + + Does a setup record exist already + ExistingRecordSameName_0 + + 0 + 0 + + CompanyName + + No record + + RecordExists + and + + getULSetup + IsNull + + false + + + + EXISTINGAssignValues + + + + + + Does a setup record exist already + ExistingRecordSameName_0_0 + + 0 + 0 + + Create_Record + + No record + + RecordExists_0 + and + + getULSetup + IsNull + + false + + + + Update_existing_record + + + + + + Include_screen_1 + + 0 + 0 + + Screen2PreviewScreen_0 + + No + + YesScreen1 + and + + var_FinalRecord.Confirmation_Page__c + EqualTo + + Yes + + + + Screen1Preview + + + + + + IncludeScreen3Decision + + 0 + 0 + + Confirmation_EmailSend + + Skip Confirmation Screen + + IncludeScreen3Outcome + and + + type_in_unsubscribe + EqualTo + + Yes + + + + Screen3PreviewScreen + + + + + Included creating an org wide email address for confirmation email sender. And profile security. + +July 2025 Updates: +added progress bar (issue #113)--activated progress bar (was not active in version connected to pull request) +added explanation of implications for company name (issue #93) +resolved unhandled faults related to org-wide email address creation by preventing users to back track to previous screens and updated the record choice set to include non-verified email addresses (issue #114) +updated final screen to clarify the flow is finished but can be run again if needed (issue #105) +added explanation text to all preview screens (issue #144) + + Pick another org wide email to get an error message. + ErrorEmailAddress + String + Address + and + + IsVerified + EqualTo + + true + + + OrgWideEmailAddress + + var_FinalRecord.Error_Email_Recipient__c + Address + + Address + + + senderOrgWideEmails + String + Address + and + + Purpose + NotEqualTo + + UserSelection + + + OrgWideEmailAddress + + varT_OrgWideEmailDisplayName + DisplayName + + Address + + Default + + Use currentUser or existing CMDT type value + currentUserOrExisting + String + IF(ISBLANK({!getULSetup.Error_Email_Recipient__c}),{!$User.Email}, +{!getULSetup.Error_Email_Recipient__c}) + + + The question asks "Do you want to include this confirmation page?" The field says "do you want to enable one click?" so the answers need to be reversed. + EnableOneClickFormula + String + IF({!EnableOneClick}='Yes', 'No', 'Yes') + + + frm_screen2part2 + String + IF({!confirmEmailQ}='Yes', {!var_FinalRecord.Screen_2_Part_2__c},'') + + Unsubscribe Link Setup {!$Flow.CurrentDateTime} + + + BuilderType + + LightningFlowBuilder + + + + CanvasMode + + AUTO_LAYOUT_CANVAS + + + + OriginBuilderType + + LightningFlowBuilder + + + Flow + + Create the Org wide email address used by the confirmation email as the sender. + Create_Org_Wide_Email_0 + + 0 + 0 + + ass_final_value_of_sender_email + + + Address + + orgWideEmail.value + + + + DisplayName + + Display_NameOrgWideEmail + + + + IsAllowAllProfiles + + true + + + + Purpose + + Purpose + + + OrgWideEmailAddress + true + + + Create the UL record. + Create_Record + + 0 + 0 + + Create_Public_Ids + + var_FinalRecord + + + Collect Experience Site informations + Get_Experience_Site + + 0 + 0 + false + + Get_My_Domain + + true + Site + true + + + Collect URL from Experience Site + Get_My_Domain + + 0 + 0 + false + + Assign_Modified_Value + + and + + SiteId + EqualTo + + Get_Experience_Site.Id + + + true + DomainSite + true + + + getULSetup + + 0 + 0 + false + + ExistingRecordSameName_0 + + true + Unsubscribe_Link_Setup__c + true + + + Update_existing_record + + 0 + 0 + + Create_Public_Ids + + var_FinalRecord + + + CompanyName + + 0 + 0 + false + true + false + + Default_AssignValues + + + S01_T01_CompanyNameInstructions + <p><strong style="font-size: 16px;">Set Company Name</strong></p><p><br></p><p>When someone clicks the unsubscribe link they will see a confirmation page that includes your company's name.</p><p>We have pre-populated the text with the name listed in Setup under Company Info but you may customize it here, if desired.</p> + DisplayText + + + FinalOrgName + String + + $Organization.Name + + Company name as it will appear on the unsubscribe confirmation page: + InputField + UseStoredValues + false + + Next + true + false + + + completeScreen + + 0 + 0 + false + true + false + + DonedisplayText + <p><span style="font-size: 20px;">You are done! </span></p><p><br></p><p><span style="font-size: 20px;">If you need to make any changes, click Run Again. </span><span style="font-size: 20px; background-color: rgb(255, 255, 255);">Otherwise, just close this window.</span></p> + DisplayText + + Run Again + true + false + + + ConfirmationEmailPreviewScreen + + 0 + 0 + false + true + false + + Get_Experience_Site + + + confirmationEmailDisplayText + <p><strong style="font-size: 20px;">PREVIEW</strong></p><p><em>If you opted to send a confirmation email, the recipient receives a message that looks like this. </em></p><p>{!horizontalLine1}</p><p><br></p><p><span style="font-size: 20px;">From: {!varT_OrgWideEmailDisplayName}</span></p><p><span style="font-size: 20px;">Email body: {!ConfirmEmailText}</span></p> + DisplayText + + true + false + + + Create_Public_Ids + + 0 + 0 + false + true + false + + Contact_Batch + + + displayPublicIds + <p><span style="font-size: 18px;">Great! That part is done.</span></p><p><br></p><p><span style="font-size: 18px;">Last step</span></p><p>The Unsubscribe Link uses a 64 digit random id on each contact and lead, called Public_Id__c.</p><p>This may take a little while. You will receive an email when it is done.</p><p>After this, two record triggered flows will automatically create public ids when new contacts and leads are created.</p><p><br></p><p><span style="color: rgb(68, 68, 68); background-color: rgb(255, 255, 255);">Click next to populate the public ids on all your records now.</span></p> + DisplayText + + true + true + + + A preview of the email with the option to modify the text of the link + EmailModifyScreen + + 0 + 0 + false + true + false + + Include_screen_1 + + + SampleEmailDisplayText_0 + <p><strong style="font-size: 22px;"><u></u>PREVIEW</strong></p><p><em>Your email recipient gets an email like this with an unsubscribe link at the bottom. </em></p><p>{!horizontalLine1}</p><p><br></p><p><span style="font-size: 20px;">Dear Friend,</span></p><p><br></p><p><span style="font-size: 20px;">It's Thursday! You love to order a pizza on Thursdays! If you order before 5, I'll also throw in some free drinks!</span></p><p><br></p><p><span style="font-size: 20px;">Your friend,</span></p><p><span style="font-size: 20px;">Bob</span></p><p><br></p><p><u style="font-size: 20px; color: rgb(2, 54, 244);">{!var_FinalRecord.Link_Text__c}</u></p> + DisplayText + + + DisplayTextforHorizontalLine + <p><span style="background-color: rgb(255, 255, 255); color: rgb(68, 68, 68);">{!horizontalLine1}</span></p> + DisplayText + + + LinkText + String + + var_FinalRecord.Link_Text__c + + You may modify the text of the link here: + InputField + UseStoredValues + false + + true + false + + + Give the option to have a confirmation screen before Opt Out, but this is not recommended. + Screen1Preview + + 0 + 0 + false + true + false + + Screen2PreviewScreen_0 + + + Screen1PreviewDisplayText + <p><strong style="font-size: 20px;">PREVIEW</strong></p><p><em style="color: rgb(68, 68, 68); background-color: rgb(255, 255, 255);">This page allows the recipient to confirm before opting out. </em></p><p><span style="color: rgb(68, 68, 68); background-color: rgb(255, 255, 255);">{!horizontalLine1}</span></p><p><br></p><p><span style="font-size: 20px;">{!var_FinalRecord.Screen_1_Part_1__c} georgeB@bbbl.org </span><span style="font-size: 20px; background-color: rgb(255, 255, 255); color: rgb(68, 68, 68);">{!var_FinalRecord.Screen_1_Part_2__c} </span></p> + DisplayText + + + googlewarning + <p>{!horizontalLine1}</p><p><a href="https://blog.google/products/gmail/gmail-security-authentication-spam-protection/" rel="noopener noreferrer" target="_blank" style="background-color: transparent; font-size: 14px;">Gmail wants you to make it easier to unsubscribe</a><span style="background-color: transparent; font-size: 14px;"> with "one click" email opt-out so we advise against adding in this page. </span></p> + DisplayText + + + Screen1Preview_Section1 + RegionContainer + + Screen1Preview_Section1_Column1 + Region + + EnableOneClick + Yes + No + String + + var_FinalRecord.Confirmation_Page__c + + Do you want to include this confirmation page? + DropdownBox + UseStoredValues + true + + + width + + 4 + + + false + + + Screen1Preview_Section1_Column2 + Region + + width + + 4 + + + false + + + Screen1Preview_Section1_Column3 + Region + + width + + 4 + + + false + + false + SectionWithoutHeader + + + Screen1Preview_Section2 + RegionContainer + + Screen1Preview_Section2_Column1 + Region + + ModifyScreen1Part1 + String + + var_FinalRecord.Screen_1_Part_1__c + + You may modify the text of part 1 here: + InputField + UseStoredValues + false + + + width + + 5 + + + false + + + Screen1Preview_Section2_Column2 + Region + + ModifyScreen1Part2 + String + + var_FinalRecord.Screen_1_Part_2__c + + You may modify the text of part 2 here: + InputField + UseStoredValues + false + + + width + + 5 + + + false + + + Screen1Preview_Section2_Column3 + Region + + width + + 2 + + + false + + false + SectionWithoutHeader + + and + + EnableOneClick + EqualTo + + Yes + + + + + true + false + + + This screen will display the confirmation message you want the user to see + Screen2PreviewScreen_0 + + 0 + 0 + false + true + false + + IncludeScreen3Decision + + + screen2previewDisplayText_0 + <p><strong style="font-size: 20px;">PREVIEW</strong><span style="font-size: 20px;"> </span></p><p><em style="background-color: rgb(255, 255, 255);">This is what the email recipient will see on the confirmation page after they have been unsubscribed. </em></p><p>{!horizontalLine1}</p><p><br></p><p><span style="color: rgb(0, 0, 0); font-size: 20px;">{!var_FinalRecord.Screen_2_Part_1__c} {!frm_screen2part2}</span></p> + DisplayText + + + displayTextHozLine + <p><br></p><p><br></p><p><br></p><p><br></p><p><span style="background-color: rgb(255, 255, 255); color: rgb(68, 68, 68);">{!horizontalLine1}</span></p> + DisplayText + + + Screen2PreviewScreen_0_Section1 + RegionContainer + + Screen2PreviewScreen_0_Section1_Column1 + Region + + ModifyScreen2Part1 + String + + var_FinalRecord.Screen_2_Part_1__c + + You may modify the text here: + InputField + <p>Example text: You have successfully unsubscribed from all email from &lt;insert company name here&gt;.</p> + UseStoredValues + false + + + width + + 6 + + + false + + + Screen2PreviewScreen_0_Section1_Column2 + Region + + ModifyScreen2Part2 + String + + var_FinalRecord.Screen_2_Part_2__c + + You may modify the text of part 2 here. It only appears if you turn on the confirmation email. + InputField + <p>Example text: You will get a confirmation email shortly.</p> + UseStoredValues + false + + and + + confirmEmailQ + EqualTo + + Yes + + + + + + width + + 6 + + + false + + false + SectionWithoutHeader + + true + false + + + This is an optional screen to allow user to enter their email if not found in the database. + Screen3PreviewScreen + + 0 + 0 + false + true + false + + Confirmation_EmailSend + + + screen3previewDisplayText + <p><strong style="font-size: 20px;">PREVIEW</strong></p><p><em>If the email recipient's ID was not found, they can enter their email address here. You can turn off this feature. </em></p><p>{!horizontalLine1}</p> + DisplayText + + + Screen3PreviewScreen_Section1 + RegionContainer + + Screen3PreviewScreen_Section1_Column1 + Region + + screen3preview + <p><span style="font-size: 20px;">{!txt_Screen3}</span></p> + DisplayText + + + width + + 6 + + + false + + + Screen3PreviewScreen_Section1_Column2 + Region + + RecipientEntersEmail + flowruntime:email + ComponentInstance + UseStoredValues + true + true + + + width + + 6 + + + false + + false + SectionWithoutHeader + + + hozline + <p>{!horizontalLine1}</p> + DisplayText + + + ModifyScreen3Text + String + + txt_Screen3 + + You can modify the text here: + InputField + UseStoredValues + false + + true + false + + + Select informations to set up the unsubscribe link + Set_Up_Unsubscribe_Link_0 + + 0 + 0 + false + true + false + + dec_Org_wide_confirmation_email_sender + + + Set_Up_Unsubscribe_Link_0_Section1 + RegionContainer + + Set_Up_Unsubscribe_Link_0_Section1_Column1 + Region + + Company_Name + String + + var_FinalRecord.Our_Organization__c + + Company Name + InputField + UseStoredValues + false + + and + + RecordExists + EqualTo + + true + + + + + + confirmEmailQ + Yes + No + String + + var_FinalRecord.Send_Confirmation_Email__c + + Do you want to send a confirmation email immediately after the email recipient opts out? + DropdownBox + UseStoredValues + true + + + OrgWideEmailQ + senderOrgWideEmails + Create_an_org_wide_email_now + String + + var_FinalRecord.Org_Wide_Email_Address__c + + Choose an organization wide email address for this email to appear from. + DropdownBox + UseStoredValues + true + + and + + confirmEmailQ + EqualTo + + Yes + + + + + + ConfirmEmailText + String + + var_FinalRecord.Confirmation_Email_Text__c + + What should the email say? + InputField + <p>Example text: You have successfully unsubscribed from all email from &lt;insert company name&gt;.</p> + UseStoredValues + false + + and + + confirmEmailQ + EqualTo + + Yes + + + + + + width + + 6 + + + false + + + Set_Up_Unsubscribe_Link_0_Section1_Column2 + Region + + width + + 6 + + + false + + false + SectionWithoutHeader + + + Set_Up_Unsubscribe_Link_0_Section2 + RegionContainer + + Set_Up_Unsubscribe_Link_0_Section2_Column1 + Region + + dis_CreateOrgWide + <p><strong><u>Create organization wide email address</u></strong></p> + DisplayText + + + Display_NameOrgWideEmail + String + Display Name + InputField + UseStoredValues + true + + + orgWideEmail + flowruntime:email + ComponentInstance + + label + + Email + + + + required + + true + + + UseStoredValues + true + true + + + Purpose + Default_No_Reply_Address + User_Selection_and_Default_No_Reply_Address + String + Purpose + DropdownBox + UseStoredValues + true + + + width + + 6 + + + false + + + Set_Up_Unsubscribe_Link_0_Section2_Column2 + Region + + width + + 6 + + + false + + false + SectionWithoutHeader + + and + + OrgWideEmailQ + EqualTo + + Create_an_org_wide_email_now + + + + + + OneClickdisplaytext + <p>{!horizontalLine1}</p><p><strong><u>Allow Recipients to Type-In Email Address</u></strong></p><p><span style="font-size: 14px; background-color: transparent;">The unsubscribe link passes the contact or lead's Salesforce id to a flow. Sometimes an email recipient's security settings block or scramble the ID. You can allow your recipients to type in their email addresses to unsubscribe in that situation. BE CAREFUL! This allows anyone who has the link and knows any email addresses in your database to unsubscribe them. For example, if a bad guy knows that joeschmoe@ymail.com loves your newsletters and that bad guy dislikes your organization, then he could potentially unsubscribe Joe Schmoe from your newsletter!&nbsp;</span></p> + DisplayText + + + Set_Up_Unsubscribe_Link_0_Section3 + RegionContainer + + Set_Up_Unsubscribe_Link_0_Section3_Column1 + Region + + type_in_unsubscribe + Yes + No + String + + var_FinalRecord.Enable_Type_in_Email_Address__c + + Allow recipient to type in email + DropdownBox + UseStoredValues + true + + + width + + 4 + + + false + + + Set_Up_Unsubscribe_Link_0_Section3_Column2 + Region + + width + + 8 + + + false + + false + SectionWithoutHeader + + Next + true + false + + + Set the company name and unsubscribe configurations and then create the Unsubscribe Link Setup record. + STG01_InitialConfiguration + true + + 1 + + + Preview the text for the experience cloud flow pages and the confirmation email. + STG02_Previews + true + + 2 + + + Stage for creating the required public IDs for the contact and lead objects. + STG03_PublicIDs + true + + 3 + + + The final confirmation screen. + STG04_Done + true + + 4 + + + 0 + 0 + + getULSetup + + + Active + + horizontalLine1 + true + <hr> + + + questionChangeOrgName + true + Would you like to change "{!varT_OrgName}"? + + + screen1part2 + true + from all further email from {!FinalOrgName}, click NEXT. + + + text_DefaultConfirmationEmailText + true + You have successfully unsubscribed from all email from {!FinalOrgName}. + + + txt_screen2Part1 + true + You have successfully unsubscribed from all email from {!FinalOrgName}. + + + txt_Screen3 + true + To unsubscribe from all email from {!var_FinalRecord.Our_Organization__c}, enter your email address and click NEXT. + + + This record will hold default values for the fields for the initial time through. After the initial set up, the actual values will be used. + var_defaultRecordValues + SObject + false + false + false + Unsubscribe_Link_Setup__c + + + Assign this the values of the final record that will be updated. + var_FinalRecord + SObject + false + false + false + Unsubscribe_Link_Setup__c + + + varT_OrgName + String + false + false + false + + + varT_OrgWideEmailDisplayName + String + false + false + false + + From edfe032b2e998c8c5c4106541c9b4e3afb8395d9 Mon Sep 17 00:00:00 2001 From: DKeatonDC <165526945+DKeatonDC@users.noreply.github.com> Date: Thu, 22 Jan 2026 14:12:58 -0500 Subject: [PATCH 08/11] Reverts changes to setup flow --- .../Unsubscribe_Link_Setup.flow-meta.xml | 253 +++++++++--------- 1 file changed, 127 insertions(+), 126 deletions(-) diff --git a/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml b/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml index 4bb5f20..73f992c 100644 --- a/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml +++ b/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml @@ -3,8 +3,8 @@ Contact_Batch - 0 - 0 + 577 + 4010 UUIDBatchInvocable apex @@ -34,8 +34,8 @@ LeadBatch - 0 - 0 + 577 + 4118 UUIDBatchInvocable apex @@ -62,12 +62,12 @@ UUIDBatchInvocable - 64.0 + 61.0 ass_final_value_of_sender_email - 0 - 0 + 445 + 1238 var_FinalRecord.Org_Wide_Email_Address__c Assign @@ -89,8 +89,8 @@ ass_final_value_of_sender_email_0 - 0 - 0 + 709 + 1022 var_FinalRecord.Org_Wide_Email_Address__c Assign @@ -113,8 +113,8 @@ Assign selections made on previous screens Assign_Modified_Value - 0 - 0 + 577 + 3494 var_FinalRecord.Screen_1_Part_2__c Assign @@ -186,8 +186,8 @@ Assign values to the default if this is their first time creating a record. Default_AssignValues - 0 - 0 + 709 + 506 var_FinalRecord.Screen_3__c Assign @@ -287,8 +287,8 @@ Assign values to the final variable if this is their second or later time filling this out. EXISTINGAssignValues - 0 - 0 + 445 + 398 var_FinalRecord.Screen_3__c Assign @@ -388,8 +388,8 @@ Assign values to the final variable based on answers to the initial screen. UpdateFinalValues - 0 - 0 + 578 + 1373 var_FinalRecord.Confirmation_Email_Text__c Assign @@ -458,8 +458,8 @@ Confirmation_EmailSend - 0 - 0 + 577 + 2978 Get_Experience_Site @@ -483,8 +483,8 @@ dec_Org_wide_confirmation_email_sender - 0 - 0 + 577 + 914 ass_final_value_of_sender_email_0 @@ -509,8 +509,8 @@ Does a setup record exist already ExistingRecordSameName_0 - 0 - 0 + 577 + 290 CompanyName @@ -535,8 +535,8 @@ Does a setup record exist already ExistingRecordSameName_0_0 - 0 - 0 + 577 + 3602 Create_Record @@ -560,8 +560,8 @@ Include_screen_1 - 0 - 0 + 577 + 2270 Screen2PreviewScreen_0 @@ -585,8 +585,8 @@ IncludeScreen3Decision - 0 - 0 + 577 + 2678 Confirmation_EmailSend @@ -607,14 +607,7 @@ - Included creating an org wide email address for confirmation email sender. And profile security. - -July 2025 Updates: -added progress bar (issue #113)--activated progress bar (was not active in version connected to pull request) -added explanation of implications for company name (issue #93) -resolved unhandled faults related to org-wide email address creation by preventing users to back track to previous screens and updated the record choice set to include non-verified email addresses (issue #114) -updated final screen to clarify the flow is finished but can be run again if needed (issue #105) -added explanation text to all preview screens (issue #144) + Included creating an org wide email address for confirmation email sender. And profile security. Pick another org wide email to get an error message. ErrorEmailAddress @@ -638,13 +631,27 @@ added explanation text to all preview screens (issue #144) senderOrgWideEmails String - Address - and + DisplayName + 1 AND (2 OR 3) + + IsVerified + EqualTo + + true + + + + Purpose + EqualTo + +DefaultNoreply + + Purpose - NotEqualTo + EqualTo - UserSelection + UserSelectionAndDefaultNoReply OrgWideEmailAddress @@ -684,7 +691,7 @@ added explanation text to all preview screens (issue #144) CanvasMode - AUTO_LAYOUT_CANVAS + FREE_FORM_CANVAS @@ -698,8 +705,8 @@ added explanation text to all preview screens (issue #144) Create the Org wide email address used by the confirmation email as the sender. Create_Org_Wide_Email_0 - 0 - 0 + 445 + 1022 ass_final_value_of_sender_email @@ -734,8 +741,8 @@ added explanation text to all preview screens (issue #144) Create the UL record. Create_Record - 0 - 0 + 709 + 3710 Create_Public_Ids @@ -745,8 +752,8 @@ added explanation text to all preview screens (issue #144) Collect Experience Site informations Get_Experience_Site - 0 - 0 + 577 + 3278 false Get_My_Domain @@ -759,8 +766,8 @@ added explanation text to all preview screens (issue #144) Collect URL from Experience Site Get_My_Domain - 0 - 0 + 577 + 3386 false Assign_Modified_Value @@ -780,8 +787,8 @@ added explanation text to all preview screens (issue #144) getULSetup - 0 - 0 + 577 + 182 false ExistingRecordSameName_0 @@ -793,8 +800,8 @@ added explanation text to all preview screens (issue #144) Update_existing_record - 0 - 0 + 445 + 3710 Create_Public_Ids @@ -803,8 +810,8 @@ added explanation text to all preview screens (issue #144) CompanyName - 0 - 0 + 709 + 398 false true false @@ -812,20 +819,43 @@ added explanation text to all preview screens (issue #144) Default_AssignValues - S01_T01_CompanyNameInstructions - <p><strong style="font-size: 16px;">Set Company Name</strong></p><p><br></p><p>When someone clicks the unsubscribe link they will see a confirmation page that includes your company's name.</p><p>We have pre-populated the text with the name listed in Setup under Company Info but you may customize it here, if desired.</p> - DisplayText - - + CompanyName_Section1 + RegionContainer + + CompanyName_Section1_Column1 + Region + FinalOrgName String $Organization.Name - Company name as it will appear on the unsubscribe confirmation page: + What is your organization or company name? InputField UseStoredValues false + + + width + + 6 + + + false + + + CompanyName_Section1_Column2 + Region + + width + + 6 + + + false + + false + SectionWithoutHeader Next true @@ -834,26 +864,25 @@ added explanation text to all preview screens (issue #144) completeScreen - 0 - 0 - false + 577 + 4226 + true true - false + true DonedisplayText - <p><span style="font-size: 20px;">You are done! </span></p><p><br></p><p><span style="font-size: 20px;">If you need to make any changes, click Run Again. </span><span style="font-size: 20px; background-color: rgb(255, 255, 255);">Otherwise, just close this window.</span></p> + <p><span style="font-size: 20px;">You are done!</span></p> DisplayText - Run Again - true + true false ConfirmationEmailPreviewScreen - 0 - 0 - false + 445 + 3086 + true true false @@ -861,7 +890,7 @@ added explanation text to all preview screens (issue #144) confirmationEmailDisplayText - <p><strong style="font-size: 20px;">PREVIEW</strong></p><p><em>If you opted to send a confirmation email, the recipient receives a message that looks like this. </em></p><p>{!horizontalLine1}</p><p><br></p><p><span style="font-size: 20px;">From: {!varT_OrgWideEmailDisplayName}</span></p><p><span style="font-size: 20px;">Email body: {!ConfirmEmailText}</span></p> + <p><strong style="font-size: 20px;">PREVIEW</strong></p><p><em>The email recipient receives an email. </em></p><p>{!horizontalLine1}</p><p><br></p><p><span style="font-size: 20px;">From: {!varT_OrgWideEmailDisplayName}</span></p><p><span style="font-size: 20px;">Email body: {!ConfirmEmailText}</span></p> DisplayText true @@ -870,9 +899,9 @@ added explanation text to all preview screens (issue #144) Create_Public_Ids - 0 - 0 - false + 577 + 3902 + true true false @@ -890,9 +919,9 @@ added explanation text to all preview screens (issue #144) A preview of the email with the option to modify the text of the link EmailModifyScreen - 0 - 0 - false + 578 + 1565 + true true false @@ -900,7 +929,7 @@ added explanation text to all preview screens (issue #144) SampleEmailDisplayText_0 - <p><strong style="font-size: 22px;"><u></u>PREVIEW</strong></p><p><em>Your email recipient gets an email like this with an unsubscribe link at the bottom. </em></p><p>{!horizontalLine1}</p><p><br></p><p><span style="font-size: 20px;">Dear Friend,</span></p><p><br></p><p><span style="font-size: 20px;">It's Thursday! You love to order a pizza on Thursdays! If you order before 5, I'll also throw in some free drinks!</span></p><p><br></p><p><span style="font-size: 20px;">Your friend,</span></p><p><span style="font-size: 20px;">Bob</span></p><p><br></p><p><u style="font-size: 20px; color: rgb(2, 54, 244);">{!var_FinalRecord.Link_Text__c}</u></p> + <p><strong style="font-size: 22px;"><u></u>PREVIEW</strong></p><p><em>Your email recipient gets an email like this with an unsubscribe link at the bottom. </em></p><p>{!horizontalLine1}</p><p><br></p><p><span style="font-size: 20px;">Dear Friend,</span></p><p><br></p><p><span style="font-size: 20px;">It's Thursday! You love to order a pizza on Thursdays! If you order before 5, I'll also throw in some free drinks!</span></p><p><br></p><p><span style="font-size: 20px;">Your friend,</span></p><p><span style="font-size: 20px;">Bob</span></p><p><br></p><p><u style="color: rgb(2, 54, 244); font-size: 20px;">{!var_FinalRecord.Link_Text__c}</u></p> DisplayText @@ -926,9 +955,9 @@ added explanation text to all preview screens (issue #144) Give the option to have a confirmation screen before Opt Out, but this is not recommended. Screen1Preview - 0 - 0 - false + 445 + 2378 + true true false @@ -1074,9 +1103,9 @@ added explanation text to all preview screens (issue #144) This screen will display the confirmation message you want the user to see Screen2PreviewScreen_0 - 0 - 0 - false + 577 + 2570 + true true false @@ -1084,7 +1113,7 @@ added explanation text to all preview screens (issue #144) screen2previewDisplayText_0 - <p><strong style="font-size: 20px;">PREVIEW</strong><span style="font-size: 20px;"> </span></p><p><em style="background-color: rgb(255, 255, 255);">This is what the email recipient will see on the confirmation page after they have been unsubscribed. </em></p><p>{!horizontalLine1}</p><p><br></p><p><span style="color: rgb(0, 0, 0); font-size: 20px;">{!var_FinalRecord.Screen_2_Part_1__c} {!frm_screen2part2}</span></p> + <p><strong style="font-size: 20px;">PREVIEW</strong><span style="font-size: 20px;"> </span></p><p>{!horizontalLine1}</p><p><br></p><p><span style="font-size: 20px; color: rgb(0, 0, 0);">{!var_FinalRecord.Screen_2_Part_1__c} {!frm_screen2part2}</span></p> DisplayText @@ -1161,11 +1190,11 @@ added explanation text to all preview screens (issue #144) This is an optional screen to allow user to enter their email if not found in the database. Screen3PreviewScreen - 0 - 0 - false + 445 + 2786 + true true - false + true Confirmation_EmailSend @@ -1238,9 +1267,9 @@ added explanation text to all preview screens (issue #144) Select informations to set up the unsubscribe link Set_Up_Unsubscribe_Link_0 - 0 - 0 - false + 577 + 698 + true true false @@ -1484,42 +1513,14 @@ added explanation text to all preview screens (issue #144) true false - - Set the company name and unsubscribe configurations and then create the Unsubscribe Link Setup record. - STG01_InitialConfiguration - true - - 1 - - - Preview the text for the experience cloud flow pages and the confirmation email. - STG02_Previews - true - - 2 - - - Stage for creating the required public IDs for the contact and lead objects. - STG03_PublicIDs - true - - 3 - - - The final confirmation screen. - STG04_Done - true - - 4 - - - 0 - 0 + + 451 + 48 getULSetup - Active + Draft horizontalLine1 true From 590d44212871851f75e70346a5570824473fc2b6 Mon Sep 17 00:00:00 2001 From: esnorris <99896740+esnorris@users.noreply.github.com> Date: Thu, 22 Jan 2026 13:43:26 -0600 Subject: [PATCH 09/11] Addressed sharing issue with folders --- .../dashboards/UnsubscribeLink.dashboardFolder-meta.xml | 5 ----- .../default/reports/UnsubscribeLink.reportFolder-meta.xml | 5 ----- 2 files changed, 10 deletions(-) diff --git a/force-app/main/default/dashboards/UnsubscribeLink.dashboardFolder-meta.xml b/force-app/main/default/dashboards/UnsubscribeLink.dashboardFolder-meta.xml index 13efe30..c8e4ae6 100644 --- a/force-app/main/default/dashboards/UnsubscribeLink.dashboardFolder-meta.xml +++ b/force-app/main/default/dashboards/UnsubscribeLink.dashboardFolder-meta.xml @@ -1,9 +1,4 @@ - - Manage - ethansnorris.fd4368263b35@agentforce.com - User - Unsubscribe Link diff --git a/force-app/main/default/reports/UnsubscribeLink.reportFolder-meta.xml b/force-app/main/default/reports/UnsubscribeLink.reportFolder-meta.xml index 669b9e5..47f6944 100644 --- a/force-app/main/default/reports/UnsubscribeLink.reportFolder-meta.xml +++ b/force-app/main/default/reports/UnsubscribeLink.reportFolder-meta.xml @@ -1,9 +1,4 @@ - - Manage - ethansnorris.fd4368263b35@agentforce.com - User - Unsubscribe Link From 11159e105f735dad45883d365b6a11e59a45eb48 Mon Sep 17 00:00:00 2001 From: DKeatonDC <165526945+DKeatonDC@users.noreply.github.com> Date: Thu, 22 Jan 2026 15:19:17 -0500 Subject: [PATCH 10/11] Correctly update unsubscribe link setup flow Signed-off-by: DKeatonDC <165526945+DKeatonDC@users.noreply.github.com> --- .../Unsubscribe_Link_Setup.flow-meta.xml | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml b/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml index 73f992c..9f92119 100644 --- a/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml +++ b/force-app/main/default/flows/Unsubscribe_Link_Setup.flow-meta.xml @@ -30,6 +30,7 @@ UUIDBatchInvocable + 1 LeadBatch @@ -61,6 +62,7 @@ UUIDBatchInvocable + 1 61.0 @@ -633,7 +635,7 @@ String DisplayName 1 AND (2 OR 3) - + IsVerified EqualTo @@ -644,7 +646,7 @@ Purpose EqualTo -DefaultNoreply + DefaultNoreply @@ -823,18 +825,18 @@ RegionContainer CompanyName_Section1_Column1 - Region + Region - FinalOrgName - String - - $Organization.Name - - What is your organization or company name? - InputField - UseStoredValues - false - + FinalOrgName + String + + $Organization.Name + + What is your organization or company name? + InputField + UseStoredValues + false + width @@ -874,7 +876,7 @@ <p><span style="font-size: 20px;">You are done!</span></p> DisplayText - true + true false
@@ -1513,7 +1515,7 @@ true false - + 451 48 From 302add27d49bbcb146e0ca3ae3880eaca657ec80 Mon Sep 17 00:00:00 2001 From: DKeatonDC <165526945+DKeatonDC@users.noreply.github.com> Date: Sat, 24 Jan 2026 13:04:41 -0500 Subject: [PATCH 11/11] Adds description to dashboard --- .../tkaMbgmTEZoKnENXvhvZGaktqUAOxo.dashboard-meta.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/force-app/main/default/dashboards/UnsubscribeLink/tkaMbgmTEZoKnENXvhvZGaktqUAOxo.dashboard-meta.xml b/force-app/main/default/dashboards/UnsubscribeLink/tkaMbgmTEZoKnENXvhvZGaktqUAOxo.dashboard-meta.xml index de5f271..3ed3268 100644 --- a/force-app/main/default/dashboards/UnsubscribeLink/tkaMbgmTEZoKnENXvhvZGaktqUAOxo.dashboard-meta.xml +++ b/force-app/main/default/dashboards/UnsubscribeLink/tkaMbgmTEZoKnENXvhvZGaktqUAOxo.dashboard-meta.xml @@ -132,8 +132,8 @@ SpecifiedUser true - ethansnorris.fd4368263b35@agentforce.com - ethansnorris.fd4368263b35@agentforce.com + bioproject+sfdc+email.c1e135ad226e@agentforce.com + bioproject+sfdc+email.c1e135ad226e@agentforce.com #000000 Unsubscribe Link #000000