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 AppLauncher, or in Salesforce Classic, click Nimble AMS, Staff View, Button, All Tabs.
    2. Search or select the "Query" object
    3. Click New
    4. Use the information listed in the SOQL snippets below to fill in the required fields.
      1. SELECT Id, NU__CouponRule__c, NU__CouponRule__r.Name, 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, search and navigate to "Installed Packages" | Configure Nimble AMS
  3. Specify the queries in the Coupon Validation Settings.
  4. From Setup, Provide access to the 'MaxUsesPerAccount__c' field on the Coupon Rules object and the 'AccountRestriction__c' field on the Coupon Code object and add these fields to page layouts as needed.
  5. From the Coupon Rule object, add the following picklist values to the 'Validator Class' field:
    1. MultiUseCouponRuleValidator
    2. MemberCouponRuleValidator
    3. SingleAccountCouponRuleValidator
  6. Any existing or future coupons that need alternate rules can now be configured by populating the Max Uses Per Account field, the Account Restriction field, and the Validator Class field.

Coupon Extension Validators Included In This Feature

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