Skip to main content

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 endpoint

Transform

Mapper extracts and validates data

Import

Data flows into events & profiles

Key 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.
  1. Prepare: Prerequisites & Payloads
  2. Create: Build Your Mapper
  3. Submit: Send to MoEngage
  4. Configure: Add Webhook URL
  5. Test: Verify Data Flow

Prepare: Prerequisites & Sample Payloads

Before building your mapper, make sure you have everything ready.
You will need:
  • 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)
โšก Rate LimitsRecommended maximum: 200 requests/secondFor higher throughput, contact your Solutions Engineering team with: expected volume, use case description, peak/average patterns, and data center location.
๐Ÿ’ก Validate early: Paste your sample payloads into JSONLint to confirm they are valid JSON before proceeding.

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 profiles
  • mapping_type: "users" - Create/Update user profiles ONLY (no events)

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.
Scenario: Lead form sends contact info on submission
Key Points: Email as unique ID โ€ข Static event name โ€ข Epoch timestamp โ€ข Updates user profile
Scenario: System sends multiple orders in single webhook
โœ… Key Points: batching=true for arrays โ€ข [*] wildcard iterates โ€ข Creates separate event per order
Scenario: Separate date and time fields need combining
โœ… Key Points: user_time="#MERGE" signals merging โ€ข #MERGE section defines fields โ€ข formats specifies pattern
Scenario: CRM sends profile updates without event tracking
โœ… Key Points: mapping_type="users" โ€ข No event created โ€ข No event_name/user_time/platform needed
Scenario: Track pre-login behavior, merge after identification
๐Ÿ”„ Merging Flow: After login, send event with both customer_id and anon_id. MoEngage auto-merges anonymous history to identified profile.
Pro Tip: Using create_allThe create_all attribute allows you to iterate through all keys within a specified object from your payload. This is highly recommended when dealing with objects whose keys are dynamic, frequently changing, or constantly expanding. Instead of mapping every new field manually, create_all grabs them all at once!
Scenario: Syncing user profiles from a CRM where custom fields are constantly added to a user_attributes object.
โœ… Key Points: Standard fields are mapped directly (e.g., u_fn) โ€ข create_all automatically pulls in lead_score, industry, and lifecycle_stage without explicit mapping.
Scenario: A CRM sends an event where both the user properties and the event details contain dynamic, unpredictable keys.
โœ… Key Points: create_all works inside both user_attributes and event attr objects simultaneously โ€ข Perfect for heavily customized CRM payloads.
Timestamps: Use epoch milliseconds (integer) when possible โ€” no format specification needed! If your payload uses string timestamps, specify the format in the formats section.
Also supported: dd/MM/yyyy and dd-MM-yyyy variants with T, Z, and microsecond suffixes.
๐ŸŽจ Prefer a visual tool? Use the Visual Mapper Generator to build your JSON configuration with a guided interface.

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 the request_id, then check MoEngage Dashboard โ†’ Analytics โ†’ Events (allow 1-2 minutes for processing).

โœ… Understanding API Responses

Different response codes indicate different outcomes:
Status: Your request was successfully received and queued for processing.
Next Steps: Save the request_id. Your data should appear in MoEngage within 1-2 minutes.
Cause: A field defined as mandatory in your mapper is missing from the payload.
๐Ÿ”ง How to Fix: Verify JSONPath expressions match your payload structure and ensure all required fields are present.
Cause: Your JSON payload is malformed or doesnโ€™t match the expected structure.
๐Ÿ”ง How to Fix: Validate JSON using JSONLint and check for missing braces, brackets, or commas.
Cause: Invalid Basic Auth credentials or missing Authorization header.
๐Ÿ”ง How to Fix: In Postman, select Basic Auth and enter your Workspace ID as username and Data API Key as password.
If you encounter an error response not covered above, contact MoEngage Solutions Engineering with:
  • 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 โ€ข Check customer_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

Yes. Include both user_attributes and attr in your mapper. Profile updates and event creation happen simultaneously.
A new profile is created automatically. If customer_id already exists, the event is associated with the existing profile.
Yes. Contact MoEngage with the updated JSON. Theyโ€™ll deploy a new version with a new config_name. Your old URL continues working with the previous mapper.
Maximum 1MB recommended. For bulk requests, batch 100-500 events per call for optimal performance.
Use JSONPath notation: $.orders[0].items[0].name for specific items or $.orders[*].items[*].name for batching. Complex nesting may require flattening first.

๐Ÿ†˜ Support

Need Help?
  • ๐Ÿ’ฌ 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