The Gift with Purchase promotion creates markers to track quantities of gifts, for example the amount of overall gifts available to the customer, the amount selected, returned, failed, etc. Two markers are specifically created, the gwpOrderMarker
and gwpCommerceItemMarker
. The gwpOrderMarker
tracks the overall quantities of the gift commerce items. The gwpCommerceItemMarker
tracks the quantities at a specific commerce item level.
Gift with Purchase markers only persist while the order still qualifies for the promotion. If the promotion no longer applies, associated markers are removed.
The gwpOrderMarker
item type has the following properties:
Property | Data Type | Description |
---|---|---|
| string | This value is always |
| string | The |
| string | Hash code to track which gift selection in the promotion this is. It allows the commerce item marker to link to this marker. A hash of the PMDL discount detail for a single gift selection given by the promotion. |
| string | The type of gift, which can be |
| string | String identifying the gift, usually the repository ID of the gift type. |
| boolean | Flag to indicate whether free gifts should be automatically removed if the promotion no longer qualifies. This is configured by the merchandiser when the promotion is created. |
| long | The total quantity of SKUs for this gift selection, this is the quantity from the PMDL multiplied by the number of times the offer applied (if it applied more than once). |
| double | The total quantity of the fraction-enabled SKUs for this gift selection. For example .5lbs or .25 yard. |
| long | The quantity of free SKUs for this gift selection that has already been automatically added to the order. |
| double | The quantity of free fraction-enabled SKUs for this gift selection that has already been automatically added to the order. |
| long | The quantity of free SKUs for this gift selection that has already been targeted and made free by the calculator in the order. |
| double | The quantity of free fraction-enabled SKUs for this gift selection that has already been targeted and made free by the calculator in the order. |
| long | The quantity of free SKUs for this gift selection that has already been selected by the shopper and added to the order. |
| double | The quantity of free fraction-enabled SKUs for this gift selection that has already been selected by the shopper and added to the order. |
| long | The amount of the free quantity that has been manually removed by the shopper. Keeping track of removed quantities prevents them from being automatically re-added in future pricing operations. The assumption is that the customer does not want the free item. |
| double | Similar to the |
| long | Tracks any gifts that should have been automatically added but failed, for example due to a site conflict with the promotion. |
| double | Similar to the |
The key
, value
and data
properties are required to look up marker objects. The combined value and data properties are unique for a given gwpOrderMarker
.
The gwpCommerceItemMarker
repository item has similar properties, as shown in the following table:
Property | Data Type | Description |
---|---|---|
| string | The value is always |
| string | The |
| string | The gift hash code for the promotion, a hash of the PMDL discount detail for a single gift selection given by the promotion. |
| long | The quantity of free gifts for this gift selection that has already been targeted and made free by the calculator in the order. |
| double | The quantity of the fraction-enabled free gifts for this gift selection that has already been targeted and made free by the calculator in the order. |
| long | The quantity of free gift for this gift selection that has already been automatically added to the order. |
| double | The quantity of the fraction-enabled free gifts for this gift selection that was automatically added to the order. |
| long | The quantity of the free gift that this commerce item is making free and was selected by the shopper. |
| double | The quantity of the fraction-enabled free gift that the shopper has selected. |
| long | The total quantity of the commerce item that does not apply to this gift. Used to detect when a commerce item quantity is removed, to ensure the gift quantities are updated correctly. |
| double | The total quantity of the fraction-enabled commerce item that does not apply to this gift. |
The value
and data
properties are used to match the gwpCommerceItemMarker
to the related gwpOrderMarker
that relates to this commerce item marker.
The targeted
, automatic
, and selected
quantities and quantities with fraction properties track how much of the total quantity of the gift is provided by the commerce item. Multiple commerce items can contribute to the total quantity. For example, a Gift with Purchase promotion could offer a free gift of two watches. The shopper selects two different watches, creating two commerce items. Each commerce item has an associated gwpCommerceItemMarker
, each of which refers to the same gwpOrderMarker
. Each gwpCommerceItemMarker
has a selectedQuantity
of 1.
For further information, refer to the ATG Platform API Reference.