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 a single call
- Flexible Mapping: Transform complex JSON structures
- Date Merging: Combine separate date/time fields
- Dynamic Attrs: Auto-import custom fields
Use Cases
- ๐ Lead Capture: Stream form submissions from Unbounce, Typeform, and 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, and 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.- Prepare: Prerequisites & Payloads
- Create: Build Your Mapper
- Submit: Send to MoEngage
- Configure: Add Webhook URL
- Test: Verify Data Flow
Prepare: 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
๐ JSONPath Quick Reference
Use JSONPath expressions to map fields from your payload to MoEngage fields. Hereโs how to read them:๐ Complete Field Reference
๐ 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
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 with 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
โ 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 syntax Visit 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 is associated 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