Articles on: 👁️Prescription Eye Lens

How to Create Conditional Rules for LensFlow in SB Prescription Eye Lens

Conditional Rules in LensFlow let you show or hide lens options during the prescription process. You can create rules based on customer selections in previous steps or based on prescription (RX) values such as SPH, CYL, Axis, Add Power, or PD.


This helps ensure that customers only see the lens options that are suitable for their prescription. You can hide unnecessary fields, restrict unsupported lens types, and prevent invalid combinations automatically.

This guide will help you set up and manage Conditional Rules easily, allowing you to create a smooth and accurate prescription experience for your customers.



Steps:


Hide Lens Options by Manual Selection (Step-Based Rules):

You can hide lens options based on what the customer selects in previous steps.



  1. Access Configure Steps : Shopify Admin → Apps → SB Prescription Eye Lens → Prescription Flows → Click Edit → Configure Steps → Click Settings on the desired step



  1. Open the Conditional Rule Tab : Inside the step settings, click on the Conditional Rule tab.





  1. Configure the Conditional Rule: Inside the Conditional Rule popup, first select the previous step from the “If user selected in”T dropdown →Then select the trigger option(s) under “One of these options” → After that, select the options you want to show or hide under “These options in this step” → Finally, choose the action as Show Only or Hide and save the rule.


Example:

If you have selected Lens Material as the previous step and the customer selects Anti Glare, then you can hide specific options like Black Lens and Blue Lens from the next step automatically.



You can also show or hide options based on add-on product variants, allowing more advanced conditional logic.



Example:


If you select Choose your lens type as the previous step and the customer selects Blue Light treatment lenses, then only High Index Lens and Mid Index Lens will be displayed in the next step, while all other lens options will be hidden automatically.




  1. Click Save Rules, then click Update Flow.


Important: Make sure you click Update Flow, otherwise the rule will not apply on the storefront.




Hide Lens Options Based on RX Values:

You can also hide lens options automatically based on prescription values.


  1. Open Lens Flow: Go to Shopify Admin → Apps → SB Prescription Eye Lens → Lens Flows → click the Edit (✏️) icon next to the Lens Flow you want to configure.




  1. Select Lens Flow and Open Option Settings:  Select the Lens Flow where you want to add the Conditional Rule.


  1. Choose the option under Add-on Products (With Price) or Lens Options (No Price). Locate the specific lens option you want to control and click the Settings (⚙️) icon next to it to configure and set the Conditional Rule.



  1. Enable RX Limits :In the option settings popup, check the box “Enable RX limits for this option”. Then configure the required RX value conditions (SPH, CYL, ADD, etc.) as needed.

After setting the limits, click Save to apply the RX-based rule for that lens option.





  1. Select Evaluation Mode: Choose how the prescription should be validated:
  • Both Eyes Must Match – RX values must fall within the defined range for both eyes.
  • At Least One Eye Matches – RX values must match for either eye.
  • Strongest Eye – The system evaluates based on the eye with the higher prescription value.


  1. Set PD Limits (Optional): 

If the customer’s PD is outside the defined range, the lens option will be hidden automatically.

You can define minimum and maximum limits for:

  • Single PD
  • Dual PD (per eye)






  1. Set Prescription Range : Enter minimum and maximum values for:
  • SPH (Sphere)
  • CYL (Cylinder)
  • Axis (0–180)
  • ADD (Progressive)

If the entered prescription values fall outside the defined limits, the lens option will not be available.





Final Step: Test the Conditional Rule

After completing all configurations, click Save Rx Limits, then click Update Lens Flow.

Finally, test the rule on your storefront.



Found this helpful? ✅ Leave a Review


If you need help setting up translations or want assistance tailoring them for your store, feel free to contact our support team at [support@setubridgeapps.com]() or on WhatsApp: +91 8511963839. We’re happy to help 😊



Updated on: 30/05/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!