Add Elements to Request and Save Communication Preferences

Let’s configure the flow to ask customers to specify their privacy settings. 

  1. Click and drag a Screen element onto the canvas and configure the element’s general settings.
  2. For Label, enter Communication Preferences. The API Name field is automatically populated based on this entry, and should be Communication_Preferences.
  3. Ask customers to specify their privacy settings.
    1. In the Screen Components pane, click Display Text.
    2. Click [Display Text] in the preview pane.
    3. Enter the following values in the fields on the properties pane.
Field Value

API Name

privacyPrompt

Text box

We value your privacy! Let us know if you’d like us to contact you, know about your location, or track your portal usage to improve performance.


  1. From the Screen Components pane, click Checkbox  three times to add three checkboxes to the preview panel.
  2. Click each [Checkbox] element in the preview pane and configure each field as follows:
Field Value API Name

Label

I don't want to be contacted

I_don_t_want_to_be_contacted

Label

I don't want you to track my usage

I_don_t_want_you_to_track_my_usage

Label

I don't want you to track my location

I_don_t_want_you_to_track_my_location
  1. Click Done.
  2. Click the node at the bottom of Get User Info and drag it to Communication Preferences.
  3. Click Save.

Remember that while Salesforce saves these preferences, it’s up to the company to enforce them on behalf of their customers. 

Now, let's save these preferences in a newly created Individual record, which is where Salesforce tracks privacy preferences.

  1. Click and drag a Create Records element onto the canvas.
  2. For Label, enter Create Individual. The API Name field is automatically populated based on this entry, and should be Create_Individual.
  3. How Many Records to Create: One
  4. How to Set the Record Fields: Use separate resources, and literal values
  5. Create a Record of This Object: Individual
    1. Add the following fields and values, and click Add Field after each entry:
Field Value

FirstName    

{!UserInfo.FirstName}

LastName    

{!UserInfo.LastName}

HasOptedOutGeoTracking

{!I_don_t_want_you_to_track_my_location}

HasOptedOutTracking

{!I_don_t_want_you_to_track_my_usage}

HasOptedOutSolicit    

{!I_don_t_want_to_be_contacted}

  1. Select the Manually assign variables checkbox.
  2. Store Individual ID in Variable {!individualId}.
  3. Click Done.
  4. Click the node at the bottom of Communication Preferences and drag it to Create Individual.
  5. Click Save.
Keep learning for
free!
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities