How to restrict affiliate discount codes to specific products using Shopify collections
Last updated: September 10, 2025
By default, affiliate discount codes created through Superfiliate apply to all products in your store. However, you can restrict these codes to only work on specific products by using Shopify collections.
Why use product restrictions?
Product restrictions are useful when you want to:
Exclude certain products like gift cards, sale items, or specific collections from affiliate discounts
Prevent discount codes from stacking with existing product markdowns
Limit promotions to specific product categories only
How to set up product restrictions
Step 1: Create a Shopify collection
In your Shopify admin, navigate to Products > Collections and click Create collection. Give your collection a title and choose either:
Manual - to manually add specific products
Automated - to set conditions for automatic product inclusion
Add only the products you want the affiliate discount codes to apply to, then save your collection.
Step 2: Get your collection ID
After creating the collection, you'll need to find the collection ID. This appears in your collection's URL in the Shopify admin. For example, if your URL is:
https://admin.shopify.com/store/yourstore/collections/346350125205
The collection ID would be: 346350125205
Step 3: Contact support to apply the restriction
Once you have your collection ID, contact the Superfiliate support team and provide:
Your Shopify collection ID
Which programs you want the restriction applied to (or specify "all programs")
The support team will update your discount codes on the backend to only apply to products in your specified collection.
Important notes
The collection should contain the products you want the discount to apply to, not the products you want to exclude
Changes may take a few minutes to take effect after implementation
If you create new affiliate programs in the future, make sure to request the same collection restriction for consistency
This restriction applies to discount functionality - it doesn't affect which products appear on affiliate landing pages