LMS Context Engine improvements

LMS Context Engine improvements

We have improved the LMS Context Engine’s execution logic and context scoping so that Event-Based Notifications, Recurring Charges, and Rewards can all evaluate rules and templates against the specific swipe that triggered a run path. The triggering swipe ID is now sent to the Context Engine using the source-swipe alias, allowing the Context Engine to return swipe-level fields scoped to the event that started the run.

How can I use it?

You can use this expanded functionality in the backend and rules layer without managing any new UI features. Configuration occurs via existing rule and template editors, enabling swipe data to trigger three core workflows across all supported run paths:

  1. Event-Based Notifications: Supports the native Swipe Created and custom Swipe Status Updated events. Both pass the triggering swipe ID, scoping the qualification rules and template expansion to the source-swipe. This includes webhooks.
  2. Recurring Charges: Uses the qualification/restriction and dynamic amount rules to reference the source-swipe data, such as assessing fees based on transaction thresholds or percentages. Non-swipe runs default to legacy behavior.
  3. Rewards: Calculates rewards points using data from the source-swipe that triggered them, instead of looking at older transactions. This allows modifier group logic to reference live swipe data—such as MCC, purchase amount, or merchant metadata—to instantly apply boosted reward rates.

To target fields within these workflows, reference your variables using the following syntax paths:

  • LMS Rule Path: (-> swipes-array :source-swipe :variable-name)
    • Note: Add :raw-merchant-metadata before the variable name for raw merchant fields.
  • Communication Template Path (Email Bodies, Premium Webhook Bodies, etc): swipes-array.source-swipe.field-name
    • Note: Add .raw-merchant-metadata before the field name for raw merchant fields.

Where can I find it?

This update exists within existing configuration paths.

  • Event-Based Notifications: Open the rule and template editors for the Swipe Created event and the Swipe Status Updated custom event-based notification.
  • Recurring Charges: Navigate to Programs > select a program > Other Fees > Recurring Fees to add a new recurring fee rule or edit an existing one.
  • Webhooks: Navigate to Settings > Company > Automated Notifications > Event-Based Triggers.

How can I test it?

There are many ways to test the Context Engine’s updated logic and context scoping capabilities.

Email Templates (Event-Based Triggers):

  1. Configure a notification with a qualification rule that references a source-swipe variable (e.g., Source swipe amount more than $10).
  2. Post swipes above and below the threshold to confirm the email fires only when the condition is met.
  3. Verify the rendered email includes both swipe-level context fields (e.g., Swipe ID, amount, and card-present flag) and line of credit/customer-level context fields (e.g., line of credit account ID, loan display ID, and customer name).

Rewards:

  1. Set up a Program with a base rewards rate and at least one modifier group that includes a condition referencing a source-swipe variable or field (e.g., Amount greater than $100 or MCC = 5123).
  2. Post swipes via the swipe processor or OData, varying amount and MCC.
  3. Confirm points accrue at the expected rate based on each swipe.
  4. Post multiple swipes on the same account to confirm the modifier evaluates against each triggering swipe independently, not a prior one.

Webhooks:

  1. Configure a line of credit Swipe Posted webhook with source-swipe fields (e.g., ID, amount, and raw merchant metadata).
  2. Post multiple swipes to confirm each webhook payload contains data for the swipe that triggered it—not the most recent swipe.
  3. Test the custom Event-Based Notification by settling a swipe and confirming the Status Updated webhook fires with the correct source-swipe data.
    • Optional: Add a qualification rule variable (e.g., Source swipe amount more than $10) to confirm the rule filters correctly.

Recurring Charges:

  1. Add a recurring fee to a Program that triggers when a Swipe is posted with a restriction rule variable (e.g., Source swipe amount that is more than or equal to $50).
  2. Post swipes above and below the threshold to confirm the fee only triggers when the condition is met.
  3. Test dynamic fee amounts by configuring the fee amount as a calculated rule that references the source swipe amount variable (e.g., 3% of swipe amount), then post a swipe and confirm the assessed fee reflects the triggering swipe's amount.

Learn more about the Context Engine and the variables you can use in our Knowledge Base.

Release notes home

Subscribe for updates

Subscribe to stay up to date with the most relevant changes and developments. Subscribe me to: