GuidePlugin LogoGuidePlugin Docs

Logic

Create conditional behavior in your guides by showing or hiding filters based on user selections.

Logic enables you to create conditional behavior in your guides by showing or hiding filters based on user selections. This is essential for building decision trees and personalized user experiences.

Logic Concepts

ComponentPurposeExample
RulesetContainer for related conditions and actions"If budget > $1000, show premium options"
ConditionWhat must be true for action to triggerUser selected "High Budget"
ActionWhat happens when condition is metShow "Premium Features" filter

Logic Use Cases

ScenarioConditionActionResult
Budget-Based FeaturesBudget > $500Show advanced features filterUsers see relevant options only
Experience LevelUser = "Beginner"Hide technical filtersSimplified experience
Product CategoriesCategory = "Electronics"Show "Tech Specs" filterCategory-specific questions
Location-BasedCountry = "USA"Show state selectionRelevant geographic options

Creating Logic

Navigate to Logic Creation

Go to GuidePlugin > Logic > Create in your WordPress admin.

Configure Ruleset

Set up the basic structure:

Logic configuration interface

SettingPurposeOptions
GuidesWhich guides use this logicSelect specific guides or apply to all
Ruleset NameDescriptive identifier"Budget-based filtering", "Experience level logic"

Define Conditions

Set up what triggers the logic:

Condition Structure:

  • Filter/Facet - Which user selection to monitor
  • Operator - How to compare (equals, contains, greater than, etc.)
  • Value - What value triggers the condition

Common Condition Types:

Condition TypeExampleWhen to Use
EqualsCategory equals "Electronics"Exact match required
ContainsFeatures contains "Premium"Partial match sufficient
Greater ThanBudget > 1000Numeric comparisons
Less ThanExperience < 2 yearsRange-based logic

Define Actions

Specify what happens when conditions are met:

Action Types:

ActionEffectUse Cases
Show FilterMakes filter visibleReveal relevant options
Hide FilterMakes filter invisibleSimplify user experience
Skip FilterBypasses filter entirelyStreamline for specific users

Test Logic Flow

Verify your logic works by testing different user paths through the guide.

Start Simple: Begin with basic show/hide logic before creating complex decision trees with multiple conditions.

Logic Examples

E-Commerce Product Finder

Ruleset 1: Budget-Based Features

  • Condition: Budget filter equals "Premium ($500+)"
  • Action: Show "Advanced Features" filter

Ruleset 2: Category-Specific Options

  • Condition: Category equals "Electronics"
  • Action: Show "Technical Specifications" filter
  • Action: Hide "Material Type" filter

Ruleset 1: Property Type Logic

  • Condition: Property Type equals "Apartment"
  • Action: Show "Floor Level" filter
  • Action: Hide "Lot Size" filter

Ruleset 2: Budget Qualification

  • Condition: Budget > $800,000
  • Action: Show "Luxury Features" filter

Service Selection Guide

Ruleset 1: Experience-Based Questions

  • Condition: Experience Level equals "Beginner"
  • Action: Hide "Advanced Configuration" filter
  • Action: Show "Getting Started Help" filter

Advanced Logic Patterns

Multi-Condition Rules

Combine multiple conditions for complex logic:

Logic OperatorBehaviorExample
ANDAll conditions must be trueBudget > $500 AND Category = "Premium"
ORAny condition can be trueLocation = "NYC" OR Location = "LA"

Cascading Logic

Chain logic rules for sophisticated decision trees:

Step 1: Budget Selection
  ↓ (if Premium)
Step 2: Premium Features
  ↓ (if Advanced Features selected)
Step 3: Technical Specifications

Logic Best Practices

PracticeRecommendationWhy
Keep It SimpleStart with 2-3 conditions maximumEasier to maintain and debug
Clear NamingUse descriptive ruleset namesTeam members can understand logic
Test ThoroughlyTry all user pathsPrevent broken experiences
Document LogicNote complex decision treesFuture maintenance reference

Troubleshooting Logic

ProblemSymptomsSolutions
Logic Not TriggeringFilters don't show/hide as expectedCheck condition syntax
Verify filter/facet connections
Test with exact values
Conflicting RulesUnexpected filter behaviorReview overlapping rulesets
Check rule priority
Simplify complex conditions
Performance IssuesSlow filter transitionsOptimize complex condition sets
Reduce nested logic
Test with large datasets

Logic Testing Checklist

Test ScenarioCheckStatus
Default StateVerify initial filter visibility
Each ConditionTest every condition individually
Multiple PathsTry different user selection combinations
Edge CasesTest with unusual or empty selections
PerformanceEnsure smooth transitions

Next Steps

Once your logic is working:

ActionPurposeLink
Apply to GuidesImplement logic in your guidesGuides Documentation →
Test User ExperienceVerify smooth user flowsGetting Started →
Advanced FeaturesExplore complex decision treesFilter Documentation →