Table: salesforce_contact - Query Salesforce Contacts using SQL
Salesforce Contacts is a feature within Salesforce CRM that allows businesses to store and manage information about their customers. It provides a centralized way to keep track of customer details, including their contact information, associated accounts, and any activities or opportunities related to them. Salesforce Contacts helps businesses stay informed about their customer base and maintain strong relationships with them.
Table Usage Guide
The salesforce_contact
table provides insights into Contacts within Salesforce CRM. As a sales representative or a customer relationship manager, explore contact-specific details through this table, including name, email, phone number, and associated account information. Utilize it to uncover information about contacts, such as those who are associated with specific accounts, the activities related to them, and their communication details.
Important Notes
- If the
naming_convention
configuration argument is set toapi_native
, please see API Native Examples.
Examples
Basic info
Explore the basic information of your Salesforce contacts to understand their source, department, and role within their organization. This can help in tailoring communication and marketing strategies to each contact.
select id, name, account_id, email, lead_source, title, departmentfrom salesforce_contact;
select id, name, account_id, email, lead_source, title, departmentfrom salesforce_contact;
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)
Discover the segments that allow you to gain insights into your contact list, such as identifying the associated account and department for each contact, without delving into overly technical details.
select "ID", "Name", "AccountID", "Email", "Department"from "Contact";
select "ID", "Name", "AccountID", "Email", "Department"from "Contact";
List deleted contacts
Uncover the details of contacts that have been deleted from your database. This can be useful for auditing purposes or for retrieving lost information.
select "ID", "Name", "AccountID", "Email", "Department"from "Contact"where "IsDeleted";
select "ID", "Name", "AccountID", "Email", "Department"from "Contact"where "IsDeleted";
Show contacts created in last 30 days
Explore which contacts have been added within the past month. This can help you keep track of recent additions and ensure that no new contacts have been missed.
select "ID", "Name", "AccountID", "Email", "Department"from "Contact"where "CreatedDate" <= now() - interval '30' day;
select "ID", "Name", "AccountID", "Email", "Department"from "Contact"where "CreatedDate" <= datetime('now', '-30 day');
Schema for salesforce_contact
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
account_id | text | ID of the account that's the parent of this contact. | |
assistant_name | text | The Assistant's Name. | |
assistant_phone | text | The Assistant's Phone. | |
birthdate | timestamp with time zone | The contact's birthdate. | |
clean_status | text | Indicates the record's clean status. | |
created_by_id | text | The Created By ID. | |
created_date | timestamp with time zone | The Created Date. | |
department | text | The contact's department. | |
description | text | The description of the contact | |
text | The contact's email address. | ||
email_bounced_date | timestamp with time zone | If bounce management is activated and an email sent to the contact bounces, the date and time of the bounce. | |
email_bounced_reason | text | If bounce management is activated and an email sent to the contact bounces, the reason for the bounce. | |
fax | text | The contact's fax number. | |
home_phone | text | The contact's home telephone number. | |
id | text | ID of the account that's the parent of this contact. | |
individual_id | text | ID of the data privacy record associated with this contact. This field is available if Data Protection and Privacy is enabled. | |
is_deleted | boolean | Indicates whether the object has been moved to the Recycle Bin (true) or not (false). | |
is_email_bounced | boolean | If bounce management is activated and an email is sent to a contact, indicates whether the email bounced (true) or not (false). | |
jigsaw | text | The Data.com Key. | |
jigsaw_contact_id | text | References the company's ID in Data.com. If an account has a value in this field, it means that the account was imported from Data.com. | |
last_activity_date | timestamp with time zone | Value is the most recent of either: Due date of the most recent event logged against the record. Due date of the most recently close task associated with the record. | |
last_cu_request_date | timestamp with time zone | The Last Stay-in-Touch Request Date. | |
last_cu_update_date | timestamp with time zone | The Last Stay-in-Touch Save Date. | |
last_modified_by_id | text | The Last Modified By ID. | |
last_modified_date | timestamp with time zone | The Last Modified Date. | |
last_referenced_date | timestamp with time zone | The timestamp when the current user last accessed this record, a record related to this record, or a list view. | |
last_viewed_date | timestamp with time zone | The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it. | |
lead_source | text | The lead's source. | |
mailing_address | jsonb | The Mailing Address. | |
master_record_id | text | If this record was deleted as the result of a merge, this field contains the ID of the record that remains. | |
mobile_phone | text | Contact's mobile phone number. | |
name | text | The full name of the contact. | |
other_address | jsonb | The Other Address. | |
other_phone | text | The other phone of the contact. | |
owner_id | text | The ID of the owner of the account associated with this contact. | |
phone | text | Buisness telephone number for the contact. | |
photo_url | text | The Photo URL. | |
reports_to_id | text | The Reports To ID. | |
system_modstamp | timestamp with time zone | The System Modstamp. | |
title | text | Title of the contact, such as CEO or Vice President. |
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_contact