Coupons and Promotions Related Object Types
Coupon Set
A Coupon Set is a collection of coupon codes. The bearer of the coupon is entitled to a >shopping cart promotion.
<rule_code>
Corresponds to the (
TRULE
) column in the database’sTRULE
table.RULECODE
is used to associate the Coupon with a promotion rule.<coupon_config_code>
Corresponds to the (
TCOUPONCONFIG
) column in the database’sTCOUPONCONFIG
table
Sample XML:
<coupon_sets>
<coupon_set>
<coupon_set>
<coupon_config>
<rule_code>25%_Off_Binoculars</rule_code>
<coupon_config_code>8B857F27-9E8B-9787-A833-72206FBDA417</coupon_config_code>
<coupon_usage_type>limitPerSpecifiedUser</coupon_usage_type>
<usage_limit>1</usage_limit>
<duration_days>0</duration_days>
<limited_duration>false</limited_duration>
<multi_use_per_order>false</multi_use_per_order>
</coupon_config>
<coupons>
<coupon_code>Bino001</coupon_code>
<coupon_code>Bino002</coupon_code>
</coupons>
<coupon_usages>
<coupon_usage>
<coupon_code>Bino001</coupon_code>
<active_in_cart>true</active_in_cart>
<email>alana.abercombie@elasticpath.com</email>
</coupon_usage>
<coupon_usage>
<coupon_code>Bino001</coupon_code>
<active_in_cart>true</active_in_cart>
<email>annabelle.alvirez@elasticpath.com</email>
</coupon_usage>
<coupon_usage>
<coupon_code>Bino002</coupon_code>
<active_in_cart>true</active_in_cart>
<email>darcy.aubel@elasticpath.com</email>
</coupon_usage>
<coupon_usage>
<coupon_code>Bino002</coupon_code>
<active_in_cart>true</active_in_cart>
<email>tester@ep.com</email>
</coupon_usage>
</coupon_usages>
</coupon_set>
...
</coupon_sets>
Gift Certificate
A gift certificate is a coupon with a monetary value that can be redeemed to pay for items in the storefront.
Sample XML:
<gift_certificates>
<gift_certificate guid="664029B3-CB9F-C38D-54CF-E3DA3123FDCC">
<code>snapitupusgc100</code>
<creation_date>2010-06-16T00:00:00-07:00</creation_date>
<last_modified>2010-06-16T00:00:00-07:00</last_modified>
<recipient_name></recipient_name>
<sender_name></sender_name>
<theme>SomeTheme</theme>
<purchase_amount>100.00</purchase_amount>
<store_code>SNAPITUP</store_code>
<currency_code>USD</currency_code>
</gift_certificate>
...
</gift_certificates>
Promotions
A promotion is a marketing tool used to increase sales of a certain product or set of products. There are two types of promotions:
Shopping cart promotions, which are applied to items after they are added to shopping carts
Shopping cart promotions can be restricted to certain customers, based on Condition Rules.
Catalog promotions, which are applied to specific products in the catalog
When exporting promotions, you can optionally include their associated eligibilities (in the case of shopping cart promotions), conditions, and actions.
Sample XML:
<promotion type="Cart">
<store_code>SNAPITUPUK</store_code>
<name>20% off all digital camera with coupon</name>
<displayName>
<value language="en">25 % off digital camera</value>
</displayName>
<code>CAMERA2</code>
<description>20% off all DigiCameras (single use per customer only)(coupon code = CAMERA2-1, CAMERA2-2, CAMERA2-3, CAMERA2-4, CAMERA2-4, CAMERA2-5) IN SNAPITUPUK store</description>
<availability>
<enabled>true</enabled>
</availability>
<actions>
<action type="cartCategoryPercentDiscountAction">
<parameters>
<parameter>
<key>discountPercent</key>
<value>20.0</value>
</parameter>
<parameter>
<key>categoryCode</key>
<value>90000003|SNAPITUPUK</value>
</parameter>
<parameter>
<key>numItems</key>
<value>1</value>
</parameter>
</parameters>
<exceptions/>
</action>
</actions>
<selling_context>
<guid>20% off all digital camera with coupon</guid>
<name>20% off all digital camera with coupon</name>
<description>Selling Context</description>
<priority>1</priority>
<conditions>
<condition>
<guid>20% off all digital camera with coupon_TIME</guid>
<name>20% off all digital camera with coupon_TIME</name>
<condition_string>{AND {SHOPPING_START_TIME.greaterThan (1262337131000L)} {SHOPPING_START_TIME.lessThan (1580548331000L)}}</condition_string>
<dictionary_guid>TIME</dictionary_guid>
</condition>
</conditions>
</selling_context>
</promotion>
<promotion type="Catalog">
<catalog_code>SNAPITUPUS</catalog_code>
<name>50% off all Single Use Camera's</name>
<displayName/>
<code>0774BF5E-B309-B50A-22AC-47576CC76992</code>
<description>50% off all Single Use Camera's</description>
<availability>
<enabled>true</enabled>
<enabledate>2008-01-01T00:00:00-08:00</enabledate>
</availability>
<actions>
<action type="catalogCurrencyPercentDiscountAction">
<parameters>
<parameter>
<key>currency</key>
<value>USD</value>
</parameter>
<parameter>
<key>discountPercent</key>
<value>50.0</value>
</parameter>
</parameters>
<exceptions/>
</action>
</actions>
</promotion>
...
</promotions>
Condition Rules
Condition rules are the condition under which promotions are applied. For example, the promotion could be 10% off all items in your cart and the condition could be you have more than 10 items in your cart.
Sample XML:
<condition_rules>
<rule>
<code>A2386DD3-E146-32EB-8754-0AF2D52ABEF6</code>
<conditions>
<and>
<and>
<condition>
<kind>Condition</kind>
<type>cartSubtotalCondition</type>
<parameters>
<parameter>
<key>subtotalAmount</key>
<value>50</value>
</parameter>
</parameters>
<exceptions/>
</condition>
<condition>
<kind>Condition</kind>
<type>cartCurrencyCondition</type>
<parameters>
<parameter>
<key>currency</key>
<value>USD</value>
</parameter>
</parameters>
<exceptions/>
</condition>
</and>
</and>
</conditions>
<actions>
<action>
<type>ShoppingCartPromotion</type>
<code>A2386DD3-E146-32EB-8754-0AF2D52ABEF6</code>
</action>
</actions>
</rule>
...
</condition_rules>
Saved Condition
A saved condition is a set of conditions that can be stored and reused at later date.
Sample XML:
<saved_conditions>
<condition>
<guid>71C8CE90-9D47-2F34-ECD4-D2EC099F236E</guid>
<name>STORE_savedCondition</name>
<description></description>
<condition_string> { OR { SELLING_CHANNEL.equalTo 'SLRWORLD' } } </condition_string>
<dictionary_guid>STORES</dictionary_guid>
</condition>
...
</saved_conditions>