--- title: Sales CRM Pricing API description: The Sales CRM Pricing API provides methods to calculate prices for transaction lines containing products.Terminate a session with a given ID that was established during a configurator session.Enables callers to compute the price of products specified in the request payload. The pricing settings included in the payload determine and control the execution flow of the Pricing Engine, such as whether to apply validations, adjustments, or rollups. locale: en-US canonical_url: https://www.servicenow.com/docs/r/api-reference/rest-apis/sales-crm-pricing-api.html release: brazil product: REST APIs classification: rest-apis topic_type: concept last_updated: "2026-09-10" reading_time_minutes: 51 breadcrumb: [REST API reference, API reference, API implementation and reference] --- # Sales CRM Pricing API The Sales CRM Pricing API provides methods to calculate prices for transaction lines containing products. The Sales CRM Pricing is used to calculate prices for transaction lines containing products. It also supports computing rollups at the transaction header level by aggregating values from all lines. In addition, the Pricing Engine can be used within a configurator to determine the price of products as they are selected or configured. The caller has flexibility through various controls to specify whether the engine should compute: - Prices only - Costs - Adjustments \(discounts, markup\) - Rollups at line and/or header level This API belongs to the sn\_csm\_pricing namespace and requires the \[sn\_csm\_pricing.pricing\_integrator\] role. Prerequisite: You need to set up a product offering that consists of these properties: - Required: - Product offering characteristics - Unit of measure - Price list - Price list lines - Attribute adjustments - Optional - Context variables - Rule matrices ## External ID support With external ID resolution, you can use your own identifiers or codes for selected reference fields instead of a ServiceNow sys\_id. For example, you might be integrating with other CRM or ERP systems that do not have a ServiceNow sys\_id for its objects. You can use external codes for the following reference fields, including but not limited to: - Product offering - Price list - Unit of measure **Note:** External ID resolution applies to REST API pricing requests only and does not affect UI-based flows. Pricing execution can use internal system IDs, external IDs, or a combination of both IDs in pricing requests as configured in the context variable mapping. Context variable configuration and mapping As an admin, before submitting a REST API pricing request, create the context variables that define the reference fields for external IDs or codes that are participating in external ID resolution. You also add the external IDs or codes to the reference tables called by pricing requests. For details on defining context variables, see [External ID support in Sales CRM Pricing API](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/order-management/external-ids-pricingapi.md). How external IDs work in pricing requests **Request intake** The caller sends a Pricing REST API request that can include: - External IDs or codes - ServiceNow sys\_ids - A combination of both Requests must include \(`"use_external_code": true`\) in the settings object to enable external code resolution. **Parent Topic:**[REST API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-apis/api-rest.md) ## Sales CRM Pricing - DELETE - /api/sn\_csm\_pricing/v1/pricingengine/pricing\_context/\{pricing\_context\_id\} Terminate a session with a given ID that was established during a configurator session. ### URL format Versioned URL: `/api/sn_csm_pricing/v1/pricingengine/pricing_context/{pricing_context_id}` Default URL: `/api/sn_csm_pricing/pricingengine/pricing_context/{pricing_context_id}` ### Supported request parameters
| Name | Description |
|---|---|
| api\_version | Optional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String |
| pricing\_context\_id | ID from pricing engine request when scope is configurator. |
| Header | Description |
|---|---|
| Accept | Data format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Name | Description |
|---|---|
| header | Required. Contains transaction-level details, line items, currency, pricelist, and transaction date.Data type: Object ``` { "header": { "source_system": "String", "requesting_record_id": "String", "currency": "String", "lineItems": [Array], "pricelist": "String", "transaction_date": "String" } } ``` |
| header.source\_system | Required. The system initiating the request.Data type: String Example: `ServiceNow REST API` |
| header.requesting\_record\_id | Required. Unique identifier for this request.Data type: String Example: `QT0001101` |
| header.currency | Required. Currency code for pricing. Supports only ServiceNow currencies.Data type: String Example: `USD` |
| header.transaction\_date | Required. The date and time of the transaction.Format: Format: glide\_date\_time value, such as `yyyy-MM-dd HH:mm:ss` Data type: datetime Example: `2023-12-18 23:37:11` |
| header.pricelist | Required. The default pricelist ID to use for the transaction.Data type: String Example: `19d29513d0e63110f8770dbf976be122` |
| header.lineItems | Required. Array of line-item objects detailing products, quantities, and pricing info.``` { "lineItems": [ { "line_id": "String", "pricelist": "String", "product_offering": "String", "periodicity": "String", "quantity": "String", "unit_of_measure": "String", "transaction_date": "String", "account_tier": "String", "selected": "Boolean", "top_product_offer": "String", "parent_product_offer": "String", "settings": {Object} } ] } ``` |
| header.lineItems\[\].line\_id | Required. Unique identifier for this line item.Data type: String Example: `CONNECTEDC1100` |
| header.lineItems\[\].pricelist | Required. Pricelist ID for this line item.Data type: String Example: `19d29513d0e63110f8770dbf976be122` |
| header.lineItems\[\].product\_offering | Required. Product offering ID for this line item.Data type: String Example: `db61dd9fd0a63110f8770dbf976be19c` |
| header.lineItems\[\].periodicity | Identifies the frequency. Possible values are `monthly`, `annually`, or null/undefined.Data type: String Example: `monthly` |
| header.lineItems\[\].quantity | Required. Quantity of the product.Data type: String Example: `1` |
| header.lineItems\[\].unit\_of\_measure | Required. Unit of measure ID.Data type: String Example: `cb2795d553020110286eddeeff7b12ff` |
| header.lineItems\[\].transaction\_date | Required. Date of the transaction specific to this line item.Format: glide\_date\_time value Data type: datetime Example: `2023-12-18 23:37:11` |
| header.lineItems\[\].account\_tier | Optional account tier \(e.g., "gold"\) for pricing logic. If account\_tier is a context variable used in rule matrices.Data type: String |
| header.lineItems\[\].selected | Indicates if the line item is selected in a configurator scenario. Only applicable for child lines in bundle.Data type: Boolean Example: `true` |
| header.lineItems\[\].top\_product\_offer | Identifier for top-level product in a configuration bundle.Data type: String Example: `db61dd9fd0a63110f8770dbf976be19c` |
| header.lineItems\[\].parent\_product\_offer | Identifier for the parent product in a bundle line item.Data type: String Example: `26d07c3211707110f877366201dea60c` |
| settings | Required. Contains pricing engine settings and options.Data type: Object ``` { "settings": { "pricing_elements": "String", "disable_validation": boolean } } ``` |
| settings.pricing\_elements | Required. Comma-separated list of elements to return.Data type: String Example: `PRICE,COST,NET_PRICE,LINE_ROLLUPS,HEADER_ROLLUPS,ADJUSTMENTS` |
| settings.disable\_validation | Whether to disable validation checks on request.Data type: Boolean Example: `true` |
| settings.config\_lines\_expanded | Indicates if all the lines for bundle are sent on the request. At this moment, for configurator we expect all lines to be sent for every pricing call coming from configurator.Data type: Boolean Example: `true` |
| settings.scope | Scope of pricing.Data type: String Example: `configurator` |
| settings.config\_top\_line\_identifier | The line ID of the top-level product in configuration.Data type: String Example: `HOMEAUTOMA2000` |
| settings.use\_external\_code | Indicates if the system performs external code lookup.Data type: Boolean Example: `true` |
| Header | Description |
|---|---|
| Accept | Data format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Name | Description |
|---|---|
| header.currency | Currency code used in the pricing response. Similar to the one sent in the request.Data type: String Example: `USD` |
| header.costbook | Identifier of the costbook used for pricing.Data type: String \(Sys\_id\) |
| header.lineItems | Contains pricing details for each line item.Data type: Array<Object> ``` { "lineItems": [ { "line_id": "String", "status": "String", "currency": "String", "base_price": { "value": "String", "displayValue": "String" }, "list_price": { "value": "String", "displayValue": "String" }, "pricelist": "String", "quantity": "", "price_list_line": "String", "product_offering": "String", "one_time_price": { "value": "String", "displayValue": "String" }, "monthly_recurring_price": { "value": "String", "displayValue": "String" }, "annual_recurring_price": { "value": "String", "displayValue": "String" }, "unit_net_price": { "value": "String", "displayValue": "String" }, "cumulative_net_price": { "value": "String", "displayValue": "String" }, "cumulative_one_time_price": { "value": "String", "displayValue": "String" }, "cumulative_monthly_recurring_price": { "value": "String", "displayValue": "String" }, "cumulative_annual_recurring_price": { "value": "String", "displayValue": "String" }, "unit_adjustment": { "value": "String", "displayValue": "String" }, "term_month": { "value": Integer, "displayValue": Integer }, "cumulative_annual_recurring_price_v1": { "value": Integer, "displayValue": Integer }, "cumulative_monthly_recurring_price_v1": { "value": 0, "displayValue": 0 }, "total_recurring_price": { "value": "String", "displayValue": "String" }, "pricingAdjustments": [], "total_adjustment_amount": [] } ] } ``` |
| header.lineItems\[\].line\_id | Identifier of the line item.Data type: String Example: `CONNECTEDC1100` |
| header.lineItems\[\].status | Status of the pricing calculation for the line item.Valid options: - Success - Failure Data type: String Example: `Success` |
| header.lineItems\[\].base\_price | Base price before adjustments.Data type: Object ``` { "base_price": { "value": "String", "displayValue": "String" } } ``` |
| header.lineItems\[\].list\_price | List price which is base price and attribute adjustments included.Data type: Object ``` { "list_price": { "value": "String", "displayValue": "String" } } ``` |
| header.lineItems\[\].pricelist | Price list reference.Data type: String \(Sys\_id\) |
| header.lineItems\[\].quantity | Quantity sent as part of request.Data type: String Example: `1` |
| header.lineItems\[\].price\_list\_line | Price list line reference.Data type: String \(Sys\_id\) Example: `3e93e785d07a7910f8770dbf976be1ee` |
| header.lineItems\[\].product\_offering | Product offering reference.Data type: String \(Sys\_id\) Example: `db61dd9fd0a63110f8770dbf976be19c` |
| header.lineItems\[\].one\_time\_price | One-time price for the product, unit net price \* quantity.Data type: Object ``` { "one_time_price": { "value": "String", "displayValue": "String" } } ``` |
| header.lineItems\[\].monthly\_recurring\_price | Monthly recurring price for the product inclusive of all quantities.Data type: Object ``` { "monthly_recurring_price": { "value": Integer, "displayValue": Integer } } ``` |
| header.lineItems\[\].annual\_recurring\_price | Annual recurring price for the product inclusive of all quantities.Data type: Object ``` { "annual_recurring_price": { "value": "String", "displayValue": "String" } } ``` |
| header.lineItems\[\].unit\_net\_price | Net price per unit after auto adjustments.Data type: Object ``` { "unit_net_price": { "value": "String", "displayValue": "String" } } ``` |
| header.lineItems\[\].cumulative\_net\_price | \[One time price + \(Monthly Recurring price \* Term\)\] + \(if parent line\) sum of all CNP for immediate and grand child linesData type: Object ``` { "cumulative_net_price": { "value": "String", "displayValue": "String" } } ``` |
| header.lineItems\[\].cumulative\_one\_time\_price | For Child- One time price for the line item. For Parent line item - One time price for the line item + One time price for all child and grand child line items.Data type: Object ``` { "cumulative_one_time_price": { "value": "String", "displayValue": "String" } } ``` |
| header.lineItems\[\].cumulative\_monthly\_recurring\_price | If price method = recurring. Monthly Recurring price for the line + \(if parent line\) sum of all monthly recurring price of child lines.Data type: Object ``` { "cumulative_monthly_recurring_price": { "value": "String", "displayValue": "String" } } ``` |
| header.lineItems\[\].cumulative\_annual\_recurring\_price | If price method = recurring. Cumulative Monthly Recurring Price \* 12.Data type: Object ``` { "cumulative_annual_recurring_price": { "value": "String", "displayValue": "String" } } ``` |
| header.lineItems\[\].unit\_adjustment | Price adjustment applied per unit.Data type: Object ``` { "unit_adjustment": { "value": "String", "displayValue": "String" } } ``` |
| header.lineItems\[\].term\_month | Term duration in months.Data type: Object ``` { "term_month": { "value": Integer, "displayValue": Integer } } ``` |
| header.lineItems\[\].cost | Unit cost of the product.Data type: Object ``` { "cost": { "value": Integer, "displayValue": Integer } } ``` |
| header.lineItems\[\].unit\_margin\_amount | Profit margin amount per unit.Data type: Object ``` { "cost": { "value": Integer, "displayValue": Integer } } ``` |
| header.lineItems\[\].unit\_margin\_percentage | Profit margin percentage per unit.Data type: Object |
| header.lineItems\[\].one\_time\_cost | One-time cost for the product inclusive of all quantities.Data type: Object |
| header.lineItems\[\].monthly\_recurring\_cost | Monthly recurring cost for the product inclusive of all quantities.Data type: Object |
| header.lineItems\[\].cumulative\_one\_time\_cost | For Child- One time cost for the line item. For Parent line item - One time cost for the line item + One time cost for all child and grand child line items.Data type: Object |
| header.lineItems\[\].cumulative\_monthly\_recurring\_cost | If price method = recurring. Monthly Recurring cost for the line + \(if parent line\) sum of all monthly recurring cost of child lines.Data type: Object |
| header.lineItems\[\].cumulative\_net\_cost | \[One time cost + \(Monthly Recurring cost \* Term\)\] + \(if parent line\) sum of all CNC for immediate and grand child linesData type: Object |
| header.lineItems\[\].cumulative\_margin\_percentage | Overall margin percentage.Data type: Object |
| header.status | Status of the overall pricing request.Valid options are: - Success - Failure - Partial Failure Data type: String Example: `Success` |
| header.total\_monthly\_recurring\_price | Aggregated monthly recurring price.Data type: Object |
| header.total\_annual\_recurring\_price | Aggregated annual recurring price.Data type: Object |
| header.total\_amount | Total transaction amount.Data type: Object |
| header.total\_one\_time\_price | Aggregated one-time price.Data type: Object |
| header.total\_one\_time\_cost | Aggregated one-time cost.Data type: Object |
| header.total\_monthly\_cost | Aggregated monthly cost.Data type: Object |
| header.total\_cost | Total cost \(one-time + recurring\).Data type: Object |
| header.total\_one\_time\_margin | Total margin from one-time charges.Data type: Object |
| header.total\_monthly\_margin | Total margin from monthly charges.Data type: Object |
| header.total\_margin\_amount | Total profit margin amount.Data type: Object |
| header.total\_one\_time\_margin\_percentage | Margin percentage for one-time charges.Data type: Object |
| header.total\_monthly\_margin\_percentage | Margin percentage for monthly charges.Data type: Object |
| header.total\_margin\_percentage | Overall margin percentage.Data type: Object |
| settings.pricing\_elements | Elements included in the pricing response \(PRICE, COST, NET\_PRICE, etc.\).Data type: String |
| settings.pricing\_context\_id | Identifier for pricing session when scope is configurator.Data type: String |