Chapter 9. Marketing - Customer Tags and Expressions

Table of Contents

What are Customer Tags?
What are Expressions?
Tutorial for creating an expression using the standard customer tags
How to set Customer Tag Values in Java code

The Enterprise version of KonaKart contains sophisticated marketing functionality that allows you to capture customer data as the customer uses your KonaKart eCommerce store; and to use that data within complex expressions in order to show dynamic content, activate promotions and send eMail communications.

What are Customer Tags?

A customer tag is an entity that can be associated with a customer (guest or logged in) and given a value for that customer. The best way of understanding what this really means is to look at the tags included in the standard KonaKart installation.

  • PRODUCTS_VIEWED - A list of the most recently viewed products
  • CATEGORIES_VIEWED - A list of the most recently viewed categories
  • MANUFACTURERS_VIEWED - A list of the most recently viewed manufacturers
  • PRODUCTS_IN_CART - A list of products in the shopping cart
  • PRODUCTS_IN_WISHLIST - A list of products in the wish list
  • SEARCH_STRING - The search string of the last product search made by the customer
  • COUNTRY_CODE - The code of the customer's country
  • CART_TOTAL - The currency total of the shopping cart
  • WISHLIST_TOTAL - The currency total of the wish list
  • BIRTH_DATE - When the customer was born
  • IS_MALE - The sex of the customer
  • PROD_PAGE_SIZE - The number of products shown on a page in list view
  • ORDER_PAGE_SIZE - The number of orders shown on a page in list view
  • REVIEW_PAGE_SIZE - The number of reviews shown on a page in list view

They tend to be used to keep track of a customer's actions in the store-front application (i.e. what products have been looked at, what products are in the wish list, what the customer has searched for etc.) and to store information about the customer such as whether he is male or female and what country he lives in. New customer tags can easily be added to store whatever information is important for your business requirements. If you create a new tag, for example, to keep track of how many orders the customer has placed in the last 6 months, then you also need to create a way of populating the tag value for each customer. In this example you could use a scheduled batch job that runs once a day.

Tags have a name, a description (used in the expression builder) and a type which can be:

  • STRING_TYPE - The tag value is in the format of a String. i.e. To store the country from which the store is being accessed.
  • INT_TYPE - The tag type is in the format of an int. i.e. To save the product id of the last product viewed by the customer.
  • MULTI_INT_TYPE - The tag type allows the tag to store an array of ints. When this type is selected, the Max Number of Ints attribute determines the maximum number of ints in the array. i.e. To store the ids of the last 5 products viewed by the customer.
  • DECIMAL_TYPE - The tag type is in the format of a decimal. i.e. To store the value of all items in the basket.
  • DATE_TYPE - The tag type is in the format of a date. i.e. To store the date of the last login for the customer.
  • BOOLEAN_TYPE - The tag type is in the format of a boolean. i.e. To store the customer gender. The tag could be named IS_MALE and take values of true or false.