Shannon Gray
Jul 11, 2012
(5 votes)

Extending EPiCommerce Tiered Pricing or What's your VisitorGroup Price For That SKU?

This is part 1 of 3 blog posts created to give you some background on how tiered pricing works in EPiCommerce and how you can extend it to do cool things like have pricing for visitor groups or other pricing scenarios you need to handle.

When you've used or demo'd the tiered pricing, you probably have used the dropdown for Sale Type and wondered "But how do I set pricing for customers in visitor groups or customers associated with organizations, or with a particular customer attribute other than price group?". Or perhaps you've thought "But what if I want to cover the [fill in your custom pricing scenario]?"

The built-in pricing provider can be easily extended to cover these scenarios and still be editable in Commerce Manager. When tiered pricing is extended, you can make new options available in Commerce Manager to allow site administrators to easily create a tiered price on a stock keeping unit (SKU) that's more specific to their custom scenarios. Before we cover how to do that, it helps to better understand how tiered pricing works.

The Technical Background on Tiered Pricing
From the Commerce Manager view, when you're editing tiered pricing in Commerce Manager, you're editing the rows of data in the SalePrice database table that are associated with a SKU, package, or bundle. From the API view, those tiered pricing rows are available from an Entry object as an array of SalePrice objects or as rows in the SalePrice datatable in the CatalogEntryDto. You probably won't use those objects representing sale prices unless your doing a custom import of catalog data. But you use them indirectly whenever you call StoreHelper.GetSalePrice() or StoreHelper.GetDiscountPrice(). The GetSalePrice() method (which is called inside GetDiscountPrice()) is essentially the built-in pricing engine. It parses through the list price (aka display price) for an Entry and its associated SalePrice rows to find the lowest applicable price for a SKU given the customer (if they’re logged in), date, quantity being purchased, and customer target information.

What is customer target information? This is information used to segment customers defined by the sale type and sale code. In the SalePrice datatable, these are the SaleType and SaleCode fields. The built-in segmentation are : Customer and Customer Price Group. Customer allows you to specify the username of a customer to provide a specific price for a SKU - mostly useful in B2B-type scenarios. The Customer Price Group is an attribute of the CustomerContact object that is configurable with the properties of users in the Customer subsystem; its marked as Customer Group when you're viewing/editing a customer in Commerce Manager. This allows you to specify the price of a SKU for customers which have the same price group specified. The default customer target is All Customers, which makes no distinctions based on customer target information (whether logged in or not).

So where are these customer targets defined? They are defined in the Configs/ecf.catalog.config file, in the SalePriceTypes section. This means you can add your own sale types. But if you add your own sale types, how are those used by the system to map pricing to a customer? And what are examples that demonstrate the power of this capability?

This is covered in parts 2 and 3, respectively…

Jul 11, 2012


Please login to comment.
Latest blogs
Optimizely SendGrid SMTP host is deprecated

SendGrid is a services for sending email that is included in Optimizely DXP. Previously was the recommended SMTP server to use,...

Tomas Hensrud Gulla | Dec 4, 2022 | Syndicated blog

Hosting Optimizely CMS 12 on Docker Engine

Since Optimizely CMS can now be deployed as a Docker container, here is a demonstration of building, running and scaling an Optimizely CMS 12 site ...

Stefan Holm Olsen | Dec 4, 2022 | Syndicated blog

How to use CacheTagHelper with content areas in Optimizely CMS 12

I might be going out on a limb here - if you have a better solution, feel very free to share it!  Upgrading your Optimizely web application from .N...

Andreas J | Dec 2, 2022

The 1001st Piece in your 1000 Piece Puzzle: .NET Default Interface Functions

I was recently working with a client who wanted a reasonably large subsystem added to Optimizely that would add automated management to their...

Greg J | Nov 28, 2022 | Syndicated blog

Video Demonstration, creating a CMS12 Alloy Sample Site

Hey All Below you will find a quick video demonstration on how to install a local version of Alloy Sample based on CMS12 / .Net 6. As you will see ...

Minesh Shah (Netcel) | Nov 28, 2022

How to create an admin user I Optimizely CMS – with Episerver CLI

In this blog post I’ll show how to create an admin user for Optimizely CMS in a new environment where you don’t have access to the admin interface.

Ove Lartelius | Nov 28, 2022 | Syndicated blog