OxinionDeveloper
oxinion.edge.gate

Decide what runs. Before anything does.

Gate is the entry-point evaluation layer of Oxinion SDK Edge. Evaluate conditions in real time, enforce rules, and control exactly which events flow downstream — before a single action is executed.

Stable
Generally Available

Simple by design

Gate is the entry-point evaluation layer of Oxinion SDK Edge. Evaluate conditions in real time, enforce rules, and control exactly which events flow downstream — before a single action is executed.

  • 01Combine field comparisons, ranges, and boolean logic
  • 02Add Scheduler to restrict by time window
  • 03Pass enriched context directly into Flow on success
Full API reference
TypeScript
1import { createOxinion } from 'oxinion';
2
3const oxinion = createOxinion({ accessToken });
4
5const result = await oxinion.edge.gate.evaluate({
6 event: {
7 userId: "user_123",
8 location: { lat: 43.65, lng: -79.38 }
9 },
10 rules: [
11 { field: "visitCount", operator: "gte", value: 3 },
12 { field: "optedIn", operator: "eq", value: true }
13 ],
14 schedule: { days: ["mon","tue","wed","thu","fri"], hours: [9, 17] }
15});
16
17if (result.passed) {
18 await oxinion.flow.pipeline.execute(flowId, result.context);
19}
EventEdgeFlowAction

Segment-aware campaign with VIP branching

Event Stream feeds live location updates into Gate. Rules check segment and opt-in. Scheduler blocks weekends. Flow Switch routes VIPs to a premium offer, everyone else to the standard one. Action Relay syncs the result to your CRM.

TypeScript
1import { createOxinion } from 'oxinion';
2
3const oxinion = createOxinion({ accessToken });
4
5// Event — subscribe to live location stream
6const stream = await oxinion.event.stream.subscribe({
7 filter: { type: "location_update" },
8 onEvent: async (event) => {
9
10 // Edge — gate with rules + scheduler
11 const gate = await oxinion.edge.gate.evaluate({
12 event,
13 rules: [
14 { field: "optedIn", operator: "eq", value: true },
15 { field: "visitCount", operator: "gte", value: 1 }
16 ],
17 schedule: { days: ["mon","tue","wed","thu","fri"], hours: [9, 21] }
18 });
19
20 if (!gate.passed) return;
21
22 // Flow — pipeline branches on user tier
23 // Switch node routes VIP → vip_offer, standard → standard_offer
24 await oxinion.flow.pipeline.execute(campaignPipelineId, {
25 ...gate.context,
26 // Switch condition: user.tier === "vip"
27 });
28
29 // Action — relay outcome to CRM (runs as pipeline node)
30 // oxinion.action.relay.send({ url: crmEndpoint, payload: gate.context })
31 }
32});

Control what runs. From the boundary.

Gate stops bad events before they ever reach your workflows. Start evaluating in minutes.