Integration

Webhook Automation: Connect Marketing Events Safely

What Are Webhooks?

A webhook sends an HTTP request to a URL you control when a configured event occurs. It can reduce polling, but deliveries may be delayed or retried—so receivers should verify, acknowledge, and process events safely.

Example: A server can receive a selected conversion event, verify its signature, then queue an update for a CRM. Avoid creating a lead from every click without a clear purpose and appropriate consent.

Common Use Cases

1. Route selected events to team tools

A receiver you operate can transform a verified event into a Slack notification, CRM update, or warehouse record. Keep destination credentials on the server and send only the fields the destination needs.

// Example payload sent from your own integration to a Slack incoming webhook
POST https://hooks.slack.com/services/YOUR/WEBHOOK/URL
{
  "text": "Campaign \"Summer Sale\" reached its configured milestone."
}

2. CRM Integration

Map validated conversion events to records in your CRM. Define deduplication keys and avoid sending unnecessary personal or sensitive data.

3. Analytics Pipeline

Stream click and conversion data to your data warehouse for custom reporting.

Configure and receive a webhook

  1. Deploy an HTTPS endpoint that can accept the event payloads you select.
  2. Open the Webhooks page in Lativiq, register the endpoint, and choose from the event types available to your account.
  3. Save the secret when it is shown, and configure your receiver to verify the signature before using the payload.
  4. Return a successful response promptly; queue slower work and make processing idempotent so a retry does not apply the same event twice.

The delivery log can help diagnose unsuccessful responses. Check the available events and retry behavior in the product before relying on a particular event or delivery schedule.

Security Best Practices

Verify every delivery

Lativiq sends an X-Lativiq-Signature header in the form sha256=<lowercase hex digest>, calculated with HMAC-SHA256 over the exact JSON request body and the configured secret. Verify against the raw request bytes before parsing, compare signatures in constant time, and check the delivery timestamp to reduce replay risk. Use the delivery ID to deduplicate retries.

Real-World Example

Marketing Automation Workflow

  1. Click Event: Create lead in CRM
  2. Install Event: Send welcome email via SendGrid
  3. Conversion Event: Notify sales team in Slack
  4. 30-Day Event: Trigger retention campaign

Conclusion

Webhooks can connect configured events to systems you operate. Reliable integrations still need signature verification, retry-safe processing, delivery monitoring, and controls over the data they forward.

Frequently Asked Questions

A webhook is an HTTP request sent to a configured endpoint when an event occurs. Delivery can be delayed or retried, so consumers should verify the request, acknowledge it promptly, and handle duplicate deliveries safely.

Open the Webhooks page in Lativiq, register an HTTPS endpoint, and choose from the events available to your account. Save the generated secret securely and verify signatures in your receiver. Review the delivery log to diagnose failures; confirm supported retry controls in the product.

Yes, if the events and fields available in your webhook meet the warehouse’s needs. A common design is to validate the signature in a serverless receiver, deduplicate using the delivery identifier, and enqueue a minimal event record for ingestion. Check the payload schema and avoid assuming every attribution dimension is present.

An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.