FREE TRAINING: Join us for Open Office Hours every Tuesday at 3 pm ET or for our weekly training webinars. View Schedule >>

Creating user-defined session variables for passing values through a URL to Soapbox

created

With Soapbox, you have the ability to create user-defined session variables for passing values through a URL to Soapbox. These variables can in turn be used to populate default values for form fields across the Soapbox apps.

What are session variables?

A session variable is a way that a given value can be stored and associated with a given visitor so it is available as they navigate around a website across multiple pages.

What are user-defined session variables?

User-defined session variables are specific text strings that you can create to track specific bits of information as part of a visitor's session.

Are there standard session variables that Soapbox uses?

Yep! UTM codes that are used for Google Analytics tracking of utm_campaign, utm_source, and utm_medium are standard session variables. Additional, session variables are populated for a given web user when they login to a site that has our portals feature enabled.

How are values for user-defined session variables defined for users?

The value of a user-defined variable is set by using URL parameters which follow a ? in the URL string and include the variable name, an equals sign, and the variable value like this:

https://support.myorg.org/donate?mysessionvariable=myvalue

Multiple URL parameters can be included in a URL by using an ampersand like this:

https://support.myorg.org/donate?mysessionvariable=myvalue&anothersessionvariable=myothervalue

How are user-defined session variables created for your site?

User-defined session variables can be added to your site by submitting a ticket with Support. Just let us know the specific string you wish to use for your session variable.

How are user-defined session variables used as default values for form fields?

Any user-defined session variable that has been created for your site can can used as the Default Value for form fields across our apps. When using the session variable as a default, you need to enclose it in curly brackets and prepend udsv_ to the variable name like this:

{$udsv_mysessionvariable}

In what apps can user-defined session variables be used as Default Values?

User-defined session variables can be used in the following areas of these apps:

  • Donations app
    • Custom Salesforce fields in the Contact Information section of the form
  • Events app
    • Custom Salesforce fields in the Contact Information section of the individual event registration form
    • Custom Salesforce fields on the Attendee Information form
    • Custom Salesforce fields in the Contact Information section of the shopping cart checkout form
    • Event-level custom Salesforce fields when the Enhanced Shopping Cart is enabled
  • Forms app
    • Custom Salesforce fields on a Form
    • Custom Salesforce fields on a Form when used in edit mode
  • Petitions app
    • Custom Salesforce fields on the petition form
  • Shop app
    • Custom Salesforce fields for a Product
    • Custom Salesforce fields for the standard fields on the shopping cart checkout form
    • Custom Salesforce fields for the Contact Information section of the shopping cart checkout form

The following apps do not currently support user-defined custom variables: Actions and Directories.

What is a use case for user-defined variables?

I am a membership organization. I am sending a mass email to my entire member list to encourage them to take an action on my Soapbox Engage site. As part of the form for that action, I want to capture their Member Id and auto-populate it for each member so they don't have to enter it themselves.

In my mass email, I use a merge field for the Member Id that populates it as part of the action URL like this:

https://support.myorg.org/show-your-support?mid=1234

On the form, I include a custom field with the following Default Value:

{$udsv_mid}

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