BlogComparisons · November 6, 2026 · 6 min read

Contact Form 7 Lead Routing: JsonLogic vs json-rules-engine vs durable_rules vs Drools vs NRules

Compare five rule engines for custom CF7 lead routing. Match decision expressions, fact engines and runtime ownership to clear conflict and fallback policies.

A custom Contact Form 7 workflow can outgrow a few hard-coded department checks. An inquiry might need a route based on service code, region and an existing account relationship. A rule engine can evaluate those facts, but the application must still define what happens when several routes match, none match or a required fact cannot be obtained.

An inquiry card connected to a branching decision hub with rule modules and output trays.
Generated conceptual illustration; not a product screenshot or measured result.

This documentation-based comparison covers JsonLogic, json-rules-engine, durable_rules, Drools and NRules. These are decision libraries or engines for developers, with no assumed native CF7 connector. They are different execution models, so compare the decision you need to implement rather than counting feature names. No firsthand benchmark or production trial is claimed.

Separate the decision from its side effect

Normalize a synthetic inquiry into an explicit fact set before evaluation. A useful result might be a route identifier, rule revision and reason. Keep the CRM update or notification in a separate authorized execution step, with the existing duplicate-prevention policy applied there. A second evaluation should not automatically send a second message.

Decide whether rules operate on one self-contained record or maintained facts and events over time. Specify missing-value behavior, overlapping matches, fallback handling and who may change rules. For a two-option menu, an ordinary reviewed mapping can be easier to maintain than any of the engines below.

Engine Main execution fit Review before adoption Core license
JsonLogic Serializable decision expressions Operator semantics and implementation parity MIT for json-logic-js
json-rules-engine JavaScript rules with named facts and events Async fact failure, caching and multiple matches ISC
durable_rules Forward-chaining facts and event patterns Runtime bindings and state lifecycle MIT
Drools Java rule evaluation and decision models Rule model, session behavior and service ownership Apache 2.0
NRules .NET inference with C# rule definitions Fact joins, activation conflicts and session lifecycle MIT

JsonLogic

JsonLogic represents decision expressions as JSON data. That can be useful when the same reviewed eligibility expression needs to be stored, transported or evaluated in more than one application component. It is a compact decision representation, rather than a complete workflow scheduler or CRM delivery service.

The operation reference defines comparisons, missing-value checks and other operators. Check exact truthiness and equality behavior with your normalized facts. A form field containing the string false is not automatically the same input as a boolean false. Custom operators also expand the behavior your team must review.

The JavaScript implementation json-logic-js is MIT licensed; inspect other implementations separately. Its strength is expressing a bounded decision as portable data. Its limitation is that cross-language agreement needs fixtures, especially when operators or coercion differ. Choose it for a small expression-based routing decision, and keep a trusted server-side evaluation authoritative even if the browser also previews a result.

json-rules-engine

json-rules-engine defines JavaScript rules using JSON conditions, named facts and resulting events. Its documentation includes nested all/any conditions and asynchronous facts. This fits an adapter where a routing decision needs a separately obtained account classification alongside the submitted service code.

The fact reference describes cached fact values and configurable behavior. Define what happens if an external fact request fails, times out or returns an obsolete classification. An unavailable account lookup should not quietly become a negative account relationship merely because both cases appear false in application code.

The core license is ISC. Its strength is separating reusable fact acquisition from readable conditions. Its limitation is that priorities and successful rule events do not automatically implement a single winning business route. Review the rule semantics, define conflict handling explicitly, and choose it when your JavaScript service can own that asynchronous decision boundary.

durable_rules

durable_rules describes a forward-chaining system for facts and events, with a C core and language bindings. Its documented models include rulesets and state-oriented flows. That is a broader model than checking a single expression against one inquiry object.

It can be relevant when a maintained adapter needs to derive a decision from several related events or asserted facts. Before adopting it, define the identity and lifetime of those facts. Two unrelated inquiries must not share state accidentally just because their synthetic examples used the same session identifier.

The core license is MIT. Review the actual binding, runtime support and installation path for your deployment rather than assuming every language example has identical packaging. Its strength is a model for richer event and fact relationships. Its limitation for a simple CF7 handoff is the state lifecycle you now need to operate. Choose it when that lifecycle is an explicit requirement, with expiry, restart and replay cases included in acceptance.

Drools

Drools is part of Apache KIE’s current source project. The official project describes Java rule evaluation, a DMN decision engine and complex event processing. Those capabilities support different modeling approaches; decide whether your team needs authored rules, decision tables or an explicit decision model before choosing packages.

A Java service already responsible for a substantial lead-routing policy may benefit from that ecosystem. Keep the integration boundary explicit: the WordPress connector supplies normalized facts, the decision service returns a reviewed result, and a separate step performs the destination write. Adding a Java service solely for one dropdown lookup can create unnecessary operational ownership.

The source uses Apache 2.0 terms, with notices and the project’s current Apache incubation status to review. Commercial support or hosted offerings have separate terms. Its strength is a developed business-rule and decision-model ecosystem. Its limitation is the modeling and service expertise required. Choose it when those requirements already exist and the team can explain session behavior and conflicting activations.

NRules

NRules is a .NET inference engine based on Rete, with rules authored using a C# internal DSL. Its documentation describes facts, rule conditions and actions, together with a match/resolve/act cycle. Rule execution order is determined through the engine’s activation and conflict-resolution behavior.

The getting-started guide separates compiling rule definitions into a session factory from creating a working session and inserting facts. For an adapter, map that lifecycle to the scope of the decision. Review joins carefully when more than one fact participates, so a contact’s inquiry cannot match another contact’s account facts.

The core license is MIT. Its strength is keeping rule definitions within an existing .NET development and review process. Its limitation is that C# rule authoring is not a turnkey nontechnical policy editor. Choose it when your team owns a .NET service and needs inference over related facts, with side effects controlled outside the evaluation session.

Compare with one acceptance matrix

Use the same synthetic cases for every candidate: one valid match, two overlapping matches, no match, missing region, unknown service code and an unavailable external fact. Add a replay of the same inquiry. State the expected result and whether a destination action is permitted before running anything.

Record the rule revision and normalized fact contract with each decision. Keep personal message contents out of unnecessary diagnostics. Review the boolean mapping guide and CRM option mapping guide before blaming a rule engine for inconsistent inputs. Our background job comparison covers a separate execution concern.

Choose the smallest model your team can explain

Start with JsonLogic for portable expressions, json-rules-engine for JavaScript facts and conditions, durable_rules for explicit event/fact relationships, Drools for an established Java decision service, or NRules for .NET inference. The listed open-source core licenses do not require a paid runtime subscription; implementation, hosting and optional commercial services still have costs.

This site publishes CF7 Analytics. The official Svetlik Analytics for Contact Form 7 free plugin supports submission outcome trends, while routing acceptance requires its own evidence. None of these engines alone proves CRM completion, correct lead ownership or inbox delivery.