{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":540,"path":"api-reference/rest-apis/sales-crm-pricing-api.md","title":"Sales CRM Pricing API","bundle":null,"doc_type":null,"release":"australia","body":"\n# Sales CRM Pricing API\n\nThe Sales CRM Pricing API provides methods to calculate prices for transaction lines containing products.\n\nThe 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.\n\nThe caller has flexibility through various controls to specify whether the engine should compute:\n\n-   Prices only\n-   Costs\n-   Adjustments \\(discounts, markup\\)\n-   Rollups at line and/or header level\n\nThis API belongs to the sn\\_csm\\_pricing namespace and requires the \\[sn\\_csm\\_pricing.pricing\\_integrator\\] role.\n\nPrerequisite: You need to set up a product offering that consists of these properties:\n\n-   Required:\n    -   Product offering characteristics\n    -   Unit of measure\n    -   Price list\n    -   Price list lines\n    -   Attribute adjustments\n-   Optional\n    -   Context variables\n    -   Rule matrices\n\n## External ID support\n\nWith 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:\n\n-   Product offering\n-   Price list\n-   Unit of measure\n\n**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.\n\nContext variable configuration and mapping\n\nAs 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/australia/markdown/order-management/external-ids-pricingapi.md).\n\nHow external IDs work in pricing requests\n\n**Request intake**\n\nThe caller sends a Pricing REST API request that can include:\n\n-   External IDs or codes\n-   ServiceNow sys\\_ids\n-   A combination of both\n\nRequests must include \\(`\"use_external_code\": true`\\) in the settings object to enable external code resolution.\n\n-   **[Sales CRM Pricing - DELETE - /api/sn\\_csm\\_pricing/v1/pricingengine/pricing\\_context/\\{pricing\\_context\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/sales_crm_pricing-DELETE-pricing-context-id.md)**  \nTerminate a session with a given ID that was established during a configurator session.\n-   **[Sales CRM Pricing - POST /api/sn\\_csm\\_pricing/\\{api\\_version\\}/pricingengine/computePrice](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/sales_crm_pricing-POST-compute-price.md)**  \nEnables 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.\n\n**Parent Topic:**[REST API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/api-rest.md)\n\n"}}