Overview
The controlCleverTap action is the native bridge between UnifyApps and the CleverTap mobile analytics and engagement platform. It wraps the CleverTap SDK's core APIs — event tracking, profile management, and revenue attribution — exposing them as a first-class action type you can drop into any event chain without writing code.
All calls are made through the CleverTap SDK bundled by UnifyApps; data is sent directly from the device to CleverTap's servers. No server-side proxy is required.
Prerequisites
Warning: Complete these steps before using the action:
Parameters
| Parameter | Type | Required | Default | Description |
| actionType | "pushEvent" | "profileUpdate" | "chargeEvent" | Required (required) | — | pushEvent — records a named user action with optional event properties.
profileUpdate — updates the current user's CleverTap profile attributes.
chargeEvent — records a purchase/revenue event with item details. |
| eventName | string | Required for pushEvent (required) | — | The name of the CleverTap event to record. Must match the event name defined in your CleverTap schema (case-sensitive). Examples: "Product Viewed", "Add to Cart", "Checkout Started". |
| properties | object | Optional (optional) | {} | Key-value pairs of event properties (for pushEvent) or profile attributes (for profileUpdate). Values must be strings, numbers, or booleans — nested objects are not supported by CleverTap and will be JSON-stringified. Supports bindings. |
| userId | string | Optional (optional) | Current user ID | The CleverTap identity to associate the event with. If omitted, uses the authenticated user's ID from the UnifyApps session. Override this only when tracking events for a different identity (e.g. a guest user whose ID you know). |
| chargeDetails | object | Required for chargeEvent (required) | — | Revenue details for a chargeEvent: { amount: number, currency: string, transactionId: string, items: Array<{ name: string, amount: number, qty: number, category: string }> }. |
Step-by-Step Usage Guide
Connect CleverTap in App Settings: Go to App Settings → Integrations → CleverTap. Enter your Account ID (e.g.
TEST-123-456-789Z) and Account Token. Toggle Enable CleverTap on. Save the settings and republish the app for the SDK to initialise.Identify when to track: Map your user journey to CleverTap events. Common points: page load →
"Screen Viewed", add to cart →"Product Added", form submit →"Lead Submitted", payment success →chargeEvent.Add the action to your event chain: In the Events panel of your trigger block (Button, Page Load, etc.), click + Add Action → CleverTap Action. Set
actionType,eventName, andpropertiesusing bindings from your data sources and variables.Validate in CleverTap Dashboard: Open CleverTap → Events → Live View and trigger your event in Builder preview or on a test device. The event should appear within seconds. Check that all property values are correct before deploying to production.
Examples
Track a product view event
{ "actionType": "controlCleverTap", "payload": { "actionType": "pushEvent", "eventName": "Product Viewed", "properties": { "Product ID": "{{ row.productId }}", "Product Name": "{{ row.name }}", "Category": "{{ row.category }}", "Price": "{{ row.price }}", "Currency": "INR" } } }
Update user profile after onboarding
{ "actionType": "controlCleverTap", "payload": { "actionType": "profileUpdate", "properties": { "Name": "{{ appUser.name }}", "Email": "{{ appUser.email }}", "Phone": "{{ appUser.phone }}", "Plan": "{{ var_selectedPlan }}", "Onboarded": true } } }
Record a purchase charge event
{ "actionType": "controlCleverTap", "payload": { "actionType": "chargeEvent", "chargeDetails": { "amount": "{{ ds_placeOrder.response.totalAmount }}", "currency": "INR", "transactionId": "{{ ds_placeOrder.response.orderId }}", "items": "{{ ds_placeOrder.response.items }}" } } }
Frequently Asked Questions
Does the CleverTap action work on web apps, or only mobile?
The action works on both web and mobile. On web, it uses CleverTap's JavaScript Web SDK. On mobile (iOS/Android), it uses the native CleverTap SDK. The same action configuration is used for both — UnifyApps selects the appropriate SDK at runtime. Feature parity is high, but some mobile-specific capabilities (push notification opt-in, geofencing) are not available on web.
Do I need to define the event schema in CleverTap before using it?
No. CleverTap creates events and properties automatically on first receipt. However, it is best practice to define your schema in CleverTap's Schema → Events section before sending events in production. This enables type validation, prevents typos from creating duplicate event names, and makes the events available in segment and campaign builders immediately.
How does UnifyApps associate events with the right CleverTap user profile?
On first load, UnifyApps calls CleverTap's onUserLogin method with the authenticated user's ID (from your app's identity system). All subsequent events are automatically associated with this identity. The userId parameter in the action lets you override this on a per-event basis — use it carefully, as setting an incorrect identity can merge profiles unexpectedly in CleverTap.