Webhook Destination Field and Payload Mappers
Overview
The Webhook Destination in Ascent allows you to customize the structure of webhook payloads before they are sent to your external systems. Two optional configuration parameters are available:
field_mapper- remaps or restructures fields inside the webhook payloadpayload_mapper- wraps the entire payload under a custom root field
These options provide flexibility for integrating alerts with third-party systems that expect a specific JSON schema.
Configuration
JSON Schema
{
"url": "https://your-webhook-endpoint.com/webhook",
"username": "optional_username",
"password": "optional_password",
"field_mapper": "source_field:destination_field,nested.field:nested.destination",
"payload_mapper": "optional_wrapper_field"
}Default Payload (No Mappers)
If no mappers are configured, webhook payloads have this default structure:
Field Mapper
Purpose
The field_mapper parameter allows renaming or restructuring fields in the payload to match the format expected by the receiving system.
It supports dot notation for nested fields and multiple mappings separated by commas.
Syntax
Examples of dot notation:
alert.name:title→ movesalert.name→titleevent:meta.type→ moves flat fieldevent→ nestedmeta.typealert.severity:notification.level→ nested → nested mapping
Examples
1. Simple field renaming
Result:
2. Extract nested fields
Result:
3. Create nested destinations
Result:
4. Mixed levels
Result:
Behavior Notes
Dot notation supported for both source and destination.
Whitespace around names is trimmed.
Missing fields log warnings but don’t interrupt execution.
Mapped fields are moved, not duplicated.
Intermediate objects are auto-created for nested destinations.
Type safety: existing non-object paths are not overwritten.
Payload Mapper
Purpose
The payload_mapper wraps the entire webhook payload inside a single field.
Useful for APIs that require a top-level object or “envelope.”
Syntax
Examples
1. Basic wrapping
Result:
2. Custom wrapper
Result:
Behavior Notes
Wraps as a JSON object (not a string).
Whitespace trimmed.
All payload data (including alert rows) is preserved.
Using Both Together
When both mappers are configured:
Base payload is built
field_mappertransformations are appliedpayload_mapperwraps the final payload
Example
Result:
Limitations
Silent failures: Invalid mappings only log warnings.
Type conflicts: Cannot create nested paths through non-object fields.
Fixed order: field_mapper runs before payload_mapper.
Processing order:
Best Practices
For field_mapper
Use descriptive names for destination fields.
Prefer hierarchical mappings to group related data.
Trim extra spaces.
Test transformations using a sample webhook receiver.
For payload_mapper
Use when integrating with systems requiring a wrapper field.
Choose a meaningful top-level name (e.g.,
data,payload,notification).
Advanced Examples
1. Complex Restructuring
Result:
2. Combined with Wrapper
Result:
Example Configurations
Slack-style
{"field_mapper": "event:text,alert:attachments"}
Generic Wrapper
{"payload_mapper": "payload"}
Microsoft Teams-style
{"field_mapper": "event:@type,alert:sections"}
Last updated
Was this helpful?