-- Fetch all the Accounts belonging to the Salesloft
-- account of a particular user.
SELECT *
FROM fiber.salesloft_account
WHERE account_id = '{user.salesloft_id}'
-- Fetch all the Accounts belonging to the Salesloft
-- account of a particular user.
SELECT *
FROM fiber.salesloft_account
WHERE account_id = '{user.salesloft_id}'
Code
CREATE TABLE fiber.salesloft_account (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
archived_at TIMESTAMP WITH TIME ZONE,
name TEXT,
domain TEXT,
conversational_name TEXT,
description TEXT,
phone TEXT,
website TEXT,
linkedin_url TEXT,
twitter_handle TEXT,
street TEXT,
city TEXT,
state TEXT,
postal_code TEXT,
country TEXT,
locale TEXT,
industry TEXT,
company_type TEXT,
founded TEXT,
revenue_range TEXT,
size TEXT,
crm_id TEXT,
crm_url TEXT,
crm_object_type TEXT,
owner_crm_id TEXT,
last_contacted_at TIMESTAMP WITH TIME ZONE,
do_not_contact BOOLEAN,
custom_fields JSONB,
user_relationships JSONB,
tags TEXT[],
counts JSONB,
owner JSONB,
creator JSONB,
last_contacted_by JSONB,
last_contacted_person JSONB,
company_stage JSONB,
account_tier JSONB
)
CREATE TABLE fiber.salesloft_account (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
archived_at TIMESTAMP WITH TIME ZONE,
name TEXT,
domain TEXT,
conversational_name TEXT,
description TEXT,
phone TEXT,
website TEXT,
linkedin_url TEXT,
twitter_handle TEXT,
street TEXT,
city TEXT,
state TEXT,
postal_code TEXT,
country TEXT,
locale TEXT,
industry TEXT,
company_type TEXT,
founded TEXT,
revenue_range TEXT,
size TEXT,
crm_id TEXT,
crm_url TEXT,
crm_object_type TEXT,
owner_crm_id TEXT,
last_contacted_at TIMESTAMP WITH TIME ZONE,
do_not_contact BOOLEAN,
custom_fields JSONB,
user_relationships JSONB,
tags TEXT[],
counts JSONB,
owner JSONB,
creator JSONB,
last_contacted_by JSONB,
last_contacted_person JSONB,
company_stage JSONB,
account_tier JSONB
)
Model definition