When to Use Case Sections vs. Conditional Sections

Understanding when to use a case section instead of an independent conditional section is important in making your content is as effective as it can possibly be. These examples describe scenarios that put the best option to use.

Understanding the difference between case sections and independent conditional sections is essential to be sure your conditional content works the way you expect. Simply stated, a case section shows one, and only one, condition out of a group of conditions. This makes case statements a great tool for setting up OR statements. In contrast, a conditional section can be used to show one or more conditions at the same time. Which one to use depends entirely on your goal.

Show or hide one section—Let's say you want to show a toll-free support number to customers in the U.S. In a straight-forward scenario such as this, when the answer is either “yes” or “no,” a simple conditional section does the job. Just define the content you want to display for your single condition and when it matches, your content displays. When the condition does not match, nothing displays.

Show more than one section—In another scenario, you might want to show a toll-free support number to U.S. customers and a list of store locations to customers in Colorado. You can do this by defining two conditional sections—one showing the phone number based on country and another showing locations based on state. For customers who live in Colorado, both the toll-free number and the store locations display.

Show 1 of 2 sections—If you would rather list only store locations for customers in Colorado and show a toll-free support number to other customers, but you don’t want to show both, this is where a case section comes in handy. In your conditional section, list the locations and define your condition based on state. In the default section, define the toll-free number. For customers with a Colorado address, only the locations display. For all other customers, the phone number displays.

Show 1 of 3 sections—Building on the previous scenario, let’s define a case section with multiple conditions where your default section will show an international number to customers living outside of the U.S. Again, you want to show only one condition to each segment of customers. Base the first condition on the state of Colorado, the second condition on the country being the U.S., and define the international number in the default section. Remember, in a case section, the first condition that matches is the only one that displays.

In action, here’s how the last scenario plays out.

  • If the contact record indicates a Colorado address, the store locations display.
  • If the contact record indicates a U.S. address outside of Colorado, the second condition matches and the toll-free U.S. number displays.
  • If the contact record has no address or if it does not match Colorado or U.S., the international number you defined for the default section displays.
Note: If you do not define the default section and the first two conditions do not match any criteria, nothing displays.