-- Fetch all the Campaigns belonging to the Reply.io 
-- account of a particular user. 
SELECT *
FROM fiber.replyio_campaign
WHERE account_id = '{user.replyio_id}'
-- Fetch all the Campaigns belonging to the Reply.io 
-- account of a particular user. 
SELECT *
FROM fiber.replyio_campaign
WHERE account_id = '{user.replyio_id}'
Code
CREATE TABLE fiber.replyio_campaign (
  id TEXT NOT NULL,
  created_at TIMESTAMP WITH TIME ZONE,
  updated_at TIMESTAMP WITH TIME ZONE,
  account_id TEXT,
  name TEXT,
  status INT,
  email_accounts TEXT[],
  owner_email TEXT,
  deliveries_count INT,
  opens_count INT,
  replies_count INT,
  bounces_count INT,
  opt_outs_count INT,
  out_of_office_count INT,
  people_count INT,
  people_finished INT,
  people_active INT,
  people_paused INT
)
CREATE TABLE fiber.replyio_campaign (
  id TEXT NOT NULL,
  created_at TIMESTAMP WITH TIME ZONE,
  updated_at TIMESTAMP WITH TIME ZONE,
  account_id TEXT,
  name TEXT,
  status INT,
  email_accounts TEXT[],
  owner_email TEXT,
  deliveries_count INT,
  opens_count INT,
  replies_count INT,
  bounces_count INT,
  opt_outs_count INT,
  out_of_office_count INT,
  people_count INT,
  people_finished INT,
  people_active INT,
  people_paused INT
)
Model definition