History file
A dealer's past conversations, delivered to your SFTP server as NDJSON at onboarding or on request.
The webhook carries only a dealer's recent conversations: when a dealer is enrolled, it starts from a look-back window agreed at onboarding. Anything older is delivered as a history file. Impel builds one per dealer, on request, and uploads it to an SFTP server you provide.
File format
- One event per line (NDJSON), UTF-8. Each line is a bare
messageorconsumer_createdevent, exactly as it appears inside a webhook envelope'seventsarray. There's no envelope. - Gzipped by default (
.ndjson.gz). An uncompressed file can be agreed instead. - Oldest first. A consumer's
consumer_createdline comes before their messages. - Only consumers with messages in range. You won't get a
consumer_createdline for a consumer with no messages in the file's period. - Current product setup. The file reflects the products enabled for you on the day of the export. A product that has since been switched off is left out, even for messages the webhook already delivered.
{"event_type":"consumer_created","event_timestamp":"2026-03-02T17:44:09Z","event_id":"cdf913aa-364b-5458-a812-69c48a6393a4","client_key":"EXAMPLEDEALER","consumer_key":"CONSUMER-002","consumer":{"first_name":"John","last_name":"Doe","email_address":"john.doe@example.com"},"metadata":{"source_client_key":"DEALER-001"}}
{"event_type":"message","event_timestamp":"2026-03-02T17:44:10Z","event_id":"a22643a1-225a-57f3-aa10-0d31d35ee3ce","client_key":"EXAMPLEDEALER","consumer_key":"CONSUMER-002","message":{"conversation_id":"5b0e1c7a-2f4d-4a8e-9b3c-1d6e7f8a9b0c","opportunity_id":"c23c2e45-c801-436a-ab93-58b8f7d0fa7d","source_system":"voice_ai","direction":"outbound","channel":"sms","sent_by":"AI","sender_contact":"+15555550100","receiver_contact":"+15555550188","body":"Thanks for calling Example Motors. Use this link to schedule your test drive.","body_text":"Thanks for calling Example Motors. Use this link to schedule your test drive."},"metadata":{"source_client_key":"DEALER-001"}}File names
Impel_MessageHistory_{dealerCode}_{yyyyMMddHHmmss}_{part}.ndjson.gzdealerCodeis your code for the dealer, the same value asmetadata.source_client_key.- The timestamp is the export's start time, in UTC.
partis a three-digit sequence starting at001. If a per-file size limit is agreed, a large export can be split into several parts; process the parts in order.- An uncompressed file ends in
.ndjsoninstead of.ndjson.gz.
Each part is uploaded with a .tmp suffix first, and all parts are renamed to their final names only after every part has landed. Ignore .tmp files. A file without the suffix is complete.
How it fits with the webhook
The history file and the webhook carry the same events with the same event_id, so overlaps are expected. Deduplicate on event_id, and when you already hold an event, keep the copy you have.
Keep your copy because the file is built from Impel's data as it stands on the day of the export, while webhook events are fixed when they're created. The same event_id can therefore carry different values in the two places:
consumer_creatednames and contacts are the consumer's current name and the current contact details from their lead.consumer_createdtimestamp moves earlier if an older message has since been tied to that consumer.- Outbound messages that were corrected or enriched in the meantime carry the current values, such as the message text or
opportunity_id. - Inbound messages that were corrected become a different event with a new
event_id, in both the file and the webhook.
There's one gap to be aware of. A message older than the dealer's webhook look-back, which Impel ties to its consumer only after the history file was sent, reaches you through neither path. Ask Impel for a re-export if you need it.
How far back it goes
The range is agreed with each partner: a number of months, or everything Impel holds for the dealer. Impel sends a dealer's history file when the dealer is onboarded, and can re-export it on request. A re-export is safe to ingest; it repeats events you already have, under a new file name. Impel never uploads an empty file.