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 toapi_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, websitefrom salesforce_account;
select id, name, description, annual_revenue, ownership, industry, created_date, rating, websitefrom 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(*), industryfrom salesforce_accountgroup by industry;
select count(*), industryfrom salesforce_accountgroup 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(*), ownershipfrom salesforce_accountgroup by ownership;
select count(*), ownershipfrom salesforce_accountgroup 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, websitefrom salesforce_accountwhere rating = 'Hot'
select id, name, description, annual_revenue, ownership, industry, created_date, rating, websitefrom salesforce_accountwhere 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
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
account_source | text | The source of the account record. For example, Advertisement, Data.com, or Trade Show. | |
annual_revenue | double precision | Estimated annual revenue of the account. | |
billing_address | jsonb | The billing adress of the account. | |
clean_status | text | Indicates the record's clean status as compared with Data.com. Values are: Matched, Different,Acknowledged,NotFound,Inactive,Pending, SelectMatch, or Skipped. | |
created_by_id | text | The id of the user who created the account. | |
created_date | timestamp with time zone | The creation date and time of the account. | |
description | text | Text description of the account. | |
id | text | Unique identifier of the account in Salesforce. | |
industry | text | Primary business of account. | |
is_deleted | boolean | Indicates whether the object has been moved to the Recycle Bin (true) or not (false). | |
last_modified_by_id | text | The id of the user who last changed the contact fields, including modification date and time. | |
last_modified_date | timestamp with time zone | The date and time of last modification to account. | |
name | text | Name of the account. | |
number_of_employees | double precision | Number of employees working at the company represented by this account. | |
owner_id | text | The ID of the user who currently owns this account. Default value is the user logged in to the API to perform the create. | |
ownership | text | Ownership type for the account, for example Private, Public, or Subsidiary. | |
phone | text | The contact's primary phone number. | |
rating | text | The account's prospect rating, for example Hot, Warm, or Cold. | |
shipping_address | jsonb | The shipping adress of the account. | |
sic | text | Standard Industrial Classification code of the company's main business categorization, for example, 57340 for Electronics. | |
ticker_symbol | text | The stock market symbol for this account. | |
tradestyle | text | A name, different from its legal name, that an org may use for conducting business. Similar to “Doing business as” or "DBA". | |
type | text | Type of account, for example, Customer, Competitor, or Partner. | |
website | text | The 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