Matrix Object Template For E-Commerce Website

Use below matrix variables for your e-commerce shop within the window.fu_matrix object:

User

These object holds the current user of the website. It should be populated with either logged in user details or as guest user. If user is logged in, substitute variables value with appropriate user detail. For e.g. email. This object will presents on all pages.

Variable Name Description Sample Values
id Optional
- If user is logged in, specify their user id in this variable.
123
name *Required
- Specify user name if they logged in. Use guest for non logged in users
John Doe
email Optional
- If user is logged in, specify their user email in this variable.
johndoe@example.com

Example:

"user":{
    "id": 123,
    "name": "John Doe",
    "email": "[email protected]"
}

Page

These object describes the current page details and presents on all pages.

Variable Name Description Sample Values
name *Required
- Set your current page title in this variable.
Welcome To My Store
type *Required
- Describe your current page type for e.g. home, category, product, etc. in this variable
home
url *Required
- Set current page url in this variable.
https://my-store.com/

Example:

"page":{
    "name": "Welcome To My Store",
    "type": "home",
    "url": "https://my-store.com/"
}

Referral

Mentioned your referral values within this object.

Variable Name Description Attributes / Sample Values
host Optional
- Describe referral site host name.
www.example-referral.com
path Optional
- Specifies the path of referring source URL
https://my-store.com/shop/
search Optional
- Mentioned the search keyword used by users to reach your website.
mobile-accessories
utm Optional
- Describes your campaign UTM parameters inside these object.
Lists Of UTM Parameters
UTM Parameters

UTM parameters are simply tags which would be suffix to a URL for tracking purpose.

Variable Name Description Sample Values
medium Optional
- Specify campaign medium.
email
source Optional
- Describe campaign source
promo_email
campaign Optional
- Describe campaign name.
discount_promo

Example:

"referrer":{
    "host": "www.example-referral.com",
    "path": "https://my-store.com/shop/",
    "search": "mobile-accessories",
    "utm": {
        "medium": "email",
        "source": "promo_email",
        "campaign": "discount_promo"
    }
}

Category

These object will be present on your shop categories page and contains below variables:

Variable Name Description Sample Values
id *Required
- Specify your category id in this variable.
10
name *Required
- Describe category name in this variable
Accessories
listing Optional
- This object loads with category items, sorting / filtering data, and product counts.
Lists Of Available Variables
Listing

This object having below variables:

Variable Name Description Sample Values
search_term Optional
- If search filter applied on category, specify search string in this variable.
mobile case
items_count Optional
- Assign number of products count in this variable
30
sorting Optional
- This object having couple of variable to hold value of sorting field and direction.
"by": "price"
"direction": "desc"
items Optional
- Describe your category products within this object.
This object holds multiple products that are assign to present category page.
List Of Single Product Variables
Item Variables

Describes your products with below variable. Note that, you can add multiple item object of below variables within listing object.

Variable Name Description Sample Values
pid *Required
- Specify product id in this variable.
20
sku *Required
- Your product SKU
SKU20
name *Required
- Describe product name in this variable.
Charging Cable Cord For iPhone
stock Optional
- Mentioned product stock quantity.
50
currency Optional
- Store currency.
USD
unit_price Optional
- Product unit price (without discount or relevant offers).
5.00
final_price Optional
- Product final price (with discount or relevant offers).
5.00

Example:

"category": {
    // For Category Listing Page
    "id": 10,
    "name": "Accessories",
    "listing": {
        "search_term": "mobile case",
        "items_count": 30,
        "sorting": {
            "by": "price",
            "direction": "desc"
        },
        "items" : [
            {
               "pid": 20,
               "sku": 'SKU20',
               "name": "Charging Cable Cord For iPhone",
               "stock": 5,
               "currency": "USD",
               "unit_price": 5.00,
               "final_price": 5.00
            },
            {
               "pid": 21,
               "sku": 'SKU21',
               "name": "Product Name",
               "stock": 20,
               "currency": "USD",
               "unit_price": 10.50,
               "final_price": 10.50
            },
            { ..... },
            { ..... }
        ]
}

Product

These object should present on a product detail page, and describes a single product being viewed. Product object contains below variables:

Variable Name Description Sample Values
id *Required
- Specify product id in this variable.
20
sku *Required
- Your product SKU
SKU20
name *Required
- Describe product name in this variable.
Charging Cable Cord For iPhone
description Optional
- Product short description.
2-meter cable connects your iPhone, iPad, or
iPod with Lightning connector to your computer's USB port for syncing and charging.
cat_id Optional
- An array variable for product associated categories id.
[10,15,20]
stock Optional
- Mentioned product stock quantity.
50
currency Optional
- Store currency.
USD
unit_price Optional
- Product unit price (without discount or relevant offers).
5.00
final_price Optional
- Product final price (with discount or relevant offers).
5.00
attributes Optional
- Define your product attributes as key value pair within this object.
{
"color": ["blue","red","green"],
"size":["1m","2m"]
}
related_products Optional
- List related products items within this object.
This object holds multiple lists to define 1 or more related products.
List Of Related Product Variables
reviews Optional
- Describe product reviews within this object.
You can define 1 or more reviews.
List Of Product Review Variables
Variable Name Description Sample Values
pid *Required
- Specify product id in this variable.
20
sku *Required
- Your product SKU
SKU20
name *Required
- Describe product name in this variable.
Charging Cable Cord For iPhone
stock Optional
- Mentioned product stock quantity.
50
currency Optional
- Store currency.
USD
unit_price Optional
- Product unit price (without discount or relevant offers).
5.00
final_price Optional
- Product final price (with discount or relevant offers).
5.00
Product Review Variables
Variable Name Description Sample Values
comment *Required
- Describe product review comment in this variable.
Pretty Good
rating *Required
- Specify product review rating
4.5

Example:

"product": {
    // For Product Detail Page
    "id" : 22,
    "sku": "SKU22",
    "name": "Overear Headphones",
    "description": "Robust sound and aggressive noise cancellation.",
    "cat_id": [1,2,3],
    "stock": 50,
    "currency": "USD",
    "unit_price": 100.00,
    "final_price": 100.00,
    "attributes": {
        "size": ["S","M","L","XL"],
        "color": ["Blue", "Red", "Green"]
    },
    "related_products": [
        {
           "pid": 23,
           "sku": "SKU23",
           "name": "EarBuds",
           "stock": 25,
           "currency": "USD",
           "unit_price": 35.00,
           "final_price": 35.00
        },
        { ..... },
        { ..... }
    ],
    "reviews": [ 
        {"comment": "These are excellent trainers!", "rating": "5"},
        {"comment": "Pretty good", "rating": "4"} 
    ]
}

Shopping Cart

Describe users current shopping cart details in this object. Once user added 1 or more product into cart, make sure it should be populated on all pages except order confirmation page.

Variable Name Description Sample Values
quote_id *Required
- Specify shopping cart id in this variable
123456
items_qty *Required
- Describe total numbers of item quantity
4
currency *Required
- Store currency
USD
subtotal *Required
- Describe cart subtotal amount
150.00
tax_amount Optional
- Describe cart tax amount
5.00
shipping_method Optional
- Specify shipping method
UPS
shipping_amount Optional
- Describe shipping amount
10.5
coupon_code Optional
- Describe coupon code if applied on cart
10OFF
discount_amount Optional
- Describe discounted amount
10.00
grand_total *Required
- Describe cart grand total
155.5
created_on *Required
- Specify shopping cart creation date
2017-03-01 11:20:00
updated_on Optional
- Specify shopping cart update date
2017-03-01 12:15:00
cart_items *Required
- Describe shopping cart items within this object.
This object contains multiple products that are added to cart.
List Of Cart Item Variables
Cart Items Variables

To specify shopping cart items, used below variables and placed into shopping cart cart_items object.

Variable Name Description Sample Values
quote_item_id *Required
- Describe total numbers of item quantity
321
pid *Required
- Describe total numbers of item quantity
20
sku *Required
- Describe total numbers of item quantity
SKU20
name *Required
- Describe total numbers of item quantity
Charging Cable Cord For iPhone
currency *Required
- Store currency
USD
unit_price Optional
- Product unit price (without discount or relevant offers).
5.00
final_price Optional
- Product final price (with discount or relevant offers).
5.00
qty_added Optional
- Product final price (with discount or relevant offers).
2
row_total *Required
- Describe cart subtotal amount
10.00
tax_amount Optional
- Describe cart tax amount
0.00
discount_amount Optional
- Describe discounted amount
0.00
created_on *Required
- Specify shopping cart creation date
2017-03-01 11:20:00
updated_on Optional
- Specify shopping cart update date
2017-03-01 12:15:00

Example:

"cart": {
    // For Shopping Cart
    "quote_id": 123456,
    "items_qty": 4,
    "currency": "USD",
    "subtotal": 150.00,
    "tax_amount": 5.00,
    "shipping_method": 'UPS',
    "shipping_amount": 10.50,
    "coupon_code": '10OFF',
    "discount_amount": 10.00,
    "created_on": "2017-03-01 11:20:00",
    "updated_on": "2017-03-01 12:15:00",
    "grand_total": 155.5,
    "cart_items": [
        {
            "quote_item_id": 321,
            "pid": 20,
            "sku": "SKU20",
            "name": "Charging Cable Cord For iPhone",
            "currency": "USD",
            "unit_price": 5.00,
            "final_price": 5.00,
            "qty_added": 2,
            "row_total": 10.00,
            "discount_amount" : 0.00,
            "created_on": "2017-03-01 11:20:00",
            "updated_on": "2017-03-01 12:15:00",
        },
        { ..... },
        { ..... }
    ],
},

Order Confirmation

These variable should be present on the order success / confirmation page. It containing details of order transaction, billing/shipping, order items, etc.

Variable Name Description Sample Values
order_id *Required
- Describe order number in this variable
123456
items_qty *Required
- Describe total numbers of item quantity
4
currency *Required
- Store currency
USD
subtotal *Required
- Describe cart subtotal amount
150.00
tax_amount Optional
- Describe cart tax amount
5.00
shipping_method Optional
- Specify shipping method
UPS
shipping_amount Optional
- Describe shipping amount
10.5
payment_method Required
- Describe payment method
Credit Card
coupon_code Optional
- Describe coupon code if applied on cart
10OFF
discount_amount Optional
- Describe discounted amount
10.00
grand_total *Required
- Describe cart grand total
155.5
created_on *Required
- Specify shopping cart creation date
2017-03-01 11:20:00
updated_on Optional
- Specify shopping cart update date
2017-03-01 12:15:00
addresses *Required
- Mentioned order billing and shipping address details within this object.
List Of Order Address Variables
ordered_items *Required
- Describe ordered items within this object.
This object contains multiple products that are added to cart.
List Of Ordered Item Variables
Order Address Variables

You can defined order billing and shipping address using below variables:

Variable Name Description Sample Values
name *Required
- Describe billing or shipping buyer name in this variable
John Doe
address_1 *Required
- Describe billing or shipping address line
Lovelace Road
address_2 Optional
- Describe billing or shipping address line 2
963
city *Required
- Describe address city in this variable
Tampa Bay
region *Required
- Describe address region
FL or Florida
country *Required
- Describe address country fullname in this variable
United States
country_code *Required
- Describe country code in this variable
US
zipcode *Required
- Describe address zipcode in this variable
25235
Ordered Item Variables

To specify ordered items, used below variables and placed into ordered_items object.

Variable Name Description Sample Values
ordered_item_id *Required
- Describe total numbers of item quantity
321
pid *Required
- Describe total numbers of item quantity
20
sku *Required
- Describe total numbers of item quantity
SKU20
name *Required
- Describe total numbers of item quantity
Charging Cable Cord For iPhone
currency *Required
- Store currency
USD
unit_price *Required
- Product unit price (without discount or relevant offers).
5.00
final_price *Required
- Product final price (with discount or relevant offers).
5.00
order_qty *Required
- Product final price (with discount or relevant offers).
2
row_total *Required
- Describe cart subtotal amount
10.00
tax_amount Optional
- Describe cart tax amount
0.00
discount_amount Optional
- Describe discounted amount
0.00
created_on *Required
- Specify shopping cart creation date
2017-03-01 11:20:00
updated_on Optional
- Specify shopping cart update date
2017-03-01 12:15:00

Example:

"order_success": {
    // For Order Success Page
    "order_id" : "123456",
    "items_qty": 4,
    "currency": "USD",
    "subtotal": 150.00,
    "tax_amount": 5.00,
    "shipping_method": "UPS",
    "shipping_amount": 10.50,
    "payment_method": "Credit Card",
    "coupon_code": '10OFF',
    "discount_amount": 10.00,
    "grand_total": 155.50,
    "created_on": "2017-03-01 11:20:00",
    "updated_on": "2017-03-01 12:10:00",
    "addresses": {
        "billing": {
            "name": "John Doe",
            "address_1": "Lovelace Road",
            "address_2": "963",
            "city": "Tampa Bay",
            "region": "FL",
            "country": "United States",
            "country_code": "US",
            "zipcode": "25235"  
        },
        "shipping": {
            "name": "John Doe",
            "address_1": "Lovelace Road",
            "address_2": "963",
            "city": "Tampa Bay",
            "region": "FL",
            "country": "United States",
            "country_code": "US",
            "zipcode": "25235"
        }
    },
    "ordered_items": [
        {
            "ordered_item_id" : 321,
            "pid": 20,
            "sku": "SKU20",
            "name": "Charging Cable Cord For iPhone",
            "currency": "USD",
            "unit_price": 5.00,
            "final_price": 5.00,
            "order_qty" : 2,
            "row_total" : 10.00,
            "tax_amount" : 0.00,
            "discount_amount" : 0.00,
            "created_on": "2017-03-01 11:20:00",
            "updated_on": "2017-03-01 11:20:00",
        },
        { ..... },
        { ..... }
  ]
}

We design this template with best of our knowledge, if you still wants to customized this template, kindly contact to Frontuser Support.

Attention

Make sure you placed above mentioned variables to its appropriate page.