Developer Documentation

Enticify Runtime FAQ

Questions and answers relating to the Enticify Runtime.

Which CS discounts does Enticify convert?

We use this search clause to get the set of discounts to convert:

var startClause = searchClauseFactory.CreateClause(ExplicitComparisonOperator.OnOrBefore, "StartDate", DateTime.UtcNow.AddDays(7));
var endClause = searchClauseFactory.CreateClause(ExplicitComparisonOperator.OnOrAfter, "EndDate", DateTime.UtcNow.AddMonths(-1));

How did we arrive at this you ask? Well, it's the same as the CS runtime discount SQL query (i.e. we remain compatible).

How do Fixed Price Discounts work with Discount Application Records?

If you use fixed price discounts, they will be recorded as Currency in the discount record (as CS does not have fixed price in the enumeration).

Does Enticify have a coupon/promo code system?

No, we support the existing CS promo code system. The ReservePromoCodes pipeline component handles the promo/coupon code validation. It also scores and writes the discounts in the _discounts. We filter our runtime discounts accordingly

What happens if an Exception is raised during CS discount conversion?

In order to preserve site integrity, Enticify will swallow conversion exceptions and exclude the discount in question from the site. This means the site can continue to run, but the discount will not be active.

How do I configure the default discount price ordering?

Set EnticifyRunConfiguration.DefaultDiscountApplicationBasketItemSort to the BasketItemSort you require.

How do I exclude basket line items from receiving order subtotal discounts?

Important: This feature does not exclude items from getting shipping discounts.

By default, order subtotal discounts are pro-rated across all items in the basket. If you wish to exclude items from receiving order discounts, do the following:

  1. Set the line item property _enticify_eligible_for_order_discount_award to false

Order discounts will be applied in the following situations:

  • The property is not present.
  • The property is present and true.

I think Enticify is doing something I don't like to the OrderForm. How do I check?

Use DumpOrder.vbs to see exactly what Enticify has done to your OrderForm. DumpOrder.vbs is a script included with the Commerce Server installation. Use it to log the OrderForm before and after the Enticify promotion engine components.

Do the following (in development only!):

  • Copy the contents of C:\%PROGRAMFILES(x86)%\Microsoft Commerce Server 2007\Sdk\Samples\DumpOrder.vbs
  • Open the PCF file containing Enticify (e.g. basket.pcf).
  • Insert a Commerce Scriptor component before Enticify :: Promotion Engine.
  • Set the script and configure for a log name like OrderFormBeforeEnticify.log. Read How to Display the Contents of an OrderForm for detailed instructions.
  • Insert a Commerce Scriptor component after Enticify :: Ensure Required Discount Line Properties Set.
  • Set the script and configure for a log name like OrderFormAfterEnticify.log. Read How to Display the Contents of an OrderForm for detailed instructions.
  • Save the PCF file and reset your application.
  • Run the pipeline you are interested in and diff the logs.

I've used AwardHighToLow but the most expensive item is not being discounted...

This can happen if any of the following are true:

  • The most expensive item does not match the award expression.
  • The most expensive item has been used as a condition in the same promotion application AND Buy items cannot be included as the award is checked.
  • The item has been used in a previous application of another promotion.

Condition items are always picked in price descending order. This is how Commerce Server behaves and Enticify has copied this for compatibility. Award items are picked in price descending OR price ascending order depending on your default setting and the AwardLowToHigh, AwardHighToLow convention usage. If your discount condition and award expression are the same AND you have Buy items cannot be included as the award checked, this can mean that most expensive item does not get the discount.

Example:

Buy 1 book, get 1 book 100% off (with buy items cannot be included in award checked).

For this discount, Enticify and CS do the following:

  • Order condition items by price descending.
  • Pick the most expensive book as the condition.
  • Order award items by price descending.
  • Pick the most expensive available book as award. This is the next most expensive after the condition book, as condition items cannot be reused as award items.
  • Result? The second most expensive book gets the discount.

How can I get round this? - In this case, you can set the Buy (product) to have a Minimum Quantity of 2 AND uncheck the Buy items cannot be included as the award checkbox.

Why don't my shipments contain any shipping discount application records?

Enticify puts the shipping discount application records on each relevant line item and on the order form itself. This is a little different to Commerce Server, which puts the records on the shipments. The details are as follows:

We put shipping discount application records in the LineItem.OrderLevelDiscountsApplied and also on the OrderForm in the key orderlevel_discounts_applied. The former contains the records for the given line item and the latter is a collection that relates to the entire order form. These collections contain shipping, item and order subtotal discount records.

How can I tell which ones are shipping discounts? We provide an addition key value pair on the discount application record. The key is discount_target and the possible values are OrderSubTotal, Shipping and Item. This means you can filter the records by type.