turbot/salesforce
steampipe plugin install salesforce

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 to api_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,
quantity
from
salesforce_asset;
select
id,
name,
price,
status,
asset_level,
contact_id,
quantity
from
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

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtextID of the Account associated with this asset.
asset_levelbigintThe asset's position in an asset hierarchy. If the asset has no parent or child assets, its level is 1.
asset_provided_by_idtextThe account that provided the asset, typically a manufacturer.
asset_serviced_by_idtextThe account in charge of servicing the asset.
contact_idtextID of the Contact associated with this asset.
created_by_idtextThe id of the user who created the asset.
created_datetimestamp with time zoneDate and time of the creation of the price book record.
descriptiontextDescription of the asset.
idtextUnique identifier of the product in asset.
install_datetimestamp with time zoneDate when the asset was installed.
is_competitor_productbooleanIndicates whether this Asset represents a product sold by a competitor (true) or not (false).
is_deletedbooleanThe Deleted.
is_internalbooleanIndicates that the asset is produced or used internally (true) or not (false). Default value is false.
last_modified_by_idtextThe Last Modified By ID.
last_modified_datetimestamp with time zoneThe Last Modified Date.
last_referenced_datetimestamp with time zoneThe date and time that the asset was last modified.
last_viewed_datetimestamp with time zoneThe date and time that the asset was last viewed.
nametextName of the asset.
owner_idtextThe asset's owner. By default, the asset owner is the user who created the asset record.
parent_idtextThe asset's parent asset.
pricedouble precisionPrice paid for this asset.
product_2_idtextID of the Product2 associated with this asset. Must be a valid Product2 ID.
product_codetextThe product code of the related product.
purchase_datetimestamp with time zoneDate on which this asset was purchased.
quantitydouble precisionQuantity purchased or installed.
root_asset_idtext 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_numbertextSerial number for this asset.
sp_connection_nametextSteampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statustextCustomizable picklist of values. The default picklist includes the following values: Purchased, Shipped, Installed, Registered, Obsolete.
stock_keeping_unittextThe SKU assigned to the related product.
system_modstamptimestamp with time zoneThe System Modstamp.
usage_end_datetimestamp with time zoneDate 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