You can pass values through the URL to the Checkout, to pre-select specific Subscription Plans, and Options when the Checkout loads.
This is super simple to setup, even though it may sound complex. We’ll guide you step-by-step.
This functionality is based on Options storing a value into a Custom Field on the Spiffy Checkout.
To select an Option with a URL parameter, we will simply pass the desired value to that custom field, and that will auto-select the desired option.
To auto-select an option, you will need an Option Value, and a Field ID for a Custom Order Field where the Option Value can be stored. We will need to adjust some checkout settings on your options to map Options on your checkout to store Option Values into that Custom Field.
In the URL above:
- The Field ID for the custom field we are using to store the Option Value is plan_name
- The Option Value for the option we want to be selected is monthly
After following the instructions below to prep your Checkout, we can add ?plan_name=monthly at the end of the Checkout URL to auto-select a specific option or subscription plan with a URL parameter.
Note: Currently, it’s NOT possible to select Payment Plans with URL parameters. If this would be a feature that is useful for you, please reach out to us at support@spiffy.co and let us know.
Here are the major steps:
- Create a Custom Order Field
- Add Options to a Checkout
- Set your Options block to map to the Custom Order Field you created.
Note: For subscription options, you will also need to set a value for each subscription option in the subscription option settings. - Publish your Checkout
- Test URL Parameters on Checkout
Below we will break down each step.
Create a Custom Order Field
- In the left navigation menu, click on Fields
- Click Create New Field at the top right of the Fields page
- Make sure Order Field is selected. We want this value tied to an Order Record
- Enter the Field Name
- Edit the Field ID (optional)
- Click Save
Add Options or Subscriptions to a Checkout
Add any type of Options to your Checkout.
Learn more about adding Options.
Or, add Subscriptions to your Checkout.
Learn more about adding Subscriptions.
Map Options to a Custom Field
We want to take a couple of steps to make sure that when a checkout Option or subscription is selected, it stores a specific value in that custom field. This is important because the custom field value is what controls what option is selected. When we pass values through the URL, we fill the custom field with the value that matches the value for an option, and we can control what option is selected.
At the top of your Options Settings sidebar, you will see a blue button labeled Save selections to a field.
- Open your Options settings sidebar.
- Click Save Selections to a field
- Click in the dropdown field, and Select the Custom Field we created to store the option value
- Find OR set your FieldValues for each option.
- a) Setting up Options?
FieldValues are auto-generated for Options, but can be edited.
See the first screenshot below. Under each Option label, you will see the Field Value for each option in smaller gray text. The auto-generated Field Value will be very similar to the Option Label.
- Eg.
Option Label = General Admission
Option Field Value = general-admission
Option Label = VIP
Option Field Value = vip
- Eg.
- b) Setting up Subscriptions?
You must create Field Values for each subscription plan on each checkout.
See the second screenshot below. Under the settings for each Subscription Option, you will see a text input for Field Value. This is where you can set the Field Value for your Subscription Options.
- Eg.
Subscription Option Label = Monthly
Subscription Option Field Value = monthly (editable)
- Eg.
- a) Setting up Options?
- Be sure to Save your Option settings. Click Save at the top right of the sidebar.
- Publish your changes to your Checkout
Test Your URL Parameters
Now, give your setup a test!
Append your Checkout URL with ? then your Field ID equals your Option Field Value as parameters.
?Field_ID=Option-Field-Value
You will add this to the end of your Spiffy Checkout URL
example
Custom Field ID = experience
Option Field Value = general-admission
Add this to the end of your Checkout URL.
?experience=general-admission
Your URL should look something like this:
https://yourcompanyname.spiffy.co/checkout/your-checkout-slug?Field_ID=Option-Field-Value