Skip to main content

Send Customer Events

Use events to record customer actions (purchases, visits, interactions) and trigger Gameball automations and rewards.

Basic Usage

🔒
Secure API Access: To benefit from v4.1 secure API endpoints, pass the sessionToken parameter when sending events (required in upcoming SDK v4). This enables automatic routing to v4.1 secure endpoints. Learn more about v4.1 →

Event Parameters

String
required
Permanent identifier for the customer.
[String: [String: Any]]
required
Dictionary of event names and metadata payloads.
String
Customer email (optional).
String
Customer mobile number (optional).
String
Optional session token override for this request. Required in upcoming SDK v4.

Best Practices

1

Keep names consistent

Standardize event names and keys (e.g., snake_case).
2

Send after init

Call sendEvent only after the SDK and customer are initialized.
3

Include identifiers

Add order IDs, amounts, and channels to improve targeting.
4

Handle errors

Surface validation and API errors for quick debugging.