Skip to main content
Skip table of contents

Coupon Codes

Coupon codes are tied to rules in staff view. Codes can be generated manually by staff, using the New Coupon Code button, or automatically, using the Generate Coupon Code button. Coupon codes are visible under the Coupon Codes related list on the rule from which they originated. The code is assigned a status of Active or Inactive based on the Start and End Date, and can be deleted as needed. It can also be assigned a start date and end date. If the End Date field is left blank, the code will be usable as long as the status remains active.

Entering a Coupon Code

When a user has been given a coupon code to use, they can enter it at checkout in Community Hub in order to receive the discount defined by the rule. When the coupon is applied, the user receives a message indicating that it was applied to the order. The user then sees the discount amount in the card for the product the coupon was applied to. 

Cross Entity Coupon

Using the Cross Entity Coupon feature, a Coupon Code from one entity can be successfully applied to an order having products from the same or different entities when an Entity Crossover is set up.

Under the Order Summary section of the checkout page, the user sees the Sub Total, Total Discounts, and the Grand Total, which is the total cost of the order with the coupon applied. 

Coupon for Multiple

When a percentage based coupon is applied to a cart, and the coupon applies to multiple items, the discount line that is created under each item should represent the percentage based discount for that item.

As an example, for a 10% off coupon, say item 1 has a cost of $100 and item 2 of $50, the respective price after discount will become $90 and $45. This means that both items will be discounted by 10% instead of the total discount being evenly spread across multiple items.

Price Adjustments

Now, the cart or order prices can be adjusted manually. The users can manually adjust the Coupon Discounts and Misc fees to adjust the prices. To do so, the users have to go to the cart item line linked to their orders and edit Discount and Miscellaneous Fee fields. 


If a coupon code had met its end date or has been deleted, the user receives a message indicating that the code is no longer valid and the discount is not applied to the order.

Coupon Codes in Internationalization

If you have enabled Salesforce multi-currency, Salesforce introduces the Currency field on all object layouts within your org.

While creating a new Coupon Code record make sure to select the Currency field value that matches the Currency field value on the linked Coupon Rule record. If the Currency field value of the Coupon Code and the Coupon Rule record do not match, then it throws an error.

Also, once the record is saved, you will not be allowed to edit the value of the Currency field.

Show Me An Image

Removing a Coupon Code

Once a coupon code has been applied at checkout, it can be removed as needed. After the code is applied, the Apply button is replaced with a Remove button. Once removed, the user receives a notification that the coupon has been removed. The discount will no longer be visible in product card to which it was applied or in the Total Discounts field under Order Summary.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.