Promotional Code

The Promotional Code asset allows customers to receive discounts on items when entering store promotional codes. These discounts are rule based, determined by either Fixed Amount or Percentage promotional rules.

Bookmarks to the headings on this page:

  1. Details Screen
  2. Setting Up the Promotional Code

Details Screen

The Details screen allows you to set up the Promotional Code asset. For more information about the StatusFuture Status and Thumbnail sections, refer to the Details Screen chapter in the Asset Screens manual.

Details

The section allows you to configure the promotional code and the assets it is applied to. The Details section of the Details screen is shown in the figure below.

Details section of the Details screen
The Details section of the Details screen

The fields available are as follows:

  • Name: enter a name for the Promotional Code. By default, this will be the name that was entered when the asset was first created.
  • Promotional Code: enter a code to use for the Promotional Code asset. This will be the code customers must enter to receive a discount. This code is case-sensitive and can include special characters (e.g. $, % or @).  
  • Applied Assets: select the assets to apply the Promotional Code to. You can select multiple assets by clicking on the More... button.

    Tip: To allow Promotional Codes to be used on items, enable the Accept Promotional Code option on the Details screen of the Product asset. For more information, refer to the Product chapter in this manual.

Promotional Rules

This section allows you to configure rules to define the Promotional Code discount. The Promotional Rules section of the Details screen is shown in the figure below.

The Promotional Rules section of the Details screen
The Promotional Rules section of the Details screen

Quantity Promotional Rule

The Quantity Promotional Rule allows you to define the discount of the Promotional Code, determined by the number of items that are being purchased.  

The fields available for this rule are as follows:

  • Discount Type: select the type of discount that will be applied when customers enter the correct promotional code. The Discount Type selected will determine how Squiz Matrix interprets the value entered into the Discount Amount field. The discount types available are:
    • Fixed Amount: a specified monetary amount. For example, a $10.00 discount.
    • Percentage: a discount amount specified as a percentage of the price. For example, a 10% discount.
  • New Discount Option: specify the amount discounted on an item quantity. For example, you can configure a Discount Option so that when a customer buys 2 items they will get a 5 dollar discount.
    • Asset Quantity: the number of purchased items required for the discount.
    • Discount Amount: the discount amount granted. This value will be interpreted as either a monetary amount or a percentage, depending on the Discount Type specified.
    The Promotional Code asset calculates the Discount Options under the premise that the more assets purchased, the greater the discount. For example, if you have created Discount Options to provide customers with a $5 discount for 2 items purchased, $9 for 3, and $50 for 10. If a customer buys 14 items, their discount will be calculated as $50 (discount for 10 items purchased) + $9 (discount for 3 items purchased). This discount is not calculated as $50 + $5 (discount for 2 items purchased) + $5 (discount for 2 items purchased) as the Discount Option for the larger number of assets is calculated first.
  • Discount Options: this field lists the Discount Options that have been configured for the promotional code asset, as shown in the figure below.

    A set of Discount Options
    Discount Options

    To delete a Discount Option, select the Delete? field for the corresponding option and click Commit.

Setting Up the Promotional Code

When creating an e-commerce system using an Ecommerce Form Page, Promotional Codes must be linked to the form using the variables specified in the Asset Purchase section of the Ecommerce Form Contents Details screen. In the following examples, the Asset Promotional Code Request is set to promo_code and the Probability Source is set to %asset_attribute_accept_promotional_code%, as shown in the figure below.

Variables set on the Details screen of a Product
Variables set on the Details screen of a Product

Products can be sent as POST requests to the Ecommerce Form Page, with the promotional code entered either before or after the product is added to the form.

Tip: You will also need to configure the Asset ID and Asset Quantity Request Variables as well as the Price and Multiplicity Sources of the Ecommerce Form Page. For more information, refer to the Ecommerce Form Page and Product chapters in this manual.

Entering the Promotional Code Before Adding the Product to the Form

In this example, we have an Ecommerce Form Page with item selection fields and a Promotional Code input field. This allows users to enter a promotional code at the time of selecting the items they wish to purchase.

The code shown in the figure below is used on the Form Bodycopy of the Ecommerce Form Page.

The WYSIWYG Editor on the Ecommerce Form Page
The WYSIWYG Editor on an Ecommerce Form Page

The asset IDs and names of the products have been added to the code, as highlighted in the image above. The Asset Promotional Code Request Variable has also been used in the code, highlighted in red.

In the example below, the user has selected to purchase two Waffles and has entered a 50% off promotional code. When this user clicks the Buy button, the page will be updated with the total cost of their order and the discount they are receiving.

The Promotional Code input field on the Ecommerce Form Page
The Promotional Code input field on the Ecommerce Form Page

The user can then click the Submit button to proceed to checkout.

Entering the Promotional Code After Adding the Product to the Form

In this example, we have a products page with item selection fields, linking to an Ecommerce Form Page. This form page contains a Promotional Code input field, allowing users to enter a promotional code to append to their order.

The code shown in the figure below is used on the Page Contents Bodycopy of a Standard Page.

The WYSIYG Editor on the Page Contents Bodycopy of the Products Page
The WYSIWYG Editor on the Products Page

The asset ID of the Ecommerce Form Page and the asset IDs and names of the available products have been added to the code.

Before configuring the Ecommerce Form Page, we need to create a new Trigger to create session variables for use on the form. To do this, create a new Trigger with the following configuration:

  • Event: Asset Accessed
  • Condition: Asset ID. This is the ID of the Ecommerce Form Page.
  • Condition: Request Method. Select the POST HTTP Request Method.
  • Actions: Set Session Var Trigger Action. Set the session variable name to add_to_cart and create a new Value parameter with the POST Variable Name add_to_cart.
  • Actions: Set Session Var Trigger Action. Set the session variable name to add_quantity and create a new Value parameter with the POST Variable Name add_quantity.

Once you have configured and enabled the Trigger, you can set up the Ecommerce Form Page. The code shown in the figure below is used on the Form Bodycopy of the form.

The WYSIWYG Editor on the Ecommerce Form Page
The WYSIWYG Editor on the Ecommerce Form Page

The add_to_cart and add_quantity session variables have been added to the code, as highlighted in the figure above. The Asset Promotional Code Request Variable has also been added, highlighted in red.

Tip: You can change the hidden session variable fields to text fields to check that the correct asset ID and quantity amounts are passed to the Ecommerce Form Page.

In the example below, the user has selected to purchase two Waffles on the products page. When this user clicks the Buy button, they will be taken to the Ecommerce Form Page, where they can input a promotional code.

The Products Page
The Products page linking to an Ecommerce Form Page

Entering a Promotional Code on the Ecommerce Form Page
Entering a Promotional Code on the Ecommerce Form Page

PreviousNext