Apply coupons or promotion codes
Sometimes, products are associated with promotions. Users must be able to apply promotions to the products in an order and confirm the final amount that the customer must pay to fulfill the order.
Solution
The following section describes APIs, user exits, services, and other components.
Coupons must be created in the Sterling™ Business Center application. The user can choose to create a coupon that can be applied to an order based on the combination of products, the quantity, order total, and so on. The user can also decide the date when the coupons are applicable and configure the coupons appropriately.
The user can apply
or remove a coupon in the Payment Confirmation screen.
The user can do this task while creating an order or use the Add/Remove
Promotions related task from the Order Summary screen.
- If the coupon is valid, it is displayed as a valid promotion with
the applicable amount. The coupon code is passed to the
changeOrder
API that updates the order total appropriately. - If the user applies an invalid coupon, an appropriate message is displayed and it is added to
the order as an invalid promotion. However, the order is not repriced. Note: When a coupon is created for a specific payment type, then it becomes applicable only if the customer makes payment for the order completely by using that payment type. If the payment is made through multiple payment types, the coupon is displayed as invalid. However, you can use only one coupon for an order with multiple payment types by setting
YPM_IS_MULTIPLE_PAYMENT_TYPE_PRICING_RULE_ENABLED
system rule to Y for the organization. - If the user is applying the promotion to an exchange order, the
computeRefundPayments
API is called to recalculate the amount that is transferred out of the return order. Applying the coupon affects the amount that is required to fulfill the order. ThegetCompleteOrderDetails
API is called to reload the updated information on the Payment Confirmation screen after applying the promotion.
Implementation
The following section describes
the rules that you must configure.
- For more information about creating and configuring coupons, see the Sterling Business Center pricing administration.
- Applying a coupon or promotion code is a permission controlled task. You can do this task only if you belong to a user group that is assigned the necessary permissions. For information about administering user group permissions, see the Administering user group permissions.
- For more information about the APIs and user exits, refer to the Javadoc.
End-user impact
The user can ensure that the customer can use coupons to avail a reduction in the order total.