title | description |
---|---|
Steampipe Table: salesforce_contract - Query Salesforce Contracts using SQL |
Allows users to query Salesforce Contracts, providing details about contracts, including their status, start and end dates, associated accounts, and other related information. |
Salesforce Contracts are a record of the agreements between your company and the customers. They contain details such as the contract term (start and end date), contract status, associated account, and other related information. Contracts in Salesforce help to maintain the details of the service or support agreed upon during a sale.
The salesforce_contract
table provides insights into contracts within Salesforce. As a Salesforce administrator, you can explore contract-specific details through this table, including the contract's status, its start and end dates, and the associated account. Use it to uncover information about contracts, such as those that are nearing their end dates, or to verify the details of a specific contract.
Important Notes
- If the
naming_convention
configuration argument is set toapi_native
, please see API Native Examples.
Gain insights into your company's contractual agreements, including the duration and status, to better manage your business relationships and plan for future engagements. This will assist in understanding the overall contract lifecycle within your organization.
select
id,
account_id,
contract_number,
contract_term,
end_date,
start_date,
company_signed_date,
status
from
salesforce_contract;
select
id,
account_id,
contract_number,
contract_term,
end_date,
start_date,
company_signed_date,
status
from
salesforce_contract;
Discover the contracts that have been signed in the past six months to understand the recent business dealings and their status. This can be useful in assessing the volume and nature of recent contractual agreements.
select
id,
account_id,
contract_number,
contract_term,
end_date,
start_date,
company_signed_date,
status
from
salesforce_contract
where
company_signed_date >= (current_date - interval '6' month);
select
id,
account_id,
contract_number,
contract_term,
end_date,
start_date,
company_signed_date,
status
from
salesforce_contract
where
company_signed_date >= date('now','-6 month');
This query allows you to analyze the distribution of contracts within your Salesforce data according to their status. It aids in assessing the overall contract management efficiency and identifying areas that might need attention or improvement.
select
count(*),
status
from
salesforce_contract
group by
status;
select
count(*),
status
from
salesforce_contract
group by
status;
If the naming_convention
config argument is set to api_native
, the table and column names will match Salesforce naming conventions.
Discover the segments that pertain to specific contract details such as term length and status. This can help in understanding the distribution and status of different contracts within an account.
select
"ID",
"AccountID",
"ContractNumber",
"ContractTerm",
"EndDate",
"StartDate",
"Status"
from
"Contract";
select
"ID",
"AccountID",
"ContractNumber",
"ContractTerm",
"EndDate",
"StartDate",
"Status"
from
"Contract";
Determine the distribution of contracts based on their status to understand the operational dynamics of your business. This can help you identify areas that may require attention or improvement.
select
count(*),
"Status"
from
"Contract"
group by
"Status";
select
count(*),
"Status"
from
"Contract"
group by
"Status";
Explore which contracts are still in draft status to understand potential upcoming agreements and their terms. This could help in planning resources or assessing future commitments.
select
"ID",
"AccountID",
"ContractNumber",
"ContractTerm",
"EndDate",
"StartDate",
"Status"
from
"Contract"
where
"Status" = 'Draft';
select
"ID",
"AccountID",
"ContractNumber",
"ContractTerm",
"EndDate",
"StartDate",
"Status"
from
"Contract"
where
"Status" = 'Draft';
Discover the contracts that have been deleted to understand any potential impact on business operations or account management. This can be useful in identifying gaps in service or potential revenue loss.
select
"ID",
"AccountID",
"ContractNumber",
"ContractTerm",
"EndDate",
"StartDate",
"Status"
from
"Contract"
where
"IsDeleted";
select
"ID",
"AccountID",
"ContractNumber",
"ContractTerm",
"EndDate",
"StartDate",
"Status"
from
"Contract"
where
"IsDeleted";