WEBINAR RECORDING: Operationalizing Gratitude: Effective and Timely Thank Yous for Increased Donor Retention. Watch >>

Enabling newsletter sign ups with Soapbox Donations in Salesforce

created

When someone makes a donation via Soapbox Donations on your site, they can also choose to sign up for your organization’s newsletter. With the help of the Soapbox Salesforce integration features, this information is sent to your Salesforce account, where a Lead is created. The Soapbox Donations for Salesforce managed packages installed on your Salesforce account then evaluate that Lead in an attempt to find a match with an existing Contact. 

If no Contact currently exists, then a new Contact will be created, complete with the data from the Soapbox Donations form, including the newsletter sign up. However, in order for an existing Contact object to be updated, some workflows need to be created in Salesforce (for a more detailed explanation on why this happens, see our previous blog post).

This tutorial will walk you through creating the custom Lead and Contact fields and establishing the workflow rules in Salesforce to ensure that both new and existing Contacts are properly signed up for your organization’s newsletters.

Please note that this process includes creating new Lead and Contacts fields that will allow you to collect additional data beyond contact information: 1) the date and time of the sign up; and 2) the IP address of the individual who signed up. Doing so gives you documentation that demonstrates that these individuals knowingly and willingly chose to sign up for your newsletter.

First stop: Soapbox

Enable newsletter opt-in checkbox on your Soapbox Donations form. See our previous knowledge base article for a how-to.

Next Stop: Salesforce

  1. Log into your Salesforce account
  2. Click on your organization’s name in the top right of the screen and in the drop-down menu, select “Setup”

Create the custom Lead fields

In the side menu on the left of the screen, under “App Setup” go to: Customize -> Leads -> Fields

Go to the subsection "Lead Custom Fields & Relationships" and click the "New" button

Create "Donation Newsletter Opt In" field

STEP 1: Choose the field type - select “Checkbox” and click Next

STEP 2: Enter the details.

    1. Field Label: Donation Newsletter Opt In
    2. Field Name: sbx_DonationNewsletterOptIn
    3. Default Value: Unchecked
    4. Leave the rest blank, and select Next

STEP 3 & 4: leave as-is and click Save

 

Create "Email List" field

STEP 1: Choose the field type - select “Checkbox” and click Next

STEP 2: Enter the details.

    1. Field Label: Email List
    2. Field Name: sbx_EmailList_General
    3. Default Value: Unchecked
    4. Leave the rest blank, and select Next

STEP 3 & 4: leave as-is and click Save

 

Create "Email List IP Address" field

STEP 1: Choose the field type - select “Text” and click Next

STEP 2: Enter the details.

    1. Field Label: Email List IP Address
    2. Field Name: sbx_EmailList_IP_General
    3. Length: 255
    4. Leave the rest blank, and select Next

STEP 3 & 4: leave as-is and click Save

 

Create "Email List Timestamp" field

STEP 1: Choose the field type - select “Date/Time” and click Next

STEP 2: Enter the details.

    1. Field Label: Email List Timestamp
    2. Field Name: sbx_EmailList_TS_General
    3. Leave the rest blank, and select Next

STEP 3 & 4: leave as-is and click Save

 

Create "IP Address" field

STEP 1: Choose the field type - select “Text” and click Next

STEP 2: Enter the details.

    1. Field Label: IP Address
    2. Field Name: sbx_IpAddress
    3. Length: 255
    4. Description: The IP address of the Soapbox visitor
    5. Help Text: The IP address of the Soapbox visitor
    6. Leave the rest blank, and select Next

STEP 3 & 4: leave as-is and click Save

Create custom Contact fields

In the side menu on the left of the screen, under “App Setup” go to: Customize -> Contacts -> Fields

Repeat the steps outlined above for the custom Lead fields to create corresponding custom Contact fields. You only need to do this for the Email List, Email List IP Address, and Email List Timestamp fields.

*Note the following change: when creating the Email List custom Contact field, add “Contact sign up to receive email communications” to the Description and Help Text fields.

Map the newly created custom Lead fields to their counterparts in the Contact objects

  1. In the Lead Fields section (App Setup -> Customize -> Leads -> Fields), click the  “Map Lead Fields” button in the Lead Custom Fields and Relationships subsection.
  2. Email List IP Address: Contact. Email List IP Address
  3. Email List Timestamp: Contact. Email List Timestamp

Create the workflow rule in Salesforce that will push the date and time and the IP Address fields from the converted Lead to the Contact object

In the side menu, under “App Setup” go to: Create -> Workflow & Approvals -> Workflow Rules, Click “New Rule”

STEP 1: Select object -- choose “Lead” from the drop-down list

STEP 2: Configure Workflow Rule. Enter the following information (see screenshot for further assistance):

    1. Rule Name: “SBX: Check if Email List of Donation Opt In is TRUE”
    2. Description: leave blank
    3. Evaluation Criteria: select last option, “created, and any time it’s edited to subsequently meet criteria”
    4. Rule Criteria: after “Run this rule if the following”, select “criteria are met” from the drop-down menu. Then enter the following criteria:
      • Field: “Lead: Email List”; Operator: “equals”; Value: “True”
      • Field: “Lead: Donation Newsletter Opt In”; Operator: “equals”; Value: “True”
    5. Select “Add Filter Logic” = Type in “1 OR 2” in this field (no quotes)
    6. Click “Save & Next”

STEP 3: Click “Done”

Workflow_Rule_SBX_Check_if_Email_List_of_Donation_Opt_In_is_TRUE

Create the corresponding “field updates” and add them to the new workflow

These field updates will be carrying out the actions specified in the newly created workflow.

In the side menu in Salesforce, go to: App Setup->Create -> Workflow & Approvals -> Field Updates and click “New Field Update”

New field update

  1. Name: SBX: Update Email List
  2. Description: Update Email List field to TRUE
  3. Object: Lead
  4. Field to Update: Email List
  5. Re-evaluate Workflow Rules after Field Change: leave UNCHECKED
  6. Specify New Field Value -> Checkbox Options: “True”
  7. Click “Save & New”

Field_Update_SBX_Update_Lead_Email_List

New field update

  1. Name: SBX: Update Email List TS
  2. Description: Update Email List Timestamp with current date and time
  3. Object: Lead
  4. Field to Update: Email List Timestamp
  5. Re-evaluate Workflow Rules after Field Change: leave UNCHECKED
  6. Specify New Field Value -> Date Options: select “Use a formula to set the new value” and in the field, type “now()” (no quotes)
  7. Click “Save & New”

Field_Update_SBX_Update_Email_List_TS.jpg 

New field update

  1. Name: SBX: Update Email List IP
  2. Description: Update Email List IP Address with value of IP Address field
  3. Object: Lead
  4. Field to Update: Email List IP Address
  5. Re-evaluate Workflow Rules after Field Change: leave UNCHECKED
  6. Specify New Field Value -> Text Options: select “Use a formula to set the new value” and in the text box, type “sbx_IpAddress__c” (no quotes)
  7. Click “Save”

Field_Update_SBX_Update_Email_List_IP

Add field updates to workflow

Go to: App Setup->Create -> Workflow & Approvals -> Workflow Rules, select the rule “SBX: Check if Email List of Donation Opt In is TRUE”

  1. Under “Workflow Actions”, click “Edit”
  2. Click “Add Workflow Action” and in the drop-down menu, choose “Select Existing Actions”
  3. In the “Search” drop-down menu at the top, select “Field Update” and add the 3 Field Updates you just created by selecting the Field Update under “Available Actions”, clicking the “Add” button (right arrow).
  4. Click “Save”

Create the second workflow rule, which will check to see if the new contact has the timestamp of when the contact opted in to the newsletter

In the side menu, under “App Setup” go to: Create -> Workflow & Approvals -> Workflow Rules, Click “New Rule”

STEP 1: Select object -- choose “Contact” from the drop-down list

STEP 2: Configure Workflow Rule. Enter the following information (see screenshot for further assistance):

  1. Rule Name: SBX: Check Email List TS
  2. Description: Check if Email List Timestamp is not null
  3. Evaluation Criteria: select last option, “created, and any time it’s edited to subsequently meet criteria”
  4. Rule Criteria: after “Run this rule if the following”, select “criteria are met” from the drop-down menu. Then enter the following criteria:
    • Field: “Contact: Email List Timestamp”
    • Operator: “not equal to”
    • Value: leave blank
  5. Click “Save & Next"

 

Workflow_Rule_SBX_Check_Email_List_TS.jpg

 

*BEFORE clicking “Done” in STEP 3, click “Add Workflow Action” under “Immediate Workflow Actions” and in the drop-down menu, select “New Field Update” to create the corresponding field update for the second workflow you just made

  1. Name: “SBX: Update Email List”
  2. Description: “Update Email List on Contact to be TRUE”
  3. Object: “Contact”
  4. Field to Update: “Email List”
  5. Re-evaluate Workflow Rules after Field Change: leave UNCHECKED
  6. Specify New Field Value -> Checkbox Options: “True”
  7. Click “Save”
  8. This will send you back to edit view for the Workflow rule you created, and all you need to do is click “Done"

Field_Update_SBX_Update_Contact_Email_List.jpg

Have more questions? Submit a request
Article is closed for comments.