Skip to main content
All CollectionsData SourcesRules
Data Sources: Cart Contains Subscription
Data Sources: Cart Contains Subscription

Learn how to set up data source rules to check for specific subscription products within the cart.

Moe Khalaf avatar
Written by Moe Khalaf
Updated over 8 months ago

A recent update to Data Sources, released on March 7, 2024, introduces a new feature allowing merchants to create rules based on the presence of subscription items within the cart. This enhancement enables merchants to analyze cart contents and take actions based on the existence of subscription-associated products.

If you are looking to check if the cart contains a certain product that is a subscription, you can use the data source rules to do so by following the steps below.

Key functionalities include:

  • Examining all items within the cart to identify those with associated subscriptions.

  • Checking if the cart contains a specific product linked to a subscription.

  • Utilizing selling plans on product line items to determine subscription status.


Prerequisites

Connect Subscription Provider

Before this data source will function, you will need to connect to your subscription app, by enabling subscription integration in Rebuy.


Setting up the rules

To leverage this feature effectively, follow these steps:

  1. Access Data Sources:

    • Navigate to the "Data Sources" section of your platform.

  2. Create a New Rule:

    • Within Data Sources, locate the "IF" section to define the condition for the rule.

  3. Select Cart as the Object:

    • Choose "Cart" as the object against which the rule will be applied.

  4. Choose Operator (see below for screenshot examples):

    • Select "Contains Subscription" to trigger actions based on the presence of any subscription item in the cart.

    OR

    • Choose "Contains" and specify a particular product if you want to trigger actions based on the presence of a specific product with a subscription.

  5. Add Additional Conditions (Optional):

    • If needed, add more conditions using the "AND" logic to refine the rule based on other criteria.

  6. Save your work!

Examples

If cart contains subscription then return specific product.

If cart contains specific product and subscription then return specific product.

By following these steps, merchants can effectively utilize the "Cart Contains Subscription" feature within Data Sources to tailor their workflows according to subscription-related criteria.

Did this answer your question?