Table: salesforce_asset - Query Salesforce Assets using SQL
Salesforce Assets are items that a company has sold, such as products or services. These assets are associated with a customer's account and can be used to track items like warranty or service information. Assets in Salesforce provide a comprehensive view of customers' purchased products, helping businesses understand their customers' needs and provide better service.
Table Usage Guide
The salesforce_asset
table enables users to gain insights into the assets associated with specific accounts in Salesforce. As a sales or customer service professional, you can utilize this table to track detailed information about sold products or services, including their purchase dates, values, and statuses. This information can be beneficial in understanding customer trends, managing warranties, and improving overall customer service.
Important Notes
- If the
naming_convention
configuration argument is set toapi_native
, please see API Native Examples.
Examples
Basic info
This example helps you understand the basic details of your assets in Salesforce, such as their ID, name, price, status, and quantity. It's useful for getting a quick overview of your assets and their associated contacts, which can aid in tracking asset performance and managing resources.
select id, name, price, status, asset_level, contact_id, quantityfrom salesforce_asset;
select id, name, price, status, asset_level, contact_id, quantityfrom salesforce_asset;
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)
Determine the areas in which your assets are allocated by assessing their price, quantity, and status. This can help you manage your resources more effectively and identify areas for potential improvement.
select "ID", "Name", "Price", "Status", "Quantity"from "Asset";
select "ID", "Name", "Price", "Status", "Quantity"from "Asset";
List shipped assets
Explore which assets have been shipped to manage inventory and ensure accurate tracking of asset movement. This is particularly useful for businesses to keep track of their resources and improve their asset management strategies.
select "ID", "Name", "Price", "Status", "Quantity"from "Asset"where "Status" = 'Shipped';
select "ID", "Name", "Price", "Status", "Quantity"from "Asset"where "Status" = 'Shipped';
List internal assets
Analyze your company's internal assets to gain insights into their status, quantity, and value. This can help in better resource allocation and financial planning.
select "ID", "Name", "Price", "Status", "Quantity"from "Asset"where "IsInternal";
select "ID", "Name", "Price", "Status", "Quantity"from "Asset"where "IsInternal";
Schema for salesforce_asset
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | ID of the Account associated with this asset. | |
asset_level | bigint | The asset's position in an asset hierarchy. If the asset has no parent or child assets, its level is 1. | |
asset_provided_by_id | text | The account that provided the asset, typically a manufacturer. | |
asset_serviced_by_id | text | The account in charge of servicing the asset. | |
contact_id | text | ID of the Contact associated with this asset. | |
created_by_id | text | The id of the user who created the asset. | |
created_date | timestamp with time zone | Date and time of the creation of the price book record. | |
description | text | Description of the asset. | |
id | text | Unique identifier of the product in asset. | |
install_date | timestamp with time zone | Date when the asset was installed. | |
is_competitor_product | boolean | Indicates whether this Asset represents a product sold by a competitor (true) or not (false). | |
is_deleted | boolean | The Deleted. | |
is_internal | boolean | Indicates that the asset is produced or used internally (true) or not (false). Default value is false. | |
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 date and time that the asset was last modified. | |
last_viewed_date | timestamp with time zone | The date and time that the asset was last viewed. | |
name | text | Name of the asset. | |
owner_id | text | The asset's owner. By default, the asset owner is the user who created the asset record. | |
parent_id | text | The asset's parent asset. | |
price | double precision | Price paid for this asset. | |
product_2_id | text | ID of the Product2 associated with this asset. Must be a valid Product2 ID. | |
product_code | text | The product code of the related product. | |
purchase_date | timestamp with time zone | Date on which this asset was purchased. | |
quantity | double precision | Quantity purchased or installed. | |
root_asset_id | text | The top-level asset in an asset hierarchy. Depending on where an asset lies in the hierarchy, its root could be the same as its parent. | |
serial_number | text | Serial number for this asset. | |
sp_connection_name | text | Steampipe connection name. | |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | Customizable picklist of values. The default picklist includes the following values: Purchased, Shipped, Installed, Registered, Obsolete. | |
stock_keeping_unit | text | The SKU assigned to the related product. | |
system_modstamp | timestamp with time zone | The System Modstamp. | |
usage_end_date | timestamp with time zone | Date when usage for this asset ends or expires. |
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_asset