Developer Documentation

Enticify Pipeline Output

The Enticify pipeline components output data structures to the order form object, just like Commerce Server. It also outputs additional structures that Commerce Server does not have.

Discount Application Records

Enticify creates discount application records with the same structure and type as Commerce Server. We also have the following additions:

Discount Target

Enticify sets the discount application record property discount_target to one of the following values:

  • Item
  • Shipping
  • OrderSubTotal

The value depends on target of the discount to which the record applies.

Shipping Discount Information

The Enticify :: Promotion Engine pipeline component does the following:

  • Sets _cy_shipping_total on each OrderForm shipment. This is done whenever there are shipments present, regardless of whether discounts where applied or not.

It DOES NOT do the following:

  • Set _cy_shipping_total as this is ignored by ShippingDiscountAdjust when the shipments key is set on the OrderForm.

Promotion Event Collection

Enticify fires many Promo Events. You can easily write handlers that receive these events and do things with them. However, you can also access a collection of all of the events directly from your Commerce Server OrderForm.

  • Open the code you use to access the basket OrderForm.
  • Add a reference to Enticify.CommerceServer.dll.
  • Add the using Enticify.Promotions.Events; namespace directive.
  • Add the using Enticify.Promotions; namespace directive. This will add the extension methods used in the following steps.
  • Call the OrderForm extension method as follows:
    ReadOnlyCollection<PromotionEvent> promoApplicationEvents = orderForm.GetPromotionApplicationEvents();