What are Integrations?
Integrations connect LexQ to your external services. When a rule’s action fires, LexQ can call your coupon system, point platform, notification service, or any webhook endpoint. Integrations are configured once and then referenced in rule actions by their ID.Integration Types
| Type | Description | Use Case |
|---|---|---|
WEBHOOK | Call any HTTP endpoint | Order processing, custom logic |
COUPON | Issue coupons via external service | Welcome coupons, seasonal promotions |
POINT | Award or deduct points | Loyalty programs, cashback |
NOTIFICATION | Send SMS, email, or push | Order confirmations, alerts |
CRM | Sync user data or tags | Customer segmentation |
MESSENGER | Send messages via chat platforms | Customer support automation |
Integration types are categories of external services — they are independent of action types. The mapping from an action to an integration type is determined by the dispatcher, not by the action name.
Creating an Integration
Console
Navigate to Management → Integrations → Create Integration, select the type, and fill in the configuration.CLI
Check Required Configuration
Each type requires different configuration fields. Check what’s needed:Using Integrations in Rules
LexQ engine actions are domain-agnostic primitives — see Action Types for the full reference. The patterns below show how each integration type is invoked.Coupon issuance — EMIT_EVENT + COUPON integration
EMIT_EVENT to a service registered for the integration’s type. The integration provider is responsible for interpreting the eventPayload — the engine does not validate or transform its keys.
Notification — EMIT_NOTIFICATION + NOTIFICATION integration
targetVar identifies the recipient fact (phone_number, email, device_token, etc.). notificationPayload is passed through to the integration provider unchanged.
Webhook — EMIT_WEBHOOK + WEBHOOK integration
payloadTemplate field is optional. When omitted, all facts are sent as the request body. When provided, only the template structure is sent with {{variables}} replaced by actual values. See Policy Rules — EMIT_WEBHOOK for the full template variable reference.
Point award — INCREMENT_FACT
For loyalty point awards, use INCREMENT_FACT to mutate the engine-side fact:
generatedVariables.total_point__delta exposes the increment that was applied (e.g., 1000 for a 1% rate on payment_amount: 100000).
Among engine actions, only
EMIT_WEBHOOK performs in-engine variable substitution (via payloadTemplate). For EMIT_EVENT and EMIT_NOTIFICATION, payload values are passed through to the integration provider as-is — substitution and interpretation are the provider’s responsibility.Managing Integrations
Failure Handling
When an integration call fails during execution (network timeout, 5xx response, etc.), the failure is recorded in the Failure Log. You can retry, skip, or resolve failures:During Impact Simulations, integration calls are always mocked. In Dry Runs, mocking is controlled by the Mock External Calls toggle in the Console (API parameter:
mockExternalCalls, default: true). When set to false, the engine attempts real calls — if they fail, entries are written to the Failure Log.Next Steps
Policy Rules
Learn how to use integrations in rule actions.
Troubleshooting
Common integration issues and solutions.

