Error status codes for coupon validation process
The following table maps the coupon validation status codes to the message and status attributes that are displayed to the end user.
Note: These are the codes returned by the default coupon validation logic. The coupon validation user exit implementation can return any code.
CouponStatusMsgCode | Description | Status attributes returned |
---|---|---|
YPM_RULE_VALID | Coupon is valid. | None |
YPM_RULE_INVALID | Coupon does not exist. | None |
YPM_RULE_NOT_ACTIVE | Coupon is not active. | PricingStatus of the coupon |
YPM_RULE_NOT_YET_EFFECTIVE | Coupon is not yet active. | StartDateActive of the coupon |
YPM_RULE_EXPIRED | Coupon is expired. | EndDateActive of the coupon |
YPM_RULE_BAD_CUSTOMER | Coupon is not assigned to the CustomerID. | CustomerID passed in the input. If you pass a Coupon with CustomerID, then the coupon must be assigned to the customer. Otherwise, this message is returned. If a CustomerID is not passed, then the coupon should not be assigned. Otherwise, this message is returned. |
YPM_RULE_BAD_REGION | Coupon is not assigned to the passed RegionKey or PersonInfo. | RegionKey passed or derived based on PersonInfo
from the input. If you pass a Coupon with a RegionKey or PersonInfo, then the coupon must be assigned to the customer. Otherwise, this message is returned. If no RegionKey or PersonInfo is passed, then the coupon should not be assigned. Otherwise, this message is returned. |
YPM_RULE_BAD_ATTRIBUTE | Coupon is not assigned to the passed customer attribute. | Any one of these customer attributes: CustomerType,
RelationshipType, Vertical, or any extended attribute of the YPM_PRICING_RULE_ASSIGNMENT
that does not match the coupon assignments. If you pass a Coupon with a customer attribute, then the coupon must be assigned to the customer. Otherwise, this message is returned. If no customer attribute is passed, then the coupon should not be assigned. Otherwise, this message is returned. |