turbot/salesforce
steampipe plugin install salesforce

Table: salesforce_account - Query Salesforce Accounts using SQL

Salesforce Accounts are companies or individuals that are involved in a business relationship. These can include customers, competitors, and partners. Accounts are used to store information such as name, address, and phone numbers, for easy reference.

Table Usage Guide

The salesforce_account table provides insights into Salesforce Accounts. As a Sales or CRM Manager, explore account-specific details through this table, including name, address, and phone numbers. Utilize it to uncover information about accounts, such as those with recent activities, the relationships between accounts, and the verification of account details.

Important Notes

  • If the naming_convention configuration argument is set to api_native, please see API Native Examples.

Examples

Basic info

Explore the general information about your Salesforce accounts, such as their names, descriptions, annual revenues, ownership types, industries, creation dates, ratings, and websites. This can help you gain insights into your accounts' performance, their industries, and how they have been rated over time.

select
id,
name,
description,
annual_revenue,
ownership,
industry,
created_date,
rating,
website
from
salesforce_account;
select
id,
name,
description,
annual_revenue,
ownership,
industry,
created_date,
rating,
website
from
salesforce_account;

List number of accounts by industry type

Discover the segments that each industry occupies in your Salesforce accounts. This can help you understand the distribution of your accounts across different industries, providing valuable insights for business strategy planning and decision making.

select
count(*),
industry
from
salesforce_account
group by
industry;
select
count(*),
industry
from
salesforce_account
group by
industry;

List number of accounts by ownership

Explore the distribution of accounts based on ownership to better understand the structure of your Salesforce accounts. This can help in assessing the balance of account ownership and strategizing future sales and marketing efforts.

select
count(*),
ownership
from
salesforce_account
group by
ownership;
select
count(*),
ownership
from
salesforce_account
group by
ownership;

List accounts with hot rating

This query can be used to identify high-priority accounts in your Salesforce database by finding those labeled with a 'Hot' rating. This can help sales teams focus their efforts on the most promising leads, improving efficiency and potentially increasing sales.

select
id,
name,
description,
annual_revenue,
ownership,
industry,
created_date,
rating,
website
from
salesforce_account
where
rating = 'Hot'
select
id,
name,
description,
annual_revenue,
ownership,
industry,
created_date,
rating,
website
from
salesforce_account
where
rating = 'Hot'

API Native Examples

If the naming_convention config argument is set to api_native, the table and column names will match Salesforce naming conventions.

Basic info (with API Native naming convention)

Gain insights into various aspects of your business accounts such as revenue, ownership, industry type, and rating. This query is useful for a comprehensive overview, helping in strategic decision-making and performance evaluation.

select
"ID",
"Name",
"Description",
"AnnualRevenue",
"Ownership",
"Industry",
"Rating"
from
"Account";
select
"ID",
"Name",
"Description",
"AnnualRevenue",
"Ownership",
"Industry",
"Rating"
from
"Account";

List number of accounts by industry type (with API Native naming convention)

Determine the distribution of accounts across different industry types. This can be useful for understanding the diversity of your client base and tailoring your services accordingly.

select
count(*),
"Industry"
from
"Account"
group by
"Industry";
select
count(*),
"Industry"
from
"Account"
group by
"Industry";

Show details about the turbot account

Gain insights into the Turbot account's details such as annual revenue, ownership, industry, and rating to better understand its financial and industrial standing.

select
"ID",
"Name",
"Description",
"AnnualRevenue",
"Ownership",
"Industry",
"Rating"
from
"Account"
where
"Name" = 'turbot';
select
"ID",
"Name",
"Description",
"AnnualRevenue",
"Ownership",
"Industry",
"Rating"
from
"Account"
where
"Name" = 'turbot';

Show customer accounts

Explore which customer accounts exist in your database to gain insights into their annual revenue, industry, and rating. This can help in understanding the financial health and industry distribution of your customer base.

select
"ID",
"Name",
"Description",
"AnnualRevenue",
"Ownership",
"Industry",
"Rating"
from
"Account"
where
"Type" = 'Customer';
select
"ID",
"Name",
"Description",
"AnnualRevenue",
"Ownership",
"Industry",
"Rating"
from
"Account"
where
"Type" = 'Customer';

Schema for salesforce_account

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
account_sourcetextThe source of the account record. For example, Advertisement, Data.com, or Trade Show.
annual_revenuedouble precisionEstimated annual revenue of the account.
billing_addressjsonbThe billing adress of the account.
clean_statustextIndicates the record's clean status as compared with Data.com. Values are: Matched, Different,Acknowledged,NotFound,Inactive,Pending, SelectMatch, or Skipped.
created_by_idtextThe id of the user who created the account.
created_datetimestamp with time zoneThe creation date and time of the account.
descriptiontextText description of the account.
idtextUnique identifier of the account in Salesforce.
industrytextPrimary business of account.
is_deletedbooleanIndicates whether the object has been moved to the Recycle Bin (true) or not (false).
last_modified_by_idtextThe id of the user who last changed the contact fields, including modification date and time.
last_modified_datetimestamp with time zoneThe date and time of last modification to account.
nametextName of the account.
number_of_employeesdouble precisionNumber of employees working at the company represented by this account.
owner_idtextThe ID of the user who currently owns this account. Default value is the user logged in to the API to perform the create.
ownershiptextOwnership type for the account, for example Private, Public, or Subsidiary.
phonetextThe contact's primary phone number.
ratingtextThe account's prospect rating, for example Hot, Warm, or Cold.
shipping_addressjsonbThe shipping adress of the account.
sictextStandard Industrial Classification code of the company's main business categorization, for example, 57340 for Electronics.
ticker_symboltextThe stock market symbol for this account.
tradestyletextA name, different from its legal name, that an org may use for conducting business. Similar to “Doing business as” or "DBA".
typetextType of account, for example, Customer, Competitor, or Partner.
websitetextThe website of this account, for example, www.acme.com.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- salesforce

You can pass the configuration to the command with the --config argument:

steampipe_export_salesforce --config '<your_config>' salesforce_account