Cart Events
Cart events indicate various cart states and conditions. The system maintains fault tolerance by returning events instead of failing operations.
Event Structure
interface ICartEvent {
type: CART_EVENT_ENUM;
message: string;
items?: Array<Partial<ICartItem>>;
}Event Enum
enum CART_EVENT_ENUM {
OOS = 'OutOfStock',
PRESALE_LIMIT_EXCEEDED = 'PresaleLimitExceeded',
PRESALE_NOT_STARTED = 'PresaleNotStarted',
PRESALE_EXPIRED = 'PresaleExpired',
PRESALE_MIXED_CART = 'PresaleMixedCart',
ITEMS_REQUESTED_NOT_ADDED = 'ItemsRequestedNotAdded',
ITEM_NOT_ENGRAVED = 'ItemEngravingError',
ADDRESS_CHANGE = 'AddressChange',
REMOVED_EXISTING_ITEMS = 'RemovedExistingCartItems',
RETAILER_MIN = 'RetailerMinNotMet',
NO_ITEMS_IN_CART = 'NoItemsInCart',
INVALID_ID = 'InvalidId',
NO_ID = 'NoId',
CART_CHECKOUT_PROCESSED = 'CartCheckoutProcessed',
NEW_CART = 'NewCart',
DEFAULT = 'CartError',
ITEM_QTY_CHANGE = 'ItemQuantityChange',
ITEM_ID_NOT_FOUND = 'ItemIdNotFound',
ITEMS_REMOVED = 'ItemsRemoved',
RETAILER_FULFILLMENT_INVALID = 'RetailerFulfillmentInvalid',
MAX_QUANTITY_PER_ORDER_EXCEEDED = 'MaxQuantityPerOrderExceeded',
RETAILER_ONDEMAND_HOURS_NOT_AVAILABLE = 'RetailerOnDemandHoursNotAvailable',
COUPON_PROCESSING_ERROR = 'CouponProcessingError',
COUPON_NOT_FOUND = 'CouponNotFound',
COUPON_EXPIRED = 'CouponExpired',
NO_APPLICABLE_DISCOUNT = 'NoApplicableDiscount',
COUPON_NOT_STARTED = 'CouponNotStarted',
MINIMUM_ORDER_VALUE_NOT_MET = 'MinimumOrderValueNotMet',
MINIMUM_ORDER_UNITS_NOT_MET = 'MinimumOrderUnitsNotMet',
MINIMUM_DISTINCT_ITEMS_NOT_MET = 'MinimumDistinctItemsNotMet',
QUOTA_EXCEEDED = 'QuotaExceeded',
NOT_FIRST_PURCHASE = 'NotFirstPurchase',
INVALID_COUPON = 'InvalidCoupon',
INVALID_MEMBERSHIP = 'InvalidMembership',
INVALID_DOMAIN = 'InvalidDomain',
INVALID_REQUIREMENTS = 'InvalidRequirements',
INVALID_ORGANIZATION = 'InvalidOrganization',
PRESALE_ITEMS_NOT_ALLOWED = 'PresaleItemsNotAllowed',
PRODUCT_NOT_ELIGIBLE = 'ProductNotEligible',
NOT_ENOUGH_PREVIOUS_ORDERS = 'NotEnoughPreviousOrders',
RETAILER_DOES_NOT_ALLOW_PROMOS = 'RetailerDoesNotAllowPromos',
RETAILERS_DO_NOT_ALLOW_PROMOS = 'RetailersDoNotAllowPromos',
RETAILER_DOES_NOT_ALLOW_GIFT_CARDS = 'RetailerDoesNotAllowGiftCards',
RETAILERS_DO_NOT_ALLOW_GIFT_CARDS = 'RetailersDoNotAllowGiftCards',
}Event Types
Inventory Events
OutOfStock: Requested items are not available in the desired quantity
Cart Modification Events
ItemsNotAdded: Products could not be added to the cartItemsRequestedNotAdded: These item(s) requested can't be added to the cart either due to the location provided, and/or hours of operation.RemovedExistingCartItems: The following cart item(s) have been removed, they're currently not available in the location providedItemQuantityChange: Item quantity reduced from ${originalQuantity} to ${stock} due to limited stock availabilityItemsRemoved: The following item(s) were removed from the cart due to zero quantity
Validation Events
RetailerMinNotMet: The retailer minimum was not met, for item(s) (quantity:${quantity}, total price: ${price}) min(${min}).NoItemsInCart: Cart is emptyInvalidId: The cartId provided is invalid, a new cart was createdNoId: The cartId provided is empty, a new cart was createdPresaleLimitExceeded: Presale fully reserved || Only ${n} units remaining for presalePresaleNotStarted:Presale starts at ${date}PresaleExpired:Presale reservation has expired || This presale has endedPresaleMixedCart:Presale items cannot be mixed with regular itemsRetailerFulfillmentInvalid:The retailer fulfillment ${fulfillmentId} selected, for item(s) with quantity:${quantity}, is invalid due to the fulfillment's allowed product type ${productTypesAllowed}.MaxQuantityPerOrderExceeded:The maximum quantity per order for this item is ${maxPresaleQuantity}. Quantity has been adjusted accordingly. || Quantity adjusted from ${originalQuantity} to ${quantity} due to presale availabilityRetailerOnDemandHoursNotAvailable:The following cart item(s) have been removed due to retailer hours of operation restrictions
State Change Events
AddressChange: The provided location does not match the cart's locationCartCheckoutProcessed: The cartId (${id}) provided has already been processed through a checkout successfullyNewCart: No cart was found with the cartId (${id}), a new cart was created
Special Cases
CartError: Default error eventItemIdNotFound: The following item(s) with provided id were not found in the cartItemEngravingError:The item(s) selected for engraving is not engravable. || The item(s) selected for engraving is not currently active for engraving. || The item(s) selected for engraving has exceeded the maximum(${maxLines}) number of engraving lines. || The item(s) selected for engraving has exceeded the maximum(${engravingPersonalization.maxCharsPerLine}) characters limit per line.
Coupon Event Cases
CouponProcessingError:There was an error processing this couponCouponNotFound:This coupon does not existCouponExpired:This coupon has expiredInvalidCoupon:This coupon is invalidNoApplicableDiscount:This coupon results in no discountCouponNotStarted:This coupon is not yet activeMinimumOrderValueNotMet:Order total does not meet minimum required valueMinimumOrderUnitsNotMet:Order does not meet minimum quantity requirementMinimumDistinctItemsNotMet:Order does not meet minimum unique items requirementQuotaExceeded:This coupon has reached its usage limitUserLimitExceeded:Default error eventNotFirstPurchase:This coupon is only valid for first purchasesInvalidMembership:This coupon requires a specific membershipInvalidDomain:This coupon is restricted to specific email domainsInvalidRequirements:This coupon does not meet the required conditionsInvalidOrganization:This coupon is restricted to specific organizationsPresaleItemsNotAllowed:This coupon cannot be used with presale itemsProductNotEligible:One or more items are not eligible for this couponNotEnoughPreviousOrders:Previous order requirement not metRetailerDoesNotAllowPromos:This retailer does not accept promo codesRetailersDoNotAllowPromos:Selected retailers do not accept promo codes
Checkout Only Event Cases
RetailerDoesNotAllowGiftCards:Gift card applied. Note: ${retailerNames} does not accept gift cards || Gift card applied to eligible retailers only. The following retailers do not accept gift cards: ${retailerNames}RetailersDoNotAllowGiftCards:${retailerNames} does not accept gift cards || None of the selected retailers accept gift cards
Last updated

