Purchasable Fields

Overview


Purchasable Fields are a configuration on Products and Learning Components which allows an administrator to configure the list of fields to display to the customer side when they are adding an item to their shopping cart, it can be arbitrarily used to capture information from the customer such as comments or used as part of the process to determine the price (e.g. having a dropdown to specify if they are buying the standard edition or the deluxe edition), you can see a list of the possible Field Types below:

Field Types

Select Field

Select fields shows a dropdown input field to the customer, making them restrictive in terms of what responses the customer can provide. As the responses are restricted, it can be used in conjunction with Purchasable Rules to allow adjustments to the purchase price based on their input (for example, the standard price is $100 but if they choose the deluxe edition, the price becomes $150). In addition to this, a Pricing Table is provided on the administration screen and product screen, which lists out every product option available (configured through purchasable rules), along with the price charged for each of them.

Text Field

Text fields show a standard text input box to the customer.

Configuration

When editing a Product you should see "Fields Configuration" under the "Purchase" section:

  • Navigate to Catalog > Products
  • Click on the New button. Or, edit one of the previously created products. For illustration purposes, we created a new product called "Purchasable Items"

You'll see some Purchasable Items with a default configuration - you're free to add new fields but try not to remove the already existing ones since they might be important for the application to run correctly. The content of this field is a JSON array - if you don't feel comfortable editing this configuration and need help feel free to contact Support.

A field is defined by the following JSON object:

{
  "displayName" : "Referred by",
  "name" : "referredBy",
  "@type": "text"
}

There are a couple more properties you can include (requiredvalidator) but the previous example shows the minimal required setup.

Adding a new Field

To add a new field you need to insert its definition in the corresponding place inside the array.

Remove a Field

To remove a field you need to delete its definition from the array - be careful with this and make sure there is no syntax error after your changes.

Example

Lets say we want to add a new "Referred by" field to a Product order:

[{
  "displayName" : "First Name",
  "name" : "firstName",
  "@type": "text"
}, {
  "displayName" : "Last Name",
  "name" : "lastName",
  "@type": "text"
}, {
  "displayName" : "Email",
  "name" : "email",
  "required" : true,
  "validator" : "email",
  "@type": "text"
}, {
  "displayName" : "Organization",
  "name" : "organization",
  "@type": "text"
}, {
  "displayName" : "Referred by",
  "name" : "referredBy",
  "@type": "text"
}]

After this is saved, when a user tries to add it to its cart he'll see:


Once the customer makes the purchase , you'll be able to see this information through the Admin Dashboard:

  • Just go the Catalog > Products 
  • Click the View icon of the product used for the purchase  
  • Scroll down to see the Order Lines and click on the one you want:

  • You will see a table of your configured purchasable fields and their values


Examples

Different Product pricing and evaluation licenses:

Field Configuration:

 Click here to expand...

[{
"@type":"select",
"name":"users",
"displayName":"Number of Users",
"options":{
"1":"1 User",
"10":"10 Users",
"25":"25 Users",
"50":"50 Users",
"100":"100 Users"
}
},{
"@type":"select",
"name":"type",
"displayName":"Type",
"options":{
"evaluation":"Evaluation",
"production":"Production"
}
}]

 Click here to expand...

[{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"type":"evaluation"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "0",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"-1"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"30 day"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"users":"10",
"type":"production"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "10",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"10"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"users":"25",
"type":"production"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "400",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"25"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"users":"50",
"type":"production"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "800",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"50"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"users":"100",
"type":"production"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "1100",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"100"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"users":"500",
"type":"production"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "2000",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"500"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"users":"2000",
"type":"production"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "4000",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"2000"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"users":"Unlimited",
"type":"production"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "6000",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"-1"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"users":"10",
"type":"renewal"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "10",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
},{
"@type":"setOption",
"key":"_license.maxTimePeriod",
"value":"3 year"
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"10"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"users":"25",
"type":"renewal"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "200",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
},{
"@type":"setOption",
"key":"_license.maxTimePeriod",
"value":"3 year"
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"25"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"users":"50",
"type":"renewal"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "400",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
},{
"@type":"setOption",
"key":"_license.maxTimePeriod",
"value":"3 year"
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"50"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"users":"100",
"type":"renewal"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "550",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
},{
"@type":"setOption",
"key":"_license.maxTimePeriod",
"value":"3 year"
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"100"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"users":"500",
"type":"renewal"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "1000",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
},{
"@type":"setOption",
"key":"_license.maxTimePeriod",
"value":"3 year"
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"500"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"users":"2000",
"type":"renewal"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "2000",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
},{
"@type":"setOption",
"key":"_license.maxTimePeriod",
"value":"3 year"
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"2000"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"users":"Unlimited",
"type":"renewal"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "3000",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
},{
"@type":"setOption",
"key":"_license.maxTimePeriod",
"value":"3 year"
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"-1"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"10",
"users":"25",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "395",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"25"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"10",
"users":"50",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "795",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"50"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"10",
"users":"100",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "1095",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"100"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"10",
"users":"500",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "1995",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"500"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"10",
"users":"2000",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "3995",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"2000"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"10",
"users":"Unlimited",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "5995",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"-1"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"25",
"users":"50",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "600",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"50"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"25",
"users":"100",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "900",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"100"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"25",
"users":"500",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "1800",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"500"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"25",
"users":"2000",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "3800",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"2000"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"25",
"users":"Unlimited",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "5800",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"-1"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"50",
"users":"100",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "700",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"100"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"50",
"users":"500",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "1600",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"500"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"50",
"users":"2000",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "3600",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"2000"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"50",
"users":"Unlimited",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "5600",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"-1"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"100",
"users":"500",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "1450",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"500"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"100",
"users":"2000",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "3450",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"2000"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"100",
"users":"Unlimited",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "5450",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"-1"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"500",
"users":"2000",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "3000",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"2000"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"500",
"users":"Unlimited",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "5000",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"-1"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
},
{
"restriction": {
"@type": "optionsMatch",
"conditions": {
"oldusers":"2000",
"users":"Unlimited",
"type":"upgrade"
}
},
"operations": [{
"@type": "setPrice",
"amount": {
"amount": "4000",
"currency": "USD"
}
},{
"@type":"setOption",
"key":"_license.maxUserCount",
"value":"-1"
},{
"@type":"setOption",
"key":"_license.timePeriod",
"value":"1 year"
}]
}
]