Introduction
Connected Sources is MoEngage’s flexible webhook integration framework that allows you to stream real-time data from any external platform directly into MoEngage. Integrate CRMs, e-commerce platforms, marketing tools, or custom applications with a standardized approach.How It Works
Connect any external system using three simple steps:Webhook POST
Your system sends JSON payload to MoEngage endpointTransform
Mapper extracts and validates dataImport
Data flows into events & profilesKey Capabilities
Real-Time Events Stream user actions as they happen Profile Sync Update user attributes automatically Bulk Processing Handle batches in single call Flexible Mapping Transform complex JSON structures Date Merging Combine separate date/time fields Dynamic Attrs Auto-import custom fieldsUse Cases
📝 Lead Capture Stream form submissions from Unbounce, Typeform, HubSpot for instant follow-ups 💳 Payment Events Track subscriptions from Stripe, Chargebee (created, failed, expiring) 🎫 Support Tickets Monitor Zendesk/Intercom interactions for satisfaction tracking 🛒 E-commerce Capture orders, carts, views from custom platforms 🛠️ Custom Apps Send events from proprietary systems without native SDKs🚀 Build Your Integration
Follow these five steps to go from sample payload to live data flowing into MoEngage. 1 Prepare Prerequisites & Payloads 2 Create Build Your Mapper 3 Submit Send to MoEngage 4 Configure Add Webhook URL 5 Test Verify Data FlowPrepare: Prerequisites & Sample Payloads
Before building your mapper, make sure you have everything ready.- Webhook capability in your system (HTTP POST)
- Authentication support (Basic Auth or custom headers)
- Valid JSON webhook payloads
- 2-3 sample payloads from your system
- MoEngage credentials (Workspace ID, Data API Key from Settings → APIs)
Create: Build Your Mapper Configuration
The mapper is a JSON configuration that tells MoEngage how to transform your incoming webhook data into events or user profiles. This is the core of your integration.📋 Choose Your Mapping Type
Two sync types available:mapping_type: "events"- Track events AND create/update user profilesmapping_type: "users"- Create/Update user profiles ONLY (no events)
- Events Mapper
- Users Mapper
Field Requirements by Mapping Type
| Field | For “events” | For “users” |
|---|---|---|
customer_id | Required - Unique user identifier | Required - Unique user identifier |
event_name | Required - Event name | Not used |
user_time | Required - Event timestamp | Not used |
platform | Required - “web”, “android”, “ios”, “api” | Not used |
app_version | Required - Static version string | Not used |
user_attributes | Optional - Update user profile | Optional - Update user profile |
attr | Optional - Event attributes | Not used |
📍 JSONPath Quick Reference
Use JSONPath expressions to map fields from your payload to MoEngage fields. Here’s how to read them:| Payload | JSONPath | Result |
|---|---|---|
{"email": "user@example.com"} | $.email | user@example.com |
{"user":{"email": "test@ex.com"}} | $.user.email | test@ex.com |
{"items": [{"name": "A"}]} | $.items[0].name | A |
{"events": [{"id": 1}, {"id": 2}]} | $.events[*].id | Iterates all (batching) |
📌 Complete Field Reference
| Field | Type | Description |
|---|---|---|
partner_name | String | Unique lowercase identifier (e.g., “typeform”) |
mapping_type | String | ”events” OR “users” |
customer_id | JSONPath | 🔑 Path to unique user ID (email, phone, custom ID) - links events to profiles |
event_name | JSONPath/String | Event name path or static string. Required for “events” type only |
user_time | JSONPath/“#MERGE” | Timestamp path (epoch ms preferred) or “#MERGE” for split date/time. Required for “events” only |
platform | String | ”web”, “android”, “ios”, or “api”. Required for “events” type only |
app_version | String | Version string (default: “1.0.0”). Required for “events” type only |
user_attributes | Object | User profile attributes: u_em (email), u_fn (first name), u_ln (last name), u_mb (mobile) |
attr | Object | Event attributes (key-value pairs). Optional for “events” only |
batching | Boolean | true for array payloads, false for single events |
📋 Starter Template
Copy this template and replace the JSONPath expressions with paths from your actual payload:💡 See It in Action: Real-World Examples
Click each example to see the payload and its corresponding mapper configuration side by side.📝 Example 1: Simple Form Submission
📝 Example 1: Simple Form Submission
- Payload
- Mapper Config
🛒 Example 2: Bulk E-commerce Orders
🛒 Example 2: Bulk E-commerce Orders
- Payload
- Mapper Config
batching=true for arrays • [*] wildcard iterates • Creates separate event per order📅 Example 3: Merging Date & Time
📅 Example 3: Merging Date & Time
- Payload
- Mapper Config
user_time="#MERGE" signals merging • #MERGE section defines fields • formats specifies pattern👤 Example 4: User Profile Sync Only
👤 Example 4: User Profile Sync Only
- Payload
- Mapper Config
mapping_type="users" • No event created • No event_name/user_time/platform needed🔒 Example 5: Anonymous User Tracking
🔒 Example 5: Anonymous User Tracking
- Payload
- Mapper Config
customer_id and anon_id. MoEngage auto-merges anonymous history to identified profile.🔄 Example 6: Dynamic User Properties (create_all)
🔄 Example 6: Dynamic User Properties (create_all)
user_attributes object.- Payload
- Mapper Config
u_fn) • create_all automatically pulls in lead_score, industry, and lifecycle_stage without explicit mapping.🔀 Example 7: Dynamic Event Attributes (create_all)
🔀 Example 7: Dynamic Event Attributes (create_all)
- Payload
- Mapper Config
create_all works inside both user_attributes and event attr objects simultaneously • Perfect for heavily customized CRM payloads.📅 Supported Date Formats Reference
📅 Supported Date Formats Reference
| Format String | Example |
|---|---|
yyyy-MM-dd | 2024-10-25 |
yyyy/MM/dd | 2024/10/25 |
dd/MM/yyyy | 25/10/2024 |
dd-MM-yyyy | 25-10-2024 |
yyyy-MM-dd HH:mm:ss | 2024-10-25 14:30:00 |
dd-MM-yyyy HH:mm:ss | 25-10-2024 14:30:00 |
dd/MM/yyyy HH:mm:ss | 25/10/2024 14:30:00 |
yyyy/MM/dd HH:mm:ss | 2024/10/25 14:30:00 |
yyyy-MM-dd'T'HH:mm:ssZ | 2024-10-25T14:30:00+0530 |
yyyy-MM-dd HH:mm:ss.SSSSSS | 2024-10-25 14:30:00.123456 |
yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z' | 2024-10-25T14:30:00.123456Z |
Submit: Send Your Mapper to MoEngage
Once your mapper JSON is ready, email support@moengage.com with:- Completed mapper JSON (attached)
- Sample webhook payload(s)
- Integration details: partner name, Workspace ID, Data Center, use case
Configure: Add the Webhook URL
MoEngage will provide you a unique webhook URL. Add it to your source system with Basic Auth credentials (Workspace ID as username, Data API Key as password). For events:https://api-0X.moengage.com/v1/partner/<partner_name>/events/?configName=<config_name>
For users: https://api-0X.moengage.com/v1/partner/<partner_name>/users/?configName=<config_name>
Test: Verify Your Data Flow
Use Postman to send your sample payload to the webhook URL. Verify a 200 OK response, save therequest_id, then check MoEngage Dashboard → Analytics → Events (allow 1-2 minutes for processing).
✅ Understanding API Responses
Different response codes indicate different outcomes:✅ 200 OK - Successful Submission
✅ 200 OK - Successful Submission
request_id. Your data should appear in MoEngage within 1-2 minutes.❌ 400 Bad Request - Missing Required Field
❌ 400 Bad Request - Missing Required Field
❌ 400 Bad Request - Invalid Payload Structure
❌ 400 Bad Request - Invalid Payload Structure
❌ 401 Unauthorized - Authentication Failed
❌ 401 Unauthorized - Authentication Failed
❓ Other Errors - Contact SE
❓ Other Errors - Contact SE
- Complete error response (JSON)
- Your mapper configuration (JSON)
- Sample payload you were testing (JSON)
- Expected behavior vs actual behavior
🔧 Common Issues
❌ Events not appearing Verify 200 OK response • Checkcustomer_id path • Confirm timestamp format • Wait 2-3 min • Contact MoEngage with request_id
🔀 Wrong attributes Test JSONPath at jsonpath.com • Verify payload structure • Check field name typos (case-sensitive)
⏰ Timestamp errors Match format string exactly • Use epoch ms when possible • Include timezone for ISO format
📦 Bulk not processing Set batching=true • Use [*] in all paths • Check array location in payload
✨ create_all issues Verify path points to object • Ensure key-value pairs • Check nesting (works one level deep)
🛠️ Helpful Tools
✅ JSONLint Validate syntaxVisit jsonlint.com → 🗺️ JSONPath Test expressions Visit jsonpath.com → 🪝 Webhook.site Inspect payloads Visit webhook.site → 📮 Postman Test API calls Visit postman.com → ⏰ Epoch Converter Date conversions Visit epochconverter.com → 🎨 Mapper Generator Visual config tool Open Tool →
❓ FAQ
Can I send both user attributes and events together?
Can I send both user attributes and events together?
user_attributes and attr in your mapper. Profile updates and event creation happen simultaneously.What if customer_id doesn't exist?
What if customer_id doesn't exist?
customer_id already exists, the event associates with the existing profile.Can I update the mapper after deployment?
Can I update the mapper after deployment?
config_name. Your old URL continues working with the previous mapper.What are the payload size limits?
What are the payload size limits?
How do I handle nested arrays?
How do I handle nested arrays?
$.orders[0].items[0].name for specific items or $.orders[*].items[*].name for batching. Complex nesting may require flattening first.🆘 Support
- 💬 General Questions: Contact your MoEngage Customer Success Manager
- 🔧 Technical Support: Email support@moengage.com with:
- Mapper JSON (attached)
- Sample webhook payload
- Request ID from response
- Issue description
- 🎨 Mapper Help: Share your payload & requirements - our team will assist