Using BT Rules
  • 18 Sep 2024
  • 10 Minutes to read
  • Dark
    Light

Using BT Rules

  • Dark
    Light

Article summary

The BT Rule component's user interface is a point-and-click environment for creating, editing, and deactivating BT Rules. Please note that users may need admin-level technical abilities to use this feature.

Also, users will see the following messages when Advanced Visibility or Caching 2.0 is not enabled for their org.

  • When a user tries to access the BT Rule component: “You cannot use this component because the Advanced Visibility feature is not enabled for this org.”
  • When a user tries to create a BT Rule or BT Rule Condition record: “You cannot create records of this object because the Advanced Visibility feature is not enabled for this org.”

Functionality

BT Rules

  • Users can click the Deactivate rule/Activate rule button to deactivate or activate the BT Rule.
  • When a BT Rule is deleted, all the associated BT Rule Condition records are also deleted.
  • If a BT Rule’s Active field is unchecked, the BT Rule is treated as if it were deleted.
  • A BT Rule will be recalculated If an associated BT Rule Condition is deleted.

The following happens when a user creates or updates a BT Rule record.

  • The BT Rule’s Process field is set to “True” (checked), and the Last Update Date field is set to the current date and time.
  • If it hasn't been created already, the Blackthorn | Base Adv Visibility Hourly Sync scheduled job will be created. The scheduled job runs once an hour and triggers the FilterRecordsSyncBatch batch job for any BT Rule records with Process = “True.”
  • The scheduled job also checks the date/time in the Last Update Date field, looking for records with a Last Update Date after the scheduled job’s start date/time. If the Last Update Date is before the scheduled job’s start date, the Process field will be set to “False.”
  • NOTE: Setting BT Rule Process = “True” (checked) will not cause the BT Rule to be processed immediately. It will be processed during the next scheduled job.

Experience Cloud

Users who edit a BT Rule from an Experience Cloud site and click Save will see the first ten Contacts listed in the Eligible Contacts Preview list. The user can sort the list by any column header and click the Contact name to view the Contact record.

If no Contacts meet the conditions of the BT Rule, then the following message will appear. “You do not have access to any contacts that meet your rule conditions. Check your conditions against a record you would expect to appear.”

The Blackthorn | Rule Filter: Contacts Preview Fields (RF_Contacts_Preview_Fields) field set on the Contact object allows users to change which fields are displayed on the Eligible Contacts Preview component.
For Express Registration, eligibility will be calculated based on all the Account’s Contacts.

BT Rule Conditions

  • Users can create multiple BT Rule Conditions for a single BT Rule.
  • Only Contact fields visible to the user will be available for the user to select with the field selector. Formula fields are not available.
  • The data type permitted in the Value field is determined by the value selected in the Field. For example, for date fields, the value must be a date; for number fields, the value must be a number.
  • The Operator function picklist is controlled by the data type of the Field selection. For example, greater than or less than are only available for number fields.
  • To prevent errors when creating a BT Rule Condition, the user must select a value in the Field field before selecting a value in the Operator field.
  • Adding, removing, or editing a BT Rule Condition or changing the Condition Type (Conditions - AND/OR/custom) will automatically refresh the page upon saving.

The following happens when a user creates or updates a BT Rule Condition record.

  • The Process field on the related BT Rule record is automatically set to “True” (checked), and the Last Update Date field is set to the current date and time.
  • If it hasn't been created already, the "Blackthorn | Base Adv Visibility Hourly Sync" scheduled job is created. The scheduled job, which runs once an hour, triggers the FilterRecordsSyncBatch batch job for the BT Rule records with Process = “True.”
  • The scheduled job also checks the date/time in the BT Rule’s Last Update Date field, looking for records with a Last Update Date after the scheduled job’s start date/time. If Last Update Date is before the scheduled job’s start date, the Process field will be set to “False.”

Special Scenarios

Sometimes, you may not want to wait for the nightly scheduled job, which takes a while, to update Contact eligibility. Scenarios where that is the case can include the following.

  • You made a bulk update to several existing Contacts and want to see how those changes impact Contact visibility for a specific BT Rule.
  • You created three BT Rules, which were successfully processed. Later, you added new Contacts, but you only want BT Rule #1 to be recalculated for those Contacts.

If one of those scenarios occurs and you don’t want to wait for the nightly scheduled job to see the updated Contact eligibility, complete the steps below.

  1. Select a specific BT Rule.
  2. Click the Pencil icon.
  3. Check the Process field.
  4. Click Save.

This will cause the logic to run after an hour. (The Process field will automatically revert to unchecked after the logic runs.)

Condition Logic

The BT Rule Condition’s logic dictates how the conditions interact and works as follows.

  • Users can dictate whether conditions are combined using AND statements, OR statements, or a custom combination of AND and OR statements, including parenthesis.
  • The interface supports complex logic such as (1 and 2) or 3) or 4 or (5 and (6 or (7 and 8))).
  • An error message will be shown if the following logic errors are made.
    • A defined condition is not referenced.
    • There is an incorrect number of parentheses or a spelling error.
    • There is an undefined filter (blank value).
  • Potential operators for BT Rule Conditions include the following.
    • CONTAINS
    • DOES NOT CONTAIN
    • EQUALS
    • EXCLUDES
    • GREATER OR EQUAL
    • GREATER THAN
    • INCLUDES
    • LESS OR EQUAL
    • LESS THAN
    • NOT EQUAL TO
    • STARTS WITH

Eligibility vs Visibility

Events

Visible + Eligible

  • The current user meets the visibility and eligibility criteria, so they can see and register for the Event.
  • If the current user meets the visibility and eligibility for an Event, and the BT Rule’s Extend Visibility to Account and Extend Eligibility to Account fields are enabled (checked), then all Contacts related to the Account/Bucket Account can register for the Event.

Visible + NOT Eligible

  • The user can see the Event webpage but can’t register because they aren’t eligible.

Eligible + NOT Visible

  • If a user meets the eligibility criteria but not the visibility criteria, they can be registered for the Event, but they won’t be able to see the Event webpage.

NOT Visible + NOT Eligible

  • If a user does NOT meet the visibility and eligibility criteria, they will see an error message when visiting the Event webpage.

Event Items

Visible + Eligible

  • If a user meets the visibility and eligibility criteria, they can select any Event Item and register for the Event.

Visible + NOT Eligible

  • If a user meets the visibility criteria but does not meet the eligibility criteria, they can see the Event Items but cannot select one. (The Choose Ticket Type section shows only visible Event Items.)

Eligible + NOT Visible

  • If a user meets the eligibility criteria but not the visibility criteria, they can be registered using the Event Item, but they won’t be able to do it as they can’t see the Event Item on the Event webpage.

NOT Visible + NOT Eligible

  • If a user does not meet the visibility and eligibility criteria, they will not see the Event Item and cannot register for the Event using the Event Item.

Sessions

The Session page layout was updated to implement visibility and eligibility rules for applying advanced visibility to Sessions.

Visible + Eligible

  • Users can register for the Session if they meet the visibility and eligibility criteria.
  • If a Session is visible and eligible for the current user and the BT Rules Extend Visibility to Account and Extend Eligibility to Account fields are enabled (checked), then the Session will be shown in the dropdown list, and all Contacts related to the Account can add it to their cart.

Visible + NOT Eligible

  • A Session is visible, but users cannot add it to their cart.
  • If a Session is visible and eligible for the current user and BT RuleExtend Visibility to Account is enabled (checked), but Extend Eligibility to Account is not enabled (unchecked), then the Session will be visible in the dropdown list, but only the current user can add it to their cart. The Contacts related to the Account can see the Session, but they can’t add it to the cart.

**Example **

  • Contact A has visibility.
  • Contact B has NO visibility.
  • If Contact A and Contact B are in the same Account and Extend Visibility to Account = “True” (checked), then Contact B will have the same visibility as Contact A.

Eligible + NOT Visible

  • If eligibility rules are applied to Sessions, only eligible Contacts will see them on the payment screen.
  • If the current user meets the eligibility requirements for the Session and BT Rule Extend Eligibility to Account is enabled (checked), then the current user and all eligible Contacts can register for the Session even if they can’t see it.
  • If a registrant is not eligible to sign up for a Session, they will see the following message: “Eligibility requirements need to be met to add this session.”

Example

  • Contact A meets the eligibility rule criteria for Session 1.
  • Contact B meets the eligibility rule criteria for Session 1.
  • Since Contact A & Contact B are in the same Account and Extend Visibility to Account = “True” (checked), then Contact B will have the same visibility as Contact A (see the Visibility example).
  • Contact A and B’s names will be in the Session’s dropdown.
  • Contact C is in the same Account, BUT they do not meet the eligibility rule criteria for Session 1. Therefore, Contact C will have the same visibility as Contacts A and B, but Contact C’s name will NOT be in the Session’s dropdown.

NOT Visible + NOT Eligible

  • Invisible Sessions will be hidden from the Session layout.

Updated Checkout Logic

Users cannot change an Attendee’s information to a non-eligible Contact for Event Items during checkout unless the Someone Else option is visible. This ensures only eligible Contacts can change their information when purchasing Tickets for the Event.

When a user who is not eligible tries to access the cart/checkout pages, the following error message appears: “You do not have access to this event. Please contact the event organizer for more information.”

Scenario 1: Contact Selection

Users can only select eligible Contacts for Event Items on the Attendee Details page. Non-eligible Contacts, however, will not be visible in the Contact selection dropdown.

  • User A: Eligible Contact for the Main event ticket.
  • User B: Non-eligible Contact for the Main event ticket.
  • During checkout, the following will occur.
    • User A can select themselves, provide contact information, and purchase the main event ticket.
    • User B is not visible in the selection dropdown.

Scenario 2: Someone Else

On the Attendee Details page, the Someone Else option in the Contact selection dropdown is configured as follows.

  • Event Settings Disable Checkout as Someone Else = “True” (checked) → Users can click Someone Else and fill in their information.
  • Event Settings Disable Checkout as Someone Else = “False” (unchecked) → The Someone Else option is unavailable; only eligible Contacts are listed in the dropdown.

Create a BT Rule

  1. Click the App Launcher.
  2. In the Search box, enter and click “BT Rules.”
  3. Click New.
  4. Enter a Rule Name. (required)
  5. Check Extend Visibility to Account if you want everyone in the Account to see the Event, Event Item, or Session.
  6. Check Extend Eligibility to Account if you want everyone in the Account to be able to select the Event, Event Item, or Session.
    Create a new BT Rule
  7. Click Save.

Create a BT Rule Condition

  1. Create a new BT Rule or open an existing one.
  2. Complete the following required fields.
    • Field
    • Operator
    • Value
    • Condition Type (Conditions)
      Create a new BT Rule Condition
  3. Click Save.

What's Next