-- Fetch all the Conversations belonging to the
-- Intercom account of a particular user.
SELECT *
FROM fiber.intercom_conversation
WHERE account_id = '{user.intercom_id}'
-- Fetch all the Conversations belonging to the
-- Intercom account of a particular user.
SELECT *
FROM fiber.intercom_conversation
WHERE account_id = '{user.intercom_id}'
Code
CREATE TABLE fiber.intercom_conversation (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
type TEXT,
title TEXT,
waiting_since INT,
snoozed_until INT,
open BOOLEAN,
state TEXT,
read BOOLEAN,
priority TEXT,
admin_assignee_id TEXT,
team_assignee_id TEXT,
tags JSONB,
conversation_rating JSONB,
source JSONB,
contacts JSONB,
teammates JSONB,
custom_attributes JSONB,
first_contact_reply JSONB,
sla_applied JSONB,
statistics JSONB,
conversation_parts JSONB,
linked_objects JSONB
)
CREATE TABLE fiber.intercom_conversation (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
type TEXT,
title TEXT,
waiting_since INT,
snoozed_until INT,
open BOOLEAN,
state TEXT,
read BOOLEAN,
priority TEXT,
admin_assignee_id TEXT,
team_assignee_id TEXT,
tags JSONB,
conversation_rating JSONB,
source JSONB,
contacts JSONB,
teammates JSONB,
custom_attributes JSONB,
first_contact_reply JSONB,
sla_applied JSONB,
statistics JSONB,
conversation_parts JSONB,
linked_objects JSONB
)
Model definition