OxinionDeveloper
oxinion.event.signal

Capture every signal. From any source.

Signal is the entry point of Oxinion SDK. It receives inbound events from webhooks, SDK calls, or sensors — timestamps them, normalises the schema, and dispatches them downstream through the pipeline.

Stable
Generally Available

Simple by design

Signal is the entry point of Oxinion SDK. It receives inbound events from webhooks, SDK calls, or sensors — timestamps them, normalises the schema, and dispatches them downstream through the pipeline.

  • 01Emit from SDK, webhook, sensor, or scheduled job
  • 02Automatic schema validation and timestamping
  • 03Dispatches immediately into Geo and Edge pipeline
Full API reference
TypeScript
1import { createOxinion } from 'oxinion';
2
3const oxinion = createOxinion({ accessToken });
4
5// Emit a signal from any source
6await oxinion.event.signal.emit({
7 source: "sdk",
8 userId: "user_123",
9 type: "location_update",
10 payload: {
11 lat: 43.65,
12 lng: -79.38
13 }
14});
15
16// Or listen for incoming signals
17oxinion.event.signal.on("location_update", (event) => {
18 console.log("Signal received:", event.userId);
19});
EventGeoEdgeFlowAction

From location update to push notification

A user's location triggers a Signal, Geo checks proximity, Edge Gate evaluates eligibility, Flow Pipeline runs the sequence, and Action Notify delivers the offer — all from one event.

TypeScript
1import { createOxinion } from 'oxinion';
2
3const oxinion = createOxinion({ accessToken });
4
5// 1. Event — emit a location signal from the mobile SDK
6await oxinion.event.signal.emit({
7 type: "location_update",
8 userId: "user_123",
9 payload: { lat: 43.6532, lng: -79.3832 }
10});
11
12// 2. Geo — check if the user is within 200m of the store
13const proximity = await oxinion.geo.radius.contains(storeRadiusId, {
14 lat: 43.6532, lng: -79.3832
15});
16
17// 3. Edge — gate evaluates opt-in and visit count
18const gate = await oxinion.edge.gate.evaluate({
19 event: { userId: "user_123", inZone: proximity.inside },
20 rules: [
21 { field: "inZone", operator: "eq", value: true },
22 { field: "visitCount", operator: "gte", value: 2 },
23 { field: "optedIn", operator: "eq", value: true }
24 ],
25 schedule: { days: ["mon","tue","wed","thu","fri"], hours: [9, 18] }
26});
27
28// 4. Flow — execute pipeline if gate passes
29if (gate.passed) {
30 await oxinion.flow.pipeline.execute(welcomePipelineId, gate.context);
31}
32
33// 5. Action — pipeline node sends the push notification
34// oxinion.action.notify.send({ userId, title: "You're near us!", body: "Get 20% off" })

Every automation starts with a signal.

Signal is step one. Start emitting events and watch your pipeline come to life.