Developer Portal

Lead activity notifications

How partners subscribed to the Impel Notification Service (INS) build a webhook endpoint to receive lead and activity notifications.

Activity vs. messaging events

Lead activity notifications (INS) deliver two kinds of events:

  • Activity events — activity generated on a lead by Impel's AI applications.
  • Messaging events — outbound messages to the consumer, sent only by Impel's Sales AI and Lead Nurture agents.

Overview

This guide is intended for partners integrating with the Impel Notification Service (INS). It describes how to implement a webhook endpoint that receives real-time lead activity and message notifications from Impel’s Lead Nurture application.

How It Works

When Impel’s Lead Nurture application records a new activity or message for a lead, INS delivers a JSON event payload via HTTP POST to your registered webhook endpoint. Your endpoint should process the event and return an appropriate HTTP status code.

Glossary

The following terms are used throughout this document:

TermDefinition
INSImpel Notification Service
CRMCustomer Relationship Management
CRM ActivityAn activity for a lead. Activity types include: outbound_call, appointment, note, phone_call_task.
CRM MessageA message communication sent to or received from a lead.
Client KeyA unique identifier for a dealer client entity within the Impel system.
Lead IDA unique identifier for a lead within the Impel system.
Consumer IDA unique identifier for a consumer within the Impel system.

Webhook Implementation

1. Endpoint Setup

Create an HTTP POST endpoint that:

  • Accepts a JSON request body
  • Validates the client_id and api_key header parameters
  • Returns the appropriate HTTP status code (see API Responses section)

Example base URL:

2. Authentication

Impel authenticates each outbound request using two HTTP header parameters. Your endpoint must validate both values on every incoming request:

Header ParameterDescription
client_idIdentifies the client making the request.
api_keySecret key used to authenticate the request. Coordinate the value with your Impel integration contact.

Payload Reference

All events share a set of common fields. Event-specific fields are documented separately for each event type below.

Common Fields

FieldTypeDescriptionValues
event_nameStringThe name of the event type.Activity Created | Message Created
event_idStringUnique identifier for each event generated by INS. Useful for troubleshooting and deduplication.UUID
created_tsDatetimeUTC timestamp of when the event was created.ISO 8601 (UTC)
client_keyStringUniquely identifies the dealer client entity in the Impel system.—
lead_idIntegerUniquely identifies a lead in the Impel system.—
consumer_idIntegerUniquely identifies a consumer in the Impel system.—
  • Event: Message Created

Delivered when Impel records a new inbound or outbound message for a lead.

Example Payload

{
"event_id": "12cabc89-72e5-4250-9c49-b8137a008bf9",
"created_ts": "2024-09-05T11:42:51Z",
"event_name": "Message Created",
"lead_id": 12345,
"consumer_id": 12345,
"message_id": 12345,
"client_key": "C0012345",
"direction": "inbound",
"channel_type": "sms",
"sent_by": "ai"
}

Message-Specific Fields

FieldTypeDescriptionValues
message_idIntegerUniquely identifies the message in the Impel system.—
directionStringIndicates whether the message was received by or sent from Impel.inbound | outbound
channel_typeStringThe communication channel over which the message was transmitted.email | sms
sent_byStringThe entity that transmitted the message.human | ai
Note Details for retrieving full message content via API are not yet available. Please contact your Impel integration contact for more information.
  • Event: Activity Created

Delivered when Impel records a new activity for a lead.

Example Payload

{
"event_id": "12cabc89-72e5-4250-9c49-b8137a008bf9",
"created_ts": "2024-09-05T11:42:51Z",
"event_name": "Activity Created",
"lead_id": 12345,
"consumer_id": 12345,
"activity_id": 12345,
"client_key": "C0012345",
"activity_type": "appointment"
}

Activity-Specific Fields

FieldTypeDescriptionValues
activity_idIntegerUniquely identifies the activity for the given lead_id. Use this value to call the GET Activities endpoint.—
activity_typeStringThe type of activity recorded in the Impel system.outbound_call | note | appointment | phone_call_task

Handling Payload Data

After receiving an event notification, use the identifiers in the payload to fetch full record details from Impel’s REST API:

Event TypeIdentifier FieldImpel API Endpoint
Activity Createdactivity_idGET /activities/{activity_id}/event
*lead_idGET /leads/{lead_id}

For full API documentation, schemas, and authentication details for these endpoints, refer to Impel’s Swagger documentation.

API Responses

Your webhook endpoint must return one of the following HTTP status codes in response to each request from INS:

HTTP CodeStatusDescription
200SuccessThe webhook received the JSON payload successfully.
400Bad RequestA required property in the JSON payload is missing or invalid. Implement this if you are validating the payload against a schema (optional).
500Internal Server ErrorThe webhook did not receive the data or encountered an unexpected error.

Testing & Go-Live

Provide Two Endpoint URLs

Impel recommends providing separate URLs for test and production environments:

Once your test endpoint is ready, share both URLs with your Impel integration contact. Impel and your team will collaborate to run end-to-end tests against the test URL before activating the production endpoint.

Logging Recommendations

To support efficient troubleshooting, Impel recommends that your webhook implementation log the following for every request:

  • The full request payload, including the event_id
  • The HTTP response code returned by your endpoint
  • Any internal errors or exceptions encountered during processing

Retaining logs with event_id values allows Impel’s support team to correlate specific delivery attempts when investigating issues.

For integration support, contact your Impel integration representative.

On this page