How do I pass a value into the order process, and then get it at the end?

Overview

SpringBoard uses a specific variable, called custom referrer, when you want to be able to pass data (such as a custom variable) from your website into an order and then retrieve that data at the end of the order. This data can be used to generate License Fulfillments or included in any type of Notification.  One common situation that requires this custom variable is when your customers want to upgrade their products. If customers are trying to upgrade through your software application installed on their computer, you may want to know the customers' current license code, and use it to create a new license code. If customers are trying to upgrade their Subscription product, you may want to know the customers' username, so the update gets linked to it. This could also be used to pass a previously chosen username into the order process as a custom parameter.

Using the Custom Referrer on Links

If you use an HTML link to go from your website to your FastSpring store, add the custom referrer to the end of the link, as follows:

URL?referrer=username

If there is already a question mark in the URL, then add the custom referrer to the end of the link, as follows:

&referrer=username

If you link to your FastSpring store with a method that utilizes a <form> element, you will send:

<input name="referrer" value="username" />

Notifications and HTTP POST

The referrer information will be returned as part of our standard Email Notification.  To add it also to a remote HTTP POST Order Completed or Order Completed (one per product) Notification, go the SpringBoard's Store Home » Notify. Use the template variable below.

#{order.referrer}

For notifications on Subscription products, use the template variable below. 

#{subscription.referrer}

Note: Referrer can only hold a single string value. You can, however, pass more than one value into the order process, and then retrieve it later, by including both values in the same string, separated by some sort of special character, such as an asterisk. When you get the string back on your end, you will need to parse the values apart at that special character. All values passed within a URL should be URL encoded. An encoder utility can be found here. PHP functions for URL encoding are urlencode and urldecode.

License Fulfillments

The custom referrer variable is also passed in remote License Fulfillments as referrer. This can be useful if you require an activation key for your products that retrieves a posted serial number and updates your database. In order to achieve this, you need to set up a survey field. During the process, in the Add Form Field section, enter in custom_referrer as the Name, which is not visible to customers. This will set whatever information is filled in to our internal variable referrer, which can be passed as part of what is POSTed in the license fulfillment as referrer. 

We're Here to Help

If you need assistance with passing a value into the order process, please open a support ticket

Have more questions? Submit a request

Comments

Powered by Zendesk