linkedin_messages


Description

{“what”:“Inbound/outbound LinkedIn messages synced from Unipile; one row per message.”,“why”:“Central record for all LinkedIn conversations; without it no unified message history.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:16:29.952684900+00:00”}

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id serial 10 √ nextval('linkedin_messages_id_seq'::regclass)

{“what”:“Surrogate primary key; internal row identifier.”,“why”:“Stable reference for joins and updates; without it no unique row identity.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:16:30.002506014+00:00”}

unipile_msg_id text 2147483647 null

{“what”:“Unipile’s message ID; unique external identifier.”,“why”:“Deduplicates syncs and maps to Unipile API; without it duplicates or missed updates.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:16:30.042439634+00:00”}

chat_id text 2147483647 null

{“what”:“Unipile chat/conversation ID; groups messages in a thread.”,“why”:“Groups messages into conversations; without it thread context is lost.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:16:30.086100442+00:00”}

sender_name text 2147483647 √ null

{“what”:“Display name of the message sender as provided by LinkedIn.”,“why”:“Shows who sent without resolving contact; without it sender identity is opaque.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:16:30.561815711+00:00”}

sender_id text 2147483647 √ null

{“what”:“LinkedIn profile ID of the sender.”,“why”:“Links to sender profile; without it cannot correlate with contact records.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:16:30.575317060+00:00”}

is_me bool 1 null

{“what”:“True if the message was sent by the authenticated user.”,“why”:“Distinguishes outbound from inbound; without it direction is ambiguous.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:16:30.647165431+00:00”}

body text 2147483647 √ null

{“what”:“Message text content; may be empty or null for non-text.”,“why”:“Provides the actual message; without it content is missing.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:16:30.671418291+00:00”}

timestamp timestamptz 35,6 null

{“what”:“UTC timestamp when the message was sent.”,“why”:“Orders messages and computes reply latency; without it chronology is unknown.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:16:30.716745584+00:00”}

is_read bool 1 √ false

{“what”:“True if the message has been read by the recipient.”,“why”:“Tracks engagement; without it read status is unknown.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:16:30.756951393+00:00”}

contact_id int4 10 √ null

{“what”:“Foreign key to the contact associated with this message.”,“why”:“Links message to a known contact; without it contact relationship is lost.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:16:30.811672450+00:00”}

business_id int4 10 √ null

{“what”:“Foreign key to the business account this message belongs to.”,“why”:“Scopes messages per business; without it multi-tenant isolation fails.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:16:30.876206879+00:00”}

matched_touch_id int4 10 √ null

{“what”:“Foreign key to the matched outreach touch that triggered this message.”,“why”:“Ties message to a campaign step; without it attribution to outreach is lost.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:16:30.907224429+00:00”}

is_reply bool 1 √ false

{“what”:“True if this message is a reply to a prior message.”,“why”:“Identifies responses; without it cannot distinguish replies from new messages.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:16:30.948686816+00:00”}

reply_latency_mins float8 17,17 √ null

{“what”:“Minutes between the previous message and this reply.”,“why”:“Measures response time; without it responsiveness metrics are impossible.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:16:31.720558647+00:00”}

created_at timestamptz 35,6 √ now()

{“what”:“UTC timestamp when the row was inserted into the database.”,“why”:“Audit trail and sync ordering; without it record creation time is unknown.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:16:31.764759597+00:00”}

Indexes

Constraint Name Type Sort Column(s)
linkedin_messages_pkey Primary key Asc id
idx_li_chat Performance Asc chat_id
idx_li_contact Performance Asc contact_id
idx_li_timestamp Performance Asc timestamp
linkedin_messages_unipile_msg_id_key Must be unique Asc unipile_msg_id

Relationships