Skip to main content
Skip table of contents

Coupon Extensions

The Coupon Extensions addition provides the means to extend the functionality of the base Nimble AMS product coupon creation and validation.

This feature is one of our Support Enabled Features; if you are interested, reach out to Nimble AMS Support with your request and more information.

After Coupon Extensions have been enabled, you gain access to the following fields:

  • Coupon Rule.MaxUsesPerAccount__c
  • Coupon Code.AccountRestriction__c

These fields will enable you to use either the standard coupon validators or custom validators to restrict coupon use.

Post Enablement Process

  1. Create the CouponUnlimited and CouponAccount queries. 
    1. In the tab bar, click 
      App Launcher, or in Salesforce Classic, click 
      Nimble AMS, Staff View, Button, All Tabs.
    2. Search and select Queries
    3. Click New. 
    4. Use the information listed in the SOQL snippets below to fill in the required fields.
      CouponUnlimited Query
      SELECT Id, NU__CouponRule__c, NU__CouponRule__r.Name, NU__CouponRule__r.NU__ApplicationMethod__c, NU__CouponRule__r.NU__CouponProduct__c, NU__CouponRule__r.NU__Description__c, NU__CouponRule__r.NU__DiscountPercentage__c, NU__CouponRule__r.NU__DiscountRate__c, NU__CouponRule__r.NU__EntityName__c, NU__CouponRule__r.NU__MaximumDiscount__c, NU__CouponRule__r.NU__ValidatorClass__c, NU__CouponRule__r.MaxUsesPerAccount__c, NU__StartDate__c, NU__EndDate__c, NU__Status__c, NU__Email__c, NU__Code__c, AccountRestriction__c, (SELECT Id FROM NU__Coupons__r WHERE NU__Account2__c = :accountId AND NU__Status__c != 'Cancelled')
       FROM NU__CouponCode__c
       WHERE NU__Code__c = :code
      SELECT id, NU__Member__c FROM Account WHERE id = :accountId
  2. From Setup, in the Quick find box, search and select Installed Packages.

  3. Click Configure next to Nimble AMS.

  4. Specify the queries in Coupon Validation Settings, by setting Additional Coupon Validation Queries field to CouponAccount, and the Coupon Validation Query Override field to CouponUnlimited.

  5. From Setup, provide access to the MaxUsesPerAccount__c field on the Coupon Rules object and the AccountRestriction__c field on the Coupon Codes object and add these fields to page layouts as needed.
  6. From the Coupon Rules object, add the following picklist values to the Validator Class field:
    1. MultiUseCouponRuleValidator
    2. MemberCouponRuleValidator
    3. SingleAccountCouponRuleValidator
  7. Any existing or future coupons that need alternate rules can now be configured by populating the Max Uses Per Account, Account Restriction, and Validator Class fields.

Coupon Extension Validators Included In This Feature

Apex ClassPurpose
MultiUseCouponRuleValidatorDefines validation logic for coupons that can be redeemed more than once by each account.
MemberCouponRuleValidatorDefines validation logic for coupons that can be redeemed only by member (BillTo) accounts.
SingleAccountCouponRuleValidatorDefines validation logic for coupons that can be redeemed by a single specified (BillTo) account.

JavaScript errors detected

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

If this problem persists, please contact our support.