Vertriebs-CRM-Preise – NACH /api/sn_csm_pricing/{api_Version}/pricingengine/computePrice
Ermöglicht Anrufern, den Preis der in der Anforderungsnutzlast angegebenen Produkte zu berechnen. Die in der Nutzlast enthaltenen Preiseinstellungen bestimmen und steuern den Ausführungs-Flow der Preisgestaltungsmaschine, z. B. ob Validierungen, Anpassungen oder Rollups angewendet werden sollen.
URL-Format
Versionierte URL: /api/sn_csm_pricing/{api_Version}/pricingengine/computePrice
Standard-URL:
Unterstützte Anforderungsparameter
| Name | Beschreibung |
|---|---|
| Keine |
| Name | Beschreibung |
|---|---|
| Keine |
| Name | Beschreibung |
|---|---|
| header | Erforderlich. Enthält Details auf Transaktionsebene, Einzelposten, Währung, Preisliste und Transaktionsdatum. Datentyp: Objekt |
| Header.Source_System | Erforderlich. Das System, das die Anforderung initiiert. Datentyp: Zeichenfolge Beispiel: |
| Header.Request_Record_ID | Erforderlich. Eindeutiger Bezeichner für diese Anforderung. Datentyp: Zeichenfolge Beispiel: |
| Header.Währung | Erforderlich. Währungscode für Preisgestaltung. Unterstützt nur ServiceNow-Währungen. Datentyp: Zeichenfolge Beispiel: |
| Header.transaction_date | Erforderlich. Datum und Uhrzeit der Transaktion. Format: Format: Glide_date_time-Wert, z. B. Datentyp: Datetime Beispiel: |
| Header.Preisliste | Erforderlich. Die Standardpreisliste-ID, die für die Transaktion verwendet werden soll. Datentyp: Zeichenfolge Beispiel: |
| Header.lineElemente | Erforderlich. Array von Einzelobjekten, die Produkte, Mengen und Preisinformationen beschreiben. |
| Header.lineItems[].line_ID | Erforderlich. Eindeutiger Bezeichner für diese Position. Datentyp: Zeichenfolge Beispiel: |
| Header.lineItems[].Preisliste | Erforderlich. Preislisten-ID für diese Position. Datentyp: Zeichenfolge Beispiel: |
| Header.lineItems[].Product_Offering | Erforderlich. Produktangebots-ID für diese Position. Datentyp: Zeichenfolge Beispiel: |
| Header.lineItems[].Periodizität | Gibt die Häufigkeit an. Mögliche Werte sind Monatlich , Jährlich , Oder null/nicht definiert.Datentyp: Zeichenfolge Beispiel: |
| Header.lineItems[].quantity | Erforderlich. Menge des Produkts. Datentyp: Zeichenfolge Beispiel: |
| Header.lineItems[].unit_of_measure | Erforderlich. Maßeinheiten-ID. Datentyp: Zeichenfolge Beispiel: |
| Header.lineItems[].transaction_date | Erforderlich. Datum der Transaktion, die für diese Position spezifisch ist. Format: Glide_date_time-Wert Datentyp: Datetime Beispiel: |
| Header.lineItems[].Account_Tier | Optionale Account-Stufe (z. B. „Gold“) für Preisgestaltungslogik. Wenn Account_Tier eine Kontextvariable ist, die in Regelmatrizen verwendet wird. Datentyp: Zeichenfolge |
| Header.lineItems[].ausgewählt | Gibt an, ob die Position in einem Konfiguratorszenario ausgewählt ist. Gilt nur für untergeordnete Positionen im Paket. Datentyp: Boolesch Beispiel: |
| Header.lineItems[].Top_Product_offer | Bezeichner für das Produkt der obersten Ebene in einem Konfigurationspaket. Datentyp: Zeichenfolge Beispiel: |
| Header.lineItems[].parent_Product_offer | Bezeichner für das übergeordnete Produkt in einer Bündelposition. Datentyp: Zeichenfolge Beispiel: |
| -Einstellungen | Erforderlich. Enthält Einstellungen und Optionen für Preisgestaltungsmodul. Datentyp: Objekt |
| Einstellungen.pricing_Elements | Erforderlich. Kommagetrennte Liste der zurückzugebenden Elemente. Datentyp: Zeichenfolge Beispiel: |
| Einstellungen.disable_validation | Gibt an, ob Validierungsprüfungen auf Anforderung deaktiviert werden sollen. Datentyp: Boolesch Beispiel: |
| Settings.config_lines_extended | Gibt an, ob alle Positionen für das Paket in der Anforderung gesendet werden. Derzeit erwarten wir für den Konfigurator, dass alle Positionen für jeden Preisanruf vom Konfigurator gesendet werden. Datentyp: Boolesch Beispiel: |
| Einstellungen.Umfang | Preisumfang. Datentyp: Zeichenfolge Beispiel: |
| settings.config_top_line_identifier | Die Positions-ID des Produkts der obersten Ebene in der Konfiguration. Datentyp: Zeichenfolge Beispiel: |
| settings.use_external_code | Gibt an, ob das System eine externe Codesuche durchführt. Datentyp: Boolesch Beispiel: |
Header
Die folgenden Anforderungs- und Antwort-Header gelten nur für diese HTTP-Aktion oder werden auf diese Aktion in einer bestimmten Weise angewendet. Eine Liste der allgemeinen Header, die in der REST-API verwendet werden, finden Sie unter Unterstützte REST-API-Header .
| Header | Beschreibung |
|---|---|
| Akzeptieren | Datenformat des Antworttexts. Unterstützte Typen: application/json oder application/xml. Standard: application/json |
| Header | Beschreibung |
|---|---|
| Keine |
Statuscodes
Die folgenden Statuscodes gelten für diese HTTP-Aktion. Eine Liste der möglichen Statuscodes, die in der REST-API verwendet werden, finden Sie unter REST-API-HTTP-Antwortcodes .
| Statuscode | Beschreibung |
|---|---|
| 200 | Erfolgreich. Die Anforderung wurde erfolgreich verarbeitet. |
Antworttext-Parameter (JSON oder XML)
| Name | Beschreibung |
|---|---|
| Header.Währung | Währungscode, der in der Preisgestaltungsantwort verwendet wird. Ähnlich dem in der Anforderung gesendeten. Datentyp: Zeichenfolge Beispiel: |
| Header.Kostenbuch | Bezeichner des Kostenbuchs, das für die Preisgestaltung verwendet wird. Datentyp: Zeichenfolge (SYS_ID) |
| Header.lineElemente | Enthält Preisdetails für jeden Einzelposten. Datentyp: Array<Object> |
| Header.lineItems[].line_ID | Bezeichner der Position. Datentyp: Zeichenfolge Beispiel: |
| Header.lineItems[].Status | Status der Preisberechnung für die Einzelposition. Gültige Optionen:
Datentyp: Zeichenfolge Beispiel: |
| Header.lineItems[].Base_price | Basispreis vor Anpassungen. Datentyp: Objekt |
| Header.lineItems[].list_price | Listenpreis, bei dem Basispreis und Attributanpassungen enthalten sind. Datentyp: Objekt |
| Header.lineItems[].Preisliste | Preislistenreferenz. Datentyp: Zeichenfolge (SYS_ID) |
| Header.lineItems[].quantity | Menge, die als Teil der Anforderung gesendet wurde. Datentyp: Zeichenfolge Beispiel: |
| Header.lineItems[].price_list_line | Referenz für Preislistenposition. Datentyp: Zeichenfolge (SYS_ID) Beispiel: |
| Header.lineItems[].Product_Offering | Produktangebotsreferenz. Datentyp: Zeichenfolge (SYS_ID) Beispiel: |
| Header.lineItems[].one_time_price | Einmaliger Preis für das Produkt, Nettopreis pro Einheit * Menge. Datentyp: Objekt |
| Header.lineItems[].monatlich_recurring_price | Wiederkehrender monatlicher Preis für das Produkt einschließlich aller Mengen. Datentyp: Objekt |
| Header.lineItems[].annual_recurring_price | Wiederkehrender Jahrespreis für das Produkt einschließlich aller Mengen. Datentyp: Objekt |
| Header.lineItems[].unit_net_price | Nettopreis pro Einheit nach automatischen Anpassungen. Datentyp: Objekt |
| Header.lineItems[].cumulative_net_price | [Einmaliger Preis + (wiederkehrender monatlicher Preis * Laufzeit)] + (wenn übergeordnete Position) Summe aller CNP für sofort- und untergeordnete Endanzeilen Datentyp: Objekt |
| Header.lineItems[].cumulative_one_time_price | Für untergeordnetes Element: Einmaliger Preis für die Einzelposition. Für übergeordnete Position: Einmaliger Preis für die Einzelposition + einmaliger Preis für alle untergeordneten und untergeordneten Gesamtpositionen. Datentyp: Objekt |
| Header.lineItems[].cumulative_monthly_recurring_price | Wenn Preismethode = wiederkehrend. Wiederkehrender monatlicher Preis für die Position + (wenn übergeordnete Position) Summe aller wiederkehrenden monatlichen Preise der untergeordneten Positionen. Datentyp: Objekt |
| Header.lineItems[].cumulative_annual_recurring_price | Wenn Preismethode = wiederkehrend. Kumulativer Wiederkehrender Monatlicher Preis * 12. Datentyp: Objekt |
| Header.lineItems[].unit_adjustment | Preisanpassung pro Einheit angewendet. Datentyp: Objekt |
| Header.lineItems[].term_month | Laufzeit in Monaten. Datentyp: Objekt |
| Header.lineItems[].Cost | Stückkosten des Produkts. Datentyp: Objekt |
| Header.lineItems[].unit_margin_amount | Gewinnmargenbetrag pro Einheit. Datentyp: Objekt |
| Header.lineItems[].unit_margin_percentage | Gewinnmargenprozentsatz pro Einheit. Datentyp: Objekt |
| Header.lineItems[].one_time_Cost | Einmalige Kosten für das Produkt einschließlich aller Mengen. Datentyp: Objekt |
| Header.lineItems[].monatlich_recurring_Cost | Monatliche wiederkehrende Kosten für das Produkt einschließlich aller Mengen. Datentyp: Objekt |
| Header.lineItems[].cumulative_one_time_cost | Für untergeordnetes Element: Einmalige Kosten für die Einzelposition. Für übergeordnete Position: Einmalige Kosten für die Einzelposition + einmalige Kosten für alle untergeordneten und untergeordneten Gesamtpositionen. Datentyp: Objekt |
| Header.lineItems[].cumulative_monthly_recurring_cost | Wenn Preismethode = wiederkehrend. Monatliche wiederkehrende Kosten für die Position + (wenn übergeordnete Position) Summe aller monatlichen wiederkehrenden Kosten untergeordneter Positionen. Datentyp: Objekt |
| Header.lineItems[].cumulative_net_Cost | [Einmalige Kosten + (monatliche wiederkehrende Kosten * Laufzeit)] + (bei übergeordneter Position) Summe aller CNC-Positionen für sofort- und untergeordnete Endanzeilen Datentyp: Objekt |
| Header.lineItems[].cumulative_margin_percentage | Prozentsatz der Gesamtmarge. Datentyp: Objekt |
| Header.Status | Status der allgemeinen Preisanforderung. Gültige Optionen sind:
Datentyp: Zeichenfolge Beispiel: |
| header.total_monthly_recurring_price | Zusammengefasster wiederkehrender monatlicher Preis. Datentyp: Objekt |
| header.total_annual_recurring_price | Zusammengefasster wiederkehrender Jahrespreis. Datentyp: Objekt |
| Header.total_amount | Transaktionsgesamtbetrag. Datentyp: Objekt |
| header.total_one_time_price | Zusammengefasster einmaliger Preis. Datentyp: Objekt |
| header.total_one_time_cost | Zusammengefasste einmalige Kosten. Datentyp: Objekt |
| Header.total_monatlich_Cost | Zusammengefasste monatliche Kosten. Datentyp: Objekt |
| Header.total_Cost | Gesamtkosten (einmalig + wiederkehrend). Datentyp: Objekt |
| header.total_one_time_margin | Gesamtmarge aus einmaligen Gebühren. Datentyp: Objekt |
| Header.total_monatlich_Marge | Gesamtmarge aus monatlichen Gebühren. Datentyp: Objekt |
| Header.total_margin_amount | Gesamtbetrag der Gewinnmarge. Datentyp: Objekt |
| header.total_one_time_margin_percentage | Margenprozentsatz für einmalige Gebühren. Datentyp: Objekt |
| header.total_monthly_margin_percentage | Margenprozentsatz für monatliche Gebühren. Datentyp: Objekt |
| Header.total_margin_percentage | Prozentsatz der Gesamtmarge. Datentyp: Objekt |
| Einstellungen.pricing_Elements | Elemente, die in der Preisantwort enthalten sind (PRICE, COST, NET_PRICE usw.). Datentyp: Zeichenfolge |
| Settings.pricing_context_ID | Bezeichner für die Preisgestaltungssitzung, wenn der Umfang der Konfigurator ist. Datentyp: Zeichenfolge |
Beispielnutzung
- Berechnet einen Preis für ein einzelnes Produkt
- Berechnen Sie Preise für mehrere Produkte mit Header-Rollups
- Initiieren Sie eine Produktkonfigurationssitzung
- Produktkonfiguration aktualisieren (Merkmalsoption ändern)
Berechnen Sie den Preis für ein einzelnes Produkt
Dieses Beispiel demonstriert eine grundlegende Preisberechnung für ein einzelnes Produktangebot. Die API wird mit einem Einzelposten aufgerufen, und die Anforderung gibt an, dass PREIS, KOSTEN, NET_PRICE, LINE_ROLLUPS, HEADER_ROLLUPS und ANPASSUNGEN berechnet und zurückgegeben werden sollen. Dies ist eine grundlegende Anforderung zum Abrufen des Preises eines einzelnen Artikels ohne komplexe Konfigurationen oder Anpassungen.
Beispiel: Curl-Anforderung.
curl "https://instance.servicenow.com/api/sn_csm_pricing/v1/pricingengine/computePrice" \
--request POST \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data '{
"header": {
"source_system": "ServiceNow Headless API",
"requesting_record_id": "QT0001101",
"currency": "USD",
"lineItems": [
{
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "db61dd9fd0a63110f8770dbf976be19c",
"periodicity" : "",
"quantity": "1",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2023-12-18 23:37:11",
"line_id": "CONNECTEDC1100"
}
],
"pricelist": "19d29513d0e63110f8770dbf976be122",
"transaction_date": "2023-12-18 23:37:11"
},
"settings": {
"pricing_elements": "PRICE,COST,NET_PRICE,LINE_ROLLUPS,HEADER_ROLLUPS,ADJUSTMENTS",
"disable_validation": true
}
}' \
--user 'username:password'
{
"result": {
"header": {
"currency": "USD",
"lineItems": [
{
"line_id": "CONNECTEDC1100",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"list_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "",
"price_list_line": "3e93e785d07a7910f8770dbf976be1ee",
"product_offering": "db61dd9fd0a63110f8770dbf976be19c",
"one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_adjustment": {
"value": "0.0000",
"displayValue": "$0.00"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"cumulative_monthly_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"total_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricingAdjustments": [],
"total_adjustment_amount": []
}
],
"status": "Success",
"total_monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_monthly_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_annual_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_amount": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_amount_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_one_time_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_monthly_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_one_time_margin": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_monthly_margin": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_margin_amount": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_one_time_margin_percentage": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_monthly_margin_percentage": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_margin_percentage": {
"value": "0.0000",
"displayValue": "$0.00"
}
},
"settings": {
"pricing_elements": "PRICE,COST,NET_PRICE,LINE_ROLLUPS,HEADER_ROLLUPS,ADJUSTMENTS"
}
}
}
Berechnen Sie Preise für mehrere Produkte mit Header-Rollups
Dieses Beispiel zeigt, wie eine Liste mehrerer, eindeutiger Produkte gesendet wird, deren Preis in einer einzelnen Transaktion festgelegt werden soll. Ein wichtiger Unterschied in dieser Anforderung ist die Aufnahme, die mehrere Produkte in derselben Anforderung sendet. Dadurch wird das Preisgestaltungsmodul angewiesen, den individuellen Preis für jeden Einzelposten zu berechnen und die aggregierten Summen für die gesamte Anforderung zu berechnen und zurückzugeben.
Beispiel: Curl-Anforderung.
curl "https://instance.servicenow.com/api/sn_csm_pricing/v1/pricingengine/computePrice" \
--request POST \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data '{
"header": {
"source_system": "Test Source System",
"requesting_record_id": "QT0001101",
"currency": "USD",
"lineItems": [
{
"top_product_offer": "db61dd9fd0a63110f8770dbf976be19c",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "db61dd9fd0a63110f8770dbf976be19c",
"periodicity" : "",
"quantity": "1",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2023-12-18 23:37:11",
"line_id": "CONNECTEDC1000"
},
{
"top_product_offer": "9b61dd9fd0a63110f8770dbf976be1c6",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "9b61dd9fd0a63110f8770dbf976be1c6",
"periodicity" : "annually",
"quantity": "1",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2023-12-18 23:37:11",
"line_id": "AUTOCOLLIS1001"
},
{
"top_product_offer": "9361dd9fd0a63110f8770dbf976be1c4",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "9361dd9fd0a63110f8770dbf976be1c4",
"periodicity" : "annually",
"quantity": "1",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2023-12-18 23:37:11",
"line_id": "WIFIHOTSPOT1002"
}
],
"pricelist": "19d29513d0e63110f8770dbf976be122",
"transaction_date": "2023-12-18 23:37:11"
},
"settings": {
"pricing_elements": "PRICE,COST,NET_PRICE,LINE_ROLLUPS,HEADER_ROLLUPS,ADJUSTMENTS",
"disable_validation": true
}
}' \
--user 'username:password'
{
"result": {
"header": {
"currency": "USD",
"lineItems": [
{
"line_id": "CONNECTEDC1000",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"list_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "3e93e785d07a7910f8770dbf976be1ee",
"product_offering": "db61dd9fd0a63110f8770dbf976be19c",
"top_product_offer": "db61dd9fd0a63110f8770dbf976be19c",
"one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_adjustment": {
"value": "0.0000",
"displayValue": "$0.00"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricingAdjustments": [],
"total_adjustment_amount": []
},
{
"line_id": "AUTOCOLLIS1001",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "250.0000",
"displayValue": "$250.00"
},
"list_price": {
"value": "250.0000",
"displayValue": "$250.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "4dc32f85d07a7910f8770dbf976be197",
"product_offering": "9b61dd9fd0a63110f8770dbf976be1c6",
"top_product_offer": "9b61dd9fd0a63110f8770dbf976be1c6",
"one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"monthly_recurring_price": {
"value": "20.8333",
"displayValue": "$20.8333"
},
"annual_recurring_price": {
"value": "250.0000",
"displayValue": "$250.00"
},
"unit_net_price": {
"value": "250.0000",
"displayValue": "$250.00"
},
"cumulative_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_price": {
"value": "20.8333",
"displayValue": "$20.8333"
},
"cumulative_annual_recurring_price": {
"value": "250.0000",
"displayValue": "$250.00"
},
"unit_adjustment": {
"value": "0.0000",
"displayValue": "$0.00"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": "250.0000",
"displayValue": "$250.00"
},
"cumulative_monthly_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_recurring_price": {
"value": "250.0000",
"displayValue": "$250.00"
},
"pricingAdjustments": [],
"total_adjustment_amount": []
},
{
"line_id": "WIFIHOTSPOT1002",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "100.0000",
"displayValue": "$100.00"
},
"list_price": {
"value": "100.0000",
"displayValue": "$100.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "3ff3ef85d07a7910f8770dbf976be1ea",
"product_offering": "9361dd9fd0a63110f8770dbf976be1c4",
"top_product_offer": "9361dd9fd0a63110f8770dbf976be1c4",
"one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"monthly_recurring_price": {
"value": "8.3333",
"displayValue": "$8.3333"
},
"annual_recurring_price": {
"value": "100.0000",
"displayValue": "$100.00"
},
"unit_net_price": {
"value": "100.0000",
"displayValue": "$100.00"
},
"cumulative_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_price": {
"value": "8.3333",
"displayValue": "$8.3333"
},
"cumulative_annual_recurring_price": {
"value": "100.0000",
"displayValue": "$100.00"
},
"unit_adjustment": {
"value": "0.0000",
"displayValue": "$0.00"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": "100.0000",
"displayValue": "$100.00"
},
"cumulative_monthly_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_recurring_price": {
"value": "100.0000",
"displayValue": "$100.00"
},
"pricingAdjustments": [],
"total_adjustment_amount": []
}
],
"status": "Success",
"total_monthly_recurring_price": {
"value": "29.1666",
"displayValue": "$29.1666"
},
"total_monthly_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_annual_recurring_price": {
"value": "350.0000",
"displayValue": "$350.00"
},
"total_annual_recurring_price_v1": {
"value": "350.0000",
"displayValue": "$350.00"
},
"total_amount": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_amount_v1": {
"value": "350.0000",
"displayValue": "$350.00"
},
"total_one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_one_time_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_monthly_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_one_time_margin": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_monthly_margin": {
"value": "29.1666",
"displayValue": "$29.1666"
},
"total_margin_amount": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_one_time_margin_percentage": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_monthly_margin_percentage": {
"value": "100.0000",
"displayValue": "$100.00"
},
"total_margin_percentage": {
"value": "0.0000",
"displayValue": "$0.00"
}
},
"settings": {
"pricing_elements": "PRICE,COST,NET_PRICE,LINE_ROLLUPS,HEADER_ROLLUPS,ADJUSTMENTS"
}
}
}
Initiieren Sie eine Produktkonfigurationssitzung
Dieses Beispiel demonstriert, wie eine statusbehaftete Produktkonfigurationssitzung gestartet wird. Dies wird für komplexe Produkte verwendet, die als Paket mit mehreren Komponenten und anwenderauswählbaren Optionen verkauft werden. Indem wir den Bereich auf „Konfigurator“ festlegen, weisen wir das Preisgestaltungsmodul an, eine persistente Sitzung zu erstellen. Die Engine verarbeitet die gesamte Produkthierarchie, berechnet die Anfangspreise und gibt eine eindeutige price_context_ID zurück
Preisgestaltung_Kontext_ID Muss in allen nachfolgenden Anforderungen für diese Konfiguration erfasst und gesendet werden (z. B. wenn eine Menge geändert oder eine Option ausgewählt wird), um den Status der Sitzung beizubehalten.Beispiel: Curl-Anforderung.
curl "https://instance.servicenow.com/api/sn_csm_pricing/v1/pricingengine/computePrice" \
--request POST \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data '{
"header": {
"source_system": "ServiceNow Headless API",
"requesting_record_id": "QT0001101",
"currency": "USD",
"lineItems": [
{
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "26d07c3211707110f877366201dea60c",
"quantity": "1",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"periodicity" : "",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2025-08-28 22:46:39",
"selected": true,
"line_id": "HOMEAUTOMA2000"
},
{
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "fe5d203e11307110f877366201dea631",
"periodicity" : "",
"quantity": "3",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2025-08-28 22:46:39",
"selected": true,
"line_id": "DOORSENSOR1001"
},
{
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "3f6111dfd0a63110f8770dbf976be149",
"periodicity" : "",
"quantity": "1",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"characteristics": [
{
"characteristic": "4f31999fd0a63110f8770dbf976be178",
"characteristic_option": "0b31999fd0a63110f8770dbf976be179"
}
],
"transaction_date": "2025-08-28 22:46:39",
"selected": true,
"line_id": "HOMEAUTOMA1002"
},
{
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "376111dfd0a63110f8770dbf976be140",
"periodicity" : "monthly",
"quantity": "1",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2025-08-28 22:46:39",
"selected": true,
"line_id": "BASICMONIT1003"
},
{
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "e2619d9fd0a63110f8770dbf976be1ec",
"periodicity" : "monthly",
"quantity": "1",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2025-08-28 22:46:39",
"selected": true,
"line_id": "PREMMONIT2004"
},
{
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "3b6111dfd0a63110f8770dbf976be147",
"periodicity" : "monthly",
"quantity": "1",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2025-08-28 22:46:39",
"selected": true,
"line_id": "ULTIMONIT1005"
},
{
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "1761dd9fd0a63110f8770dbf976be196",
"periodicity" : "",
"quantity": "1",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2025-08-28 22:46:39",
"selected": true,
"line_id": "INDOORCAM1006"
},
{
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "6f6111dfd0a63110f8770dbf976be100",
"periodicity" : "",
"quantity": "1",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2025-08-28 22:46:39",
"selected": true,
"line_id": "OUTCAMERA1007"
},
{
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "1b20347e11307110f877366201dea67f",
"periodicity" : "",
"quantity": "3",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2025-08-28 22:46:39",
"selected": true,
"line_id": "WINSENSOR1008"
}
],
"pricelist": "19d29513d0e63110f8770dbf976be122",
"transaction_date": "2023-12-18 23:37:11"
},
"settings": {
"pricing_elements": "PRICE,COST,NET_PRICE,LINE_ROLLUPS,HEADER_ROLLUPS,ADJUSTMENTS",
"disable_validation": true,
"scope": "configurator",
"config_top_line_identifier": "HOMEAUTOMA2000",
"config_lines_expanded": false
}
}' \
--user 'username:password'
Beispielantwort:
Das folgende Ergebnis zeigt, dass der Anforderungsstatus erfolgreich ist.
{
"result": {
"header": {
"currency": "USD",
"lineItems": [
{
"line_id": "HOMEAUTOMA2000",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"list_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "d6792b8dd07a7910f8770dbf976be1f8",
"product_offering": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_net_price": {
"value": "200.0000",
"displayValue": "$200.00"
},
"cumulative_one_time_price": {
"value": "200.0000",
"displayValue": "$200.00"
},
"cumulative_monthly_recurring_price": {
"value": "105.0000",
"displayValue": "$105.00"
},
"cumulative_annual_recurring_price": {
"value": "1260.0000",
"displayValue": "$1,260.00"
},
"unit_adjustment": {
"value": "0.0000",
"displayValue": "$0.00"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_price_v1": {
"value": "105.0000",
"displayValue": "$105.00"
},
"total_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricingAdjustments": [],
"total_adjustment_amount": []
},
{
"line_id": "DOORSENSOR1001",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "10.0000",
"displayValue": "$10.00"
},
"list_price": {
"value": "10.0000",
"displayValue": "$10.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "3",
"price_list_line": "2ec2a745d07a7910f8770dbf976be159",
"product_offering": "fe5d203e11307110f877366201dea631",
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "24.0000",
"displayValue": "$24.00"
},
"monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_net_price": {
"value": "8.0000",
"displayValue": "$8.00"
},
"cumulative_net_price": {
"value": "24.0000",
"displayValue": "$24.00"
},
"cumulative_one_time_price": {
"value": "24.0000",
"displayValue": "$24.00"
},
"cumulative_monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_adjustment": {
"value": "-2.0000",
"displayValue": "($2.00)"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"cumulative_monthly_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"total_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricingAdjustments": [
{
"adjustment_type": {
"value": "a96c83d653dd91105c0eddeeff7b12d8",
"displayValue": "MARKDOWN_PER"
},
"adjustment_value": {
"value": 20.0,
"displayValue": "20"
},
"adjustment_amount": {
"value": -2.0,
"displayValue": "($2.00)"
},
"adjustment_amount_total": {
"value": -6.0,
"displayValue": "($6.00)"
},
"adjustment_description": {
"displayValue": "door sensor bundle discount"
},
"adjustment_sequence_id": {
"value": 1.0
},
"adjustment_matrix_type": {
"displayValue": "Configuration Component Price Adjustment"
},
"adjustment_basis": {
"value": "prv_price_point"
},
"price_point": {
"value": "net_price"
},
"pricing_plan_step": {
"value": "97b61272ffe722101fb14ad013cb14d7"
},
"running_price": {
"value": 8.0,
"displayValue": "$8.00"
}
}
],
"total_adjustment_amount": [
{
"pricePoint": "net_price",
"value": -6.0,
"displayValue": "($6.00)"
}
]
},
{
"line_id": "HOMEAUTOMA1002",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "100.0000",
"displayValue": "$100.00"
},
"list_price": {
"value": "100.0000",
"displayValue": "$100.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "fe912705d07a7910f8770dbf976be147",
"product_offering": "3f6111dfd0a63110f8770dbf976be149",
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "80.0000",
"displayValue": "$80.00"
},
"monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_net_price": {
"value": "80.0000",
"displayValue": "$80.00"
},
"cumulative_net_price": {
"value": "80.0000",
"displayValue": "$80.00"
},
"cumulative_one_time_price": {
"value": "80.0000",
"displayValue": "$80.00"
},
"cumulative_monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_adjustment": {
"value": "-20.0000",
"displayValue": "($20.00)"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"cumulative_monthly_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"total_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricingAdjustments": [
{
"adjustment_type": {
"value": "a96c83d653dd91105c0eddeeff7b12d8",
"displayValue": "MARKDOWN_PER"
},
"adjustment_value": {
"value": 20.0,
"displayValue": "20"
},
"adjustment_amount": {
"value": -20.0,
"displayValue": "($20.00)"
},
"adjustment_amount_total": {
"value": -20.0,
"displayValue": "($20.00)"
},
"adjustment_description": {
"displayValue": "home automation hub bundle discount"
},
"adjustment_sequence_id": {
"value": 1.0
},
"adjustment_matrix_type": {
"displayValue": "Configuration Component Price Adjustment"
},
"adjustment_basis": {
"value": "prv_price_point"
},
"price_point": {
"value": "net_price"
},
"pricing_plan_step": {
"value": "97b61272ffe722101fb14ad013cb14d7"
},
"running_price": {
"value": 80.0,
"displayValue": "$80.00"
}
}
],
"total_adjustment_amount": [
{
"pricePoint": "net_price",
"value": -20.0,
"displayValue": "($20.00)"
}
]
},
{
"line_id": "BASICMONIT1003",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "30.0000",
"displayValue": "$30.00"
},
"list_price": {
"value": "30.0000",
"displayValue": "$30.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "bc53e785d07a7910f8770dbf976be1e7",
"product_offering": "376111dfd0a63110f8770dbf976be140",
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"monthly_recurring_price": {
"value": "25.0000",
"displayValue": "$25.00"
},
"annual_recurring_price": {
"value": "300.0000",
"displayValue": "$300.00"
},
"unit_net_price": {
"value": "25.0000",
"displayValue": "$25.00"
},
"cumulative_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_price": {
"value": "25.0000",
"displayValue": "$25.00"
},
"cumulative_annual_recurring_price": {
"value": "300.0000",
"displayValue": "$300.00"
},
"unit_adjustment": {
"value": "-5.0000",
"displayValue": "($5.00)"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"cumulative_monthly_recurring_price_v1": {
"value": "25.0000",
"displayValue": "$25.00"
},
"total_recurring_price": {
"value": "25.0000",
"displayValue": "$25.00"
},
"pricingAdjustments": [
{
"adjustment_type": {
"value": "6e1c03d653dd91105c0eddeeff7b1232",
"displayValue": "MARKDOWN_AMT"
},
"adjustment_value": {
"value": 5.0,
"displayValue": "5"
},
"adjustment_amount": {
"value": -5.0,
"displayValue": "($5.00)"
},
"adjustment_amount_total": {
"value": -5.0,
"displayValue": "($5.00)"
},
"adjustment_description": {
"displayValue": "basic monitoring bundle discount"
},
"adjustment_sequence_id": {
"value": 1.0
},
"adjustment_matrix_type": {
"displayValue": "Configuration Component Price Adjustment"
},
"adjustment_basis": {
"value": "prv_price_point"
},
"price_point": {
"value": "net_price"
},
"pricing_plan_step": {
"value": "97b61272ffe722101fb14ad013cb14d7"
},
"running_price": {
"value": 25.0,
"displayValue": "$25.00"
}
}
],
"total_adjustment_amount": [
{
"pricePoint": "net_price",
"value": -5.0,
"displayValue": "($5.00)"
}
]
},
{
"line_id": "PREMMONIT2004",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "40.0000",
"displayValue": "$40.00"
},
"list_price": {
"value": "40.0000",
"displayValue": "$40.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "a663a785d07a7910f8770dbf976be115",
"product_offering": "e2619d9fd0a63110f8770dbf976be1ec",
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"monthly_recurring_price": {
"value": "35.0000",
"displayValue": "$35.00"
},
"annual_recurring_price": {
"value": "420.0000",
"displayValue": "$420.00"
},
"unit_net_price": {
"value": "35.0000",
"displayValue": "$35.00"
},
"cumulative_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_price": {
"value": "35.0000",
"displayValue": "$35.00"
},
"cumulative_annual_recurring_price": {
"value": "420.0000",
"displayValue": "$420.00"
},
"unit_adjustment": {
"value": "-5.0000",
"displayValue": "($5.00)"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"cumulative_monthly_recurring_price_v1": {
"value": "35.0000",
"displayValue": "$35.00"
},
"total_recurring_price": {
"value": "35.0000",
"displayValue": "$35.00"
},
"pricingAdjustments": [
{
"adjustment_type": {
"value": "6e1c03d653dd91105c0eddeeff7b1232",
"displayValue": "MARKDOWN_AMT"
},
"adjustment_value": {
"value": 5.0,
"displayValue": "5"
},
"adjustment_amount": {
"value": -5.0,
"displayValue": "($5.00)"
},
"adjustment_amount_total": {
"value": -5.0,
"displayValue": "($5.00)"
},
"adjustment_description": {
"displayValue": "premium monitoring bundle discount"
},
"adjustment_sequence_id": {
"value": 1.0
},
"adjustment_matrix_type": {
"displayValue": "Configuration Component Price Adjustment"
},
"adjustment_basis": {
"value": "prv_price_point"
},
"price_point": {
"value": "net_price"
},
"pricing_plan_step": {
"value": "97b61272ffe722101fb14ad013cb14d7"
},
"running_price": {
"value": 35.0,
"displayValue": "$35.00"
}
}
],
"total_adjustment_amount": [
{
"pricePoint": "net_price",
"value": -5.0,
"displayValue": "($5.00)"
}
]
},
{
"line_id": "ULTIMONIT1005",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "50.0000",
"displayValue": "$50.00"
},
"list_price": {
"value": "50.0000",
"displayValue": "$50.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "72736f85d07a7910f8770dbf976be162",
"product_offering": "3b6111dfd0a63110f8770dbf976be147",
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"monthly_recurring_price": {
"value": "45.0000",
"displayValue": "$45.00"
},
"annual_recurring_price": {
"value": "540.0000",
"displayValue": "$540.00"
},
"unit_net_price": {
"value": "45.0000",
"displayValue": "$45.00"
},
"cumulative_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_price": {
"value": "45.0000",
"displayValue": "$45.00"
},
"cumulative_annual_recurring_price": {
"value": "540.0000",
"displayValue": "$540.00"
},
"unit_adjustment": {
"value": "-5.0000",
"displayValue": "($5.00)"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"cumulative_monthly_recurring_price_v1": {
"value": "45.0000",
"displayValue": "$45.00"
},
"total_recurring_price": {
"value": "45.0000",
"displayValue": "$45.00"
},
"pricingAdjustments": [
{
"adjustment_type": {
"value": "6e1c03d653dd91105c0eddeeff7b1232",
"displayValue": "MARKDOWN_AMT"
},
"adjustment_value": {
"value": 5.0,
"displayValue": "5"
},
"adjustment_amount": {
"value": -5.0,
"displayValue": "($5.00)"
},
"adjustment_amount_total": {
"value": -5.0,
"displayValue": "($5.00)"
},
"adjustment_description": {
"displayValue": "ultimate monitoring bundle discount"
},
"adjustment_sequence_id": {
"value": 1.0
},
"adjustment_matrix_type": {
"displayValue": "Configuration Component Price Adjustment"
},
"adjustment_basis": {
"value": "prv_price_point"
},
"price_point": {
"value": "net_price"
},
"pricing_plan_step": {
"value": "97b61272ffe722101fb14ad013cb14d7"
},
"running_price": {
"value": 45.0,
"displayValue": "$45.00"
}
}
],
"total_adjustment_amount": [
{
"pricePoint": "net_price",
"value": -5.0,
"displayValue": "($5.00)"
}
]
},
{
"line_id": "INDOORCAM1006",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "35.0000",
"displayValue": "$35.00"
},
"list_price": {
"value": "35.0000",
"displayValue": "$35.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "81332f45d07a7910f8770dbf976be14e",
"product_offering": "1761dd9fd0a63110f8770dbf976be196",
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "28.0000",
"displayValue": "$28.00"
},
"monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_net_price": {
"value": "28.0000",
"displayValue": "$28.00"
},
"cumulative_net_price": {
"value": "28.0000",
"displayValue": "$28.00"
},
"cumulative_one_time_price": {
"value": "28.0000",
"displayValue": "$28.00"
},
"cumulative_monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_adjustment": {
"value": "-7.0000",
"displayValue": "($7.00)"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"cumulative_monthly_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"total_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricingAdjustments": [
{
"adjustment_type": {
"value": "a96c83d653dd91105c0eddeeff7b12d8",
"displayValue": "MARKDOWN_PER"
},
"adjustment_value": {
"value": 20.0,
"displayValue": "20"
},
"adjustment_amount": {
"value": -7.0,
"displayValue": "($7.00)"
},
"adjustment_amount_total": {
"value": -7.0,
"displayValue": "($7.00)"
},
"adjustment_description": {
"displayValue": "indoor camera bundle discount"
},
"adjustment_sequence_id": {
"value": 1.0
},
"adjustment_matrix_type": {
"displayValue": "Configuration Component Price Adjustment"
},
"adjustment_basis": {
"value": "prv_price_point"
},
"price_point": {
"value": "net_price"
},
"pricing_plan_step": {
"value": "97b61272ffe722101fb14ad013cb14d7"
},
"running_price": {
"value": 28.0,
"displayValue": "$28.00"
}
}
],
"total_adjustment_amount": [
{
"pricePoint": "net_price",
"value": -7.0,
"displayValue": "($7.00)"
}
]
},
{
"line_id": "OUTCAMERA1007",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "40.0000",
"displayValue": "$40.00"
},
"list_price": {
"value": "40.0000",
"displayValue": "$40.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "9a136f45d07a7910f8770dbf976be1b4",
"product_offering": "6f6111dfd0a63110f8770dbf976be100",
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "32.0000",
"displayValue": "$32.00"
},
"monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_net_price": {
"value": "32.0000",
"displayValue": "$32.00"
},
"cumulative_net_price": {
"value": "32.0000",
"displayValue": "$32.00"
},
"cumulative_one_time_price": {
"value": "32.0000",
"displayValue": "$32.00"
},
"cumulative_monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_adjustment": {
"value": "-8.0000",
"displayValue": "($8.00)"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"cumulative_monthly_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"total_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricingAdjustments": [
{
"adjustment_type": {
"value": "a96c83d653dd91105c0eddeeff7b12d8",
"displayValue": "MARKDOWN_PER"
},
"adjustment_value": {
"value": 20.0,
"displayValue": "20"
},
"adjustment_amount": {
"value": -8.0,
"displayValue": "($8.00)"
},
"adjustment_amount_total": {
"value": -8.0,
"displayValue": "($8.00)"
},
"adjustment_description": {
"displayValue": "outdoor camera bundle discount"
},
"adjustment_sequence_id": {
"value": 1.0
},
"adjustment_matrix_type": {
"displayValue": "Configuration Component Price Adjustment"
},
"adjustment_basis": {
"value": "prv_price_point"
},
"price_point": {
"value": "net_price"
},
"pricing_plan_step": {
"value": "97b61272ffe722101fb14ad013cb14d7"
},
"running_price": {
"value": 32.0,
"displayValue": "$32.00"
}
}
],
"total_adjustment_amount": [
{
"pricePoint": "net_price",
"value": -8.0,
"displayValue": "($8.00)"
}
]
},
{
"line_id": "WINSENSOR1008",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "15.0000",
"displayValue": "$15.00"
},
"list_price": {
"value": "15.0000",
"displayValue": "$15.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "3",
"price_list_line": "91f26b45d07a7910f8770dbf976be19b",
"product_offering": "1b20347e11307110f877366201dea67f",
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "36.0000",
"displayValue": "$36.00"
},
"monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_net_price": {
"value": "12.0000",
"displayValue": "$12.00"
},
"cumulative_net_price": {
"value": "36.0000",
"displayValue": "$36.00"
},
"cumulative_one_time_price": {
"value": "36.0000",
"displayValue": "$36.00"
},
"cumulative_monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_adjustment": {
"value": "-3.0000",
"displayValue": "($3.00)"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"cumulative_monthly_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"total_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricingAdjustments": [
{
"adjustment_type": {
"value": "a96c83d653dd91105c0eddeeff7b12d8",
"displayValue": "MARKDOWN_PER"
},
"adjustment_value": {
"value": 20.0,
"displayValue": "20"
},
"adjustment_amount": {
"value": -3.0,
"displayValue": "($3.00)"
},
"adjustment_amount_total": {
"value": -9.0,
"displayValue": "($9.00)"
},
"adjustment_description": {
"displayValue": "window sensor bundle discount"
},
"adjustment_sequence_id": {
"value": 1.0
},
"adjustment_matrix_type": {
"displayValue": "Configuration Component Price Adjustment"
},
"adjustment_basis": {
"value": "prv_price_point"
},
"price_point": {
"value": "net_price"
},
"pricing_plan_step": {
"value": "97b61272ffe722101fb14ad013cb14d7"
},
"running_price": {
"value": 12.0,
"displayValue": "$12.00"
}
}
],
"total_adjustment_amount": [
{
"pricePoint": "net_price",
"value": -9.0,
"displayValue": "($9.00)"
}
]
}
],
"status": "Success",
"total_monthly_recurring_price": {
"value": "105.0000",
"displayValue": "$105.00"
},
"total_monthly_recurring_price_v1": {
"value": "105.0000",
"displayValue": "$105.00"
},
"total_annual_recurring_price": {
"value": "1260.0000",
"displayValue": "$1,260.00"
},
"total_annual_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_amount": {
"value": "200.0000",
"displayValue": "$200.00"
},
"total_amount_v1": {
"value": "305.0000",
"displayValue": "$305.00"
},
"total_one_time_price": {
"value": "200.0000",
"displayValue": "$200.00"
},
"total_one_time_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_monthly_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_one_time_margin": {
"value": "200.0000",
"displayValue": "$200.00"
},
"total_monthly_margin": {
"value": "105.0000",
"displayValue": "$105.00"
},
"total_margin_amount": {
"value": "200.0000",
"displayValue": "$200.00"
},
"total_one_time_margin_percentage": {
"value": "100.0000",
"displayValue": "$100.00"
},
"total_monthly_margin_percentage": {
"value": "100.0000",
"displayValue": "$100.00"
},
"total_margin_percentage": {
"value": "100.0000",
"displayValue": "$100.00"
}
},
"settings": {
"pricing_context_id": "7049E245A667EABB226B16A2190FB92E",
"pricing_elements": "PRICE,COST,NET_PRICE,LINE_ROLLUPS,HEADER_ROLLUPS,ADJUSTMENTS"
}
}
}
Produktkonfiguration aktualisieren (Merkmalsoption ändern)
Dieses Beispiel zeigt, wie Sie eine aktive Produktkonfigurationssitzung aktualisieren, indem Sie eine vom Anwender auswählbare Option (Merkmal) ändern. Dies ist eine gängige Aktion in einem Produktkonfigurator, z. B. das Ändern einer Farbe, Größe oder Funktion.
Voraussetzung: Sie müssen einschließen Preisgestaltung_Kontext_ID Wird beim Initiieren von zurückgegeben Produktkonfigurationssitzung . Dies teilt dem Preisgestaltungsmodul mit, welche Sitzung aktualisiert werden soll.
Hinweis: Das lineItems-Array muss nur das spezifische Element enthalten, das geändert wird. Es ist nicht erforderlich, die gesamte Produkthierarchie erneut zu senden.
Beispiel: Curl-Anforderung.
curl "https://instance.servicenow.com/api/sn_csm_pricing/v1/pricingengine/computePrice" \
--request POST \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data '{
"header": {
"source_system": "ServiceNow Headless API",
"requesting_record_id": "QT0001101",
"currency": "USD",
"lineItems": [
{
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "3f6111dfd0a63110f8770dbf976be149",
"periodicity": "",
"quantity": "1",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"characteristics": [
{
"characteristic": "4f31999fd0a63110f8770dbf976be178",
"characteristic_option": "8331999fd0a63110f8770dbf976be179"
}
],
"transaction_date": "2025-08-28 22:46:39",
"selected": true,
"line_id": "HOMEAUTOMA1002"
}
],
"pricelist": "19d29513d0e63110f8770dbf976be122",
"transaction_date": "2023-12-18 23:37:11"
},
"settings": {
"pricing_elements": "PRICE,COST,NET_PRICE,LINE_ROLLUPS,HEADER_ROLLUPS,ADJUSTMENTS",
"pricing_context_id": "7049E245A667EABB226B16A2190FB92E",
"disable_validation": true,
"scope": "configurator",
"config_top_line_identifier": "HOMEAUTOMA2000",
"config_lines_expanded": false
}
}' \
--user 'username:password'
{
"result": {
"header": {
"currency": "USD",
"lineItems": [
{
"line_id": "HOMEAUTOMA1002",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "100.0000",
"displayValue": "$100.00"
},
"list_price": {
"value": "120.0000",
"displayValue": "$120.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "fe912705d07a7910f8770dbf976be147",
"product_offering": "3f6111dfd0a63110f8770dbf976be149",
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "96.0000",
"displayValue": "$96.00"
},
"monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_net_price": {
"value": "96.0000",
"displayValue": "$96.00"
},
"cumulative_net_price": {
"value": "96.0000",
"displayValue": "$96.00"
},
"cumulative_one_time_price": {
"value": "96.0000",
"displayValue": "$96.00"
},
"cumulative_monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_adjustment": {
"value": "-24.0000",
"displayValue": "($24.00)"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"cumulative_monthly_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"total_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricingAdjustments": [
{
"adjustment_type": {
"value": "d88bc79653dd91105c0eddeeff7b12c1",
"displayValue": "MARKUP_AMT"
},
"adjustment_value": {
"value": 20.0,
"displayValue": "$20.00"
},
"adjustment_amount": {
"value": 20.0,
"displayValue": "$20.00"
},
"adjustment_amount_total": {
"value": 20.0,
"displayValue": "$20.00"
},
"adjustment_description": {
"displayValue": "Attribute Adjustments"
},
"adjustment_sequence_id": {
"value": 1.0
},
"adjustment_matrix_type": {
"displayValue": null
},
"adjustment_basis": {
"value": null
},
"price_point": {
"value": "list_price"
},
"pricing_plan_step": {
"value": "8bb61272ffe722101fb14ad013cb149d"
},
"running_price": {
"value": 120.0,
"displayValue": "$120.00"
}
},
{
"adjustment_type": {
"value": "a96c83d653dd91105c0eddeeff7b12d8",
"displayValue": "MARKDOWN_PER"
},
"adjustment_value": {
"value": 20.0,
"displayValue": "20"
},
"adjustment_amount": {
"value": -24.0,
"displayValue": "($24.00)"
},
"adjustment_amount_total": {
"value": -24.0,
"displayValue": "($24.00)"
},
"adjustment_description": {
"displayValue": "home automation hub bundle discount"
},
"adjustment_sequence_id": {
"value": 2.0
},
"adjustment_matrix_type": {
"displayValue": "Configuration Component Price Adjustment"
},
"adjustment_basis": {
"value": "prv_price_point"
},
"price_point": {
"value": "net_price"
},
"pricing_plan_step": {
"value": "97b61272ffe722101fb14ad013cb14d7"
},
"running_price": {
"value": 96.0,
"displayValue": "$96.00"
}
}
],
"total_adjustment_amount": [
{
"pricePoint": "list_price",
"value": 20.0,
"displayValue": "$20.00"
},
{
"pricePoint": "net_price",
"value": -24.0,
"displayValue": "($24.00)"
}
]
},
{
"line_id": "HOMEAUTOMA2000",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"list_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "d6792b8dd07a7910f8770dbf976be1f8",
"product_offering": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_net_price": {
"value": "216.0000",
"displayValue": "$216.00"
},
"cumulative_one_time_price": {
"value": "216.0000",
"displayValue": "$216.00"
},
"cumulative_monthly_recurring_price": {
"value": "105.0000",
"displayValue": "$105.00"
},
"cumulative_annual_recurring_price": {
"value": "1260.0000",
"displayValue": "$1,260.00"
},
"unit_adjustment": {
"value": "0.0000",
"displayValue": "$0.00"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_price_v1": {
"value": "105.0000",
"displayValue": "$105.00"
},
"total_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricingAdjustments": [],
"total_adjustment_amount": []
}
],
"status": "Success",
"total_monthly_recurring_price": {
"value": "105.0000",
"displayValue": "$105.00"
},
"total_monthly_recurring_price_v1": {
"value": "105.0000",
"displayValue": "$105.00"
},
"total_annual_recurring_price": {
"value": "1260.0000",
"displayValue": "$1,260.00"
},
"total_annual_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_amount": {
"value": "216.0000",
"displayValue": "$216.00"
},
"total_amount_v1": {
"value": "321.0000",
"displayValue": "$321.00"
},
"total_one_time_price": {
"value": "216.0000",
"displayValue": "$216.00"
},
"total_one_time_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_monthly_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_one_time_margin": {
"value": "216.0000",
"displayValue": "$216.00"
},
"total_monthly_margin": {
"value": "105.0000",
"displayValue": "$105.00"
},
"total_margin_amount": {
"value": "216.0000",
"displayValue": "$216.00"
},
"total_one_time_margin_percentage": {
"value": "100.0000",
"displayValue": "$100.00"
},
"total_monthly_margin_percentage": {
"value": "100.0000",
"displayValue": "$100.00"
},
"total_margin_percentage": {
"value": "100.0000",
"displayValue": "$100.00"
}
},
"settings": {
"pricing_context_id": "7049E245A667EABB226B16A2190FB92E",
"pricing_elements": "PRICE,COST,NET_PRICE,LINE_ROLLUPS,HEADER_ROLLUPS,ADJUSTMENTS"
}
}
}
Produktkonfiguration aktualisieren (Auswahl eines Produkts aufheben)
Dieses Beispiel zeigt, wie Sie eine aktive Produktkonfiguration aktualisieren, indem Sie ein Produkt aus dem Paket deaktivieren oder entfernen. Dies wird erreicht, indem eine Anforderung für die bestimmte Position mit gesendet wird Ausgewählt Kennzeichnung auf festgelegt Falsch .
Genau wie im vorherigen Anwendungsfall muss diese Anforderung die richtige enthalten Preisgestaltung_Kontext_ID Um sicherzustellen, dass der Change auf die richtige Sitzung angewendet wird. Die Preisgestaltungs-Engine berechnet dann alle Preise für das gesamte Paket neu, wenn dieser Artikel entfernt wurde. Dies kann sich auf die Gesamtrabatte und Rollups auswirken.
Voraussetzung: Sie müssen einschließen Preisgestaltung_Kontext_ID Wird beim Initiieren von zurückgegeben Produktkonfigurationssitzung . Dies teilt dem Preisgestaltungsmodul mit, welche Sitzung aktualisiert werden soll.
Hinweis: Das lineItems-Array muss nur das spezifische Element enthalten, das geändert wird. Es ist nicht erforderlich, die gesamte Produkthierarchie erneut zu senden.
Beispiel: Curl-Anforderung.
curl "https://instance.servicenow.com/api/sn_csm_pricing/v1/pricingengine/computePrice" \
--request POST \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data '{
"header": {
"source_system": "ServiceNow Headless API",
"requesting_record_id": "QT0001101",
"currency": "USD",
"lineItems": [
{
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "3b6111dfd0a63110f8770dbf976be147",
"quantity": "1",
"periodicity": "monthly",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2025-08-28 22:46:39",
"selected": false,
"line_id": "ULTIMONIT1005"
}
],
"pricelist": "19d29513d0e63110f8770dbf976be122",
"costbook": "a3042cdce405c210f8773750028d6f72",
"transaction_date": "2023-12-18 23:37:11"
},
"settings": {
"pricing_elements": "PRICE,COST,NET_PRICE,LINE_ROLLUPS,HEADER_ROLLUPS,ADJUSTMENTS",
"pricing_context_id": "7049E245A667EABB226B16A2190FB92E",
"disable_validation": true,
"scope": "configurator",
"config_top_line_identifier": "HOMEAUTOMA2000",
"config_lines_expanded": false
}
}' \
--user 'username:password'
{
"result": {
"header": {
"currency": "USD",
"costbook": "a3042cdce405c210f8773750028d6f72",
"lineItems": [
{
"line_id": "ULTIMONIT1005",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "50.0000",
"displayValue": "$50.00"
},
"list_price": {
"value": "50.0000",
"displayValue": "$50.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "72736f85d07a7910f8770dbf976be162",
"product_offering": "3b6111dfd0a63110f8770dbf976be147",
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"monthly_recurring_price": {
"value": "50.0000",
"displayValue": "$50.00"
},
"annual_recurring_price": {
"value": "600.0000",
"displayValue": "$600.00"
},
"unit_net_price": {
"value": "50.0000",
"displayValue": "$50.00"
},
"cumulative_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_acv": {
"value": "600.0000",
"displayValue": "$600.00"
},
"cumulative_one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_price": {
"value": "50.0000",
"displayValue": "$50.00"
},
"cumulative_annual_recurring_price": {
"value": "600.0000",
"displayValue": "$600.00"
},
"unit_adjustment": {
"value": "0.0000",
"displayValue": "$0.00"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"cumulative_monthly_recurring_price_v1": {
"value": "50.0000",
"displayValue": "$50.00"
},
"total_recurring_price": {
"value": "50.0000",
"displayValue": "$50.00"
},
"total_new_amount": {
"value": 0,
"displayValue": null
},
"total_upsell_downsell_amount": {
"value": 0,
"displayValue": null
},
"total_renewal_amount": {
"value": 0,
"displayValue": null
},
"pricingAdjustments": [],
"total_adjustment_amount": [],
"cost": {
"value": "25.0000",
"displayValue": "$25.00"
},
"unit_margin_amount": {
"value": "25.0000",
"displayValue": "$25.00"
},
"unit_margin_percentage": {
"value": "50.0000",
"displayValue": "50.0000"
},
"one_time_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"monthly_recurring_cost": {
"value": "25.0000",
"displayValue": "$25.00"
},
"cumulative_one_time_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_cost": {
"value": "25.0000",
"displayValue": "$25.00"
},
"cumulative_net_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_margin_percentage": {
"value": "0.0000",
"displayValue": "$0.00"
}
},
{
"line_id": "HOMEAUTOMA2000",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"list_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "d6792b8dd07a7910f8770dbf976be1f8",
"product_offering": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_net_price": {
"value": "270.0000",
"displayValue": "$270.00"
},
"cumulative_acv": {
"value": "270.0000",
"displayValue": "$270.00"
},
"cumulative_one_time_price": {
"value": "270.0000",
"displayValue": "$270.00"
},
"cumulative_monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_adjustment": {
"value": "0.0000",
"displayValue": "$0.00"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_new_amount": {
"value": "270.0000",
"displayValue": "$270.00"
},
"total_upsell_downsell_amount": {
"value": 0,
"displayValue": null
},
"total_renewal_amount": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricingAdjustments": [],
"total_adjustment_amount": [],
"cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_margin_amount": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_margin_percentage": {
"value": "0.0000",
"displayValue": "0.0000"
},
"one_time_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"monthly_recurring_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_one_time_cost": {
"value": "130.0000",
"displayValue": "$130.00"
},
"cumulative_monthly_recurring_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_net_cost": {
"value": "130.0000",
"displayValue": "$130.00"
},
"cumulative_margin_percentage": {
"value": "51.8519",
"displayValue": "51.8519"
}
}
],
"status": "Success",
"total_monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_monthly_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_annual_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_amount": {
"value": "270.0000",
"displayValue": "$270.00"
},
"total_acv": {
"value": "270.0000",
"displayValue": "$270.00"
},
"total_amount_v1": {
"value": "270.0000",
"displayValue": "$270.00"
},
"total_one_time_price": {
"value": "270.0000",
"displayValue": "$270.00"
},
"total_one_time_cost": {
"value": "130.0000",
"displayValue": "$130.00"
},
"total_monthly_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_cost": {
"value": "130.0000",
"displayValue": "$130.00"
},
"total_one_time_margin": {
"value": "140.0000",
"displayValue": "$140.00"
},
"total_monthly_margin": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_margin_amount": {
"value": "140.0000",
"displayValue": "$140.00"
},
"total_one_time_margin_percentage": {
"value": "51.8519",
"displayValue": "$51.8519"
},
"total_monthly_margin_percentage": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_margin_percentage": {
"value": "51.8519",
"displayValue": "$51.8519"
},
"total_upsell_downsell_amount": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_renewal_amount": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_new_amount": {
"value": "270.0000",
"displayValue": "$270.00"
},
"total_new_amount_acv": {
"value": "270.0000",
"displayValue": "$270.00"
}
},
"settings": {
"pricing_context_id": "7E362E4CEDC0C3F684D346ED7A83D47E",
"pricing_elements": "PRICE,COST,NET_PRICE,LINE_ROLLUPS,HEADER_ROLLUPS,ADJUSTMENTS"
}
}
}
Statuslose Preisgestaltung für eine Mehrzeilentransaktion
Dieses Beispiel zeigt, wie Sie eine vollständige, mehrzeilige Transaktion in einem einzelnen API-Aufruf preisen. Die Anforderung enthält eine Mischung aus eigenständigen Produkten und einem Produktpaket.
Durch Einbeziehen von HEADER_ROLLUPS in „price_Elements“ berechnet die API den Preis für jeden einzelnen Einzelposten und gibt auch die aggregierte Gesamtsumme für die gesamte Transaktion im Header zurück.
Beispiel: „PRICING_ELEMENTS“: „PRICE,COST,NET_PRICE,LINE_ROLLUPS,HEADER_ROLLUPS,ADJUSTMENTS“
Beispiel: Curl-Anforderung.
curl "https://instance.servicenow.com/api/sn_csm_pricing/v1/pricingengine/computePrice" \
--request POST \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data '{
"header": {
"source_system": "ServiceNow Headless API",
"requesting_record_id": "QT0001101",
"currency": "USD",
"lineItems": [
{
"top_product_offer": "db61dd9fd0a63110f8770dbf976be19c",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "db61dd9fd0a63110f8770dbf976be19c",
"periodicity" : "",
"quantity": "1",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2023-12-18 23:37:11",
"line_id": "CONNECTEDC1000"
},
{
"top_product_offer": "9b61dd9fd0a63110f8770dbf976be1c6",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "9b61dd9fd0a63110f8770dbf976be1c6",
"periodicity" : "annually",
"quantity": "1",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2023-12-18 23:37:11",
"line_id": "AUTOCOLLIS1001"
},
{
"top_product_offer": "9361dd9fd0a63110f8770dbf976be1c4",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "9361dd9fd0a63110f8770dbf976be1c4",
"periodicity" : "annually",
"quantity": "1",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2023-12-18 23:37:11",
"line_id": "WIFIHOTSPOT1002"
},
{
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "26d07c3211707110f877366201dea60c",
"quantity": "1",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"periodicity" : "",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2025-08-28 22:46:39",
"line_id": "HOMEAUTOMA2000"
},
{
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "fe5d203e11307110f877366201dea631",
"periodicity" : "",
"quantity": "3",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2025-08-28 22:46:39",
"line_id": "DOORSENSOR1001"
},
{
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "3f6111dfd0a63110f8770dbf976be149",
"periodicity" : "",
"quantity": "1",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"characteristics": [
{
"characteristic": "4f31999fd0a63110f8770dbf976be178",
"characteristic_option": "0b31999fd0a63110f8770dbf976be179"
}
],
"transaction_date": "2025-08-28 22:46:39",
"line_id": "HOMEAUTOMA1002"
},
{
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "376111dfd0a63110f8770dbf976be140",
"periodicity" : "monthly",
"quantity": "1",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2025-08-28 22:46:39",
"line_id": "BASICMONIT1003"
},
{
"parent_product_offer": "26d07c3211707110f8770dbf976be122",
"product_offering": "e2619d9fd0a63110f8770dbf976be1ec",
"periodicity" : "monthly",
"quantity": "1",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2025-08-28 22:46:39",
"line_id": "PREMMONIT2004"
},
{
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "1761dd9fd0a63110f8770dbf976be196",
"periodicity" : "",
"quantity": "1",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2025-08-28 22:46:39",
"line_id": "INDOORCAM1006"
},
{
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "6f6111dfd0a63110f8770dbf976be100",
"periodicity" : "",
"quantity": "1",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2025-08-28 22:46:39",
"line_id": "OUTCAMERA1007"
},
{
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"pricelist": "19d29513d0e63110f8770dbf976be122",
"product_offering": "1b20347e11307110f877366201dea67f",
"periodicity" : "",
"quantity": "3",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2025-08-28 22:46:39",
"line_id": "WINSENSOR1008"
}
],
"pricelist": "19d29513d0e63110f8770dbf976be122",
"transaction_date": "2023-12-18 23:37:11"
},
"settings": {
"pricing_elements": "PRICE,COST,NET_PRICE,LINE_ROLLUPS,HEADER_ROLLUPS,ADJUSTMENTS",
"disable_validation": true
}
}' \
--user 'username:password'
{
"result": {
"header": {
"currency": "USD",
"lineItems": [
{
"line_id": "CONNECTEDC1000",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"list_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "3e93e785d07a7910f8770dbf976be1ee",
"product_offering": "db61dd9fd0a63110f8770dbf976be19c",
"top_product_offer": "db61dd9fd0a63110f8770dbf976be19c",
"one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_adjustment": {
"value": "0.0000",
"displayValue": "$0.00"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricingAdjustments": [],
"total_adjustment_amount": []
},
{
"line_id": "AUTOCOLLIS1001",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "250.0000",
"displayValue": "$250.00"
},
"list_price": {
"value": "250.0000",
"displayValue": "$250.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "4dc32f85d07a7910f8770dbf976be197",
"product_offering": "9b61dd9fd0a63110f8770dbf976be1c6",
"top_product_offer": "9b61dd9fd0a63110f8770dbf976be1c6",
"one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"monthly_recurring_price": {
"value": "20.8333",
"displayValue": "$20.8333"
},
"annual_recurring_price": {
"value": "250.0000",
"displayValue": "$250.00"
},
"unit_net_price": {
"value": "250.0000",
"displayValue": "$250.00"
},
"cumulative_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_price": {
"value": "20.8333",
"displayValue": "$20.8333"
},
"cumulative_annual_recurring_price": {
"value": "250.0000",
"displayValue": "$250.00"
},
"unit_adjustment": {
"value": "0.0000",
"displayValue": "$0.00"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": "250.0000",
"displayValue": "$250.00"
},
"cumulative_monthly_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_recurring_price": {
"value": "250.0000",
"displayValue": "$250.00"
},
"pricingAdjustments": [],
"total_adjustment_amount": []
},
{
"line_id": "WIFIHOTSPOT1002",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "100.0000",
"displayValue": "$100.00"
},
"list_price": {
"value": "100.0000",
"displayValue": "$100.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "3ff3ef85d07a7910f8770dbf976be1ea",
"product_offering": "9361dd9fd0a63110f8770dbf976be1c4",
"top_product_offer": "9361dd9fd0a63110f8770dbf976be1c4",
"one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"monthly_recurring_price": {
"value": "8.3333",
"displayValue": "$8.3333"
},
"annual_recurring_price": {
"value": "100.0000",
"displayValue": "$100.00"
},
"unit_net_price": {
"value": "100.0000",
"displayValue": "$100.00"
},
"cumulative_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_price": {
"value": "8.3333",
"displayValue": "$8.3333"
},
"cumulative_annual_recurring_price": {
"value": "100.0000",
"displayValue": "$100.00"
},
"unit_adjustment": {
"value": "0.0000",
"displayValue": "$0.00"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": "100.0000",
"displayValue": "$100.00"
},
"cumulative_monthly_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_recurring_price": {
"value": "100.0000",
"displayValue": "$100.00"
},
"pricingAdjustments": [],
"total_adjustment_amount": []
},
{
"line_id": "HOMEAUTOMA2000",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"list_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "d6792b8dd07a7910f8770dbf976be1f8",
"product_offering": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_net_price": {
"value": "200.0000",
"displayValue": "$200.00"
},
"cumulative_one_time_price": {
"value": "200.0000",
"displayValue": "$200.00"
},
"cumulative_monthly_recurring_price": {
"value": "60.0000",
"displayValue": "$60.00"
},
"cumulative_annual_recurring_price": {
"value": "720.0000",
"displayValue": "$720.00"
},
"unit_adjustment": {
"value": "0.0000",
"displayValue": "$0.00"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_price_v1": {
"value": "60.0000",
"displayValue": "$60.00"
},
"total_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricingAdjustments": [],
"total_adjustment_amount": []
},
{
"line_id": "DOORSENSOR1001",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "10.0000",
"displayValue": "$10.00"
},
"list_price": {
"value": "10.0000",
"displayValue": "$10.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "3",
"price_list_line": "2ec2a745d07a7910f8770dbf976be159",
"product_offering": "fe5d203e11307110f877366201dea631",
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "24.0000",
"displayValue": "$24.00"
},
"monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_net_price": {
"value": "8.0000",
"displayValue": "$8.00"
},
"cumulative_net_price": {
"value": "24.0000",
"displayValue": "$24.00"
},
"cumulative_one_time_price": {
"value": "24.0000",
"displayValue": "$24.00"
},
"cumulative_monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_adjustment": {
"value": "-2.0000",
"displayValue": "($2.00)"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"cumulative_monthly_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"total_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricingAdjustments": [
{
"adjustment_type": {
"value": "a96c83d653dd91105c0eddeeff7b12d8",
"displayValue": "MARKDOWN_PER"
},
"adjustment_value": {
"value": 20.0,
"displayValue": "20"
},
"adjustment_amount": {
"value": -2.0,
"displayValue": "($2.00)"
},
"adjustment_amount_total": {
"value": -6.0,
"displayValue": "($6.00)"
},
"adjustment_description": {
"displayValue": "door sensor bundle discount"
},
"adjustment_sequence_id": {
"value": 1.0
},
"adjustment_matrix_type": {
"displayValue": "Configuration Component Price Adjustment"
},
"adjustment_basis": {
"value": "prv_price_point"
},
"price_point": {
"value": "net_price"
},
"pricing_plan_step": {
"value": "97b61272ffe722101fb14ad013cb14d7"
},
"running_price": {
"value": 8.0,
"displayValue": "$8.00"
}
}
],
"total_adjustment_amount": [
{
"pricePoint": "net_price",
"value": -6.0,
"displayValue": "($6.00)"
}
]
},
{
"line_id": "HOMEAUTOMA1002",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "100.0000",
"displayValue": "$100.00"
},
"list_price": {
"value": "100.0000",
"displayValue": "$100.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "fe912705d07a7910f8770dbf976be147",
"product_offering": "3f6111dfd0a63110f8770dbf976be149",
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "80.0000",
"displayValue": "$80.00"
},
"monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_net_price": {
"value": "80.0000",
"displayValue": "$80.00"
},
"cumulative_net_price": {
"value": "80.0000",
"displayValue": "$80.00"
},
"cumulative_one_time_price": {
"value": "80.0000",
"displayValue": "$80.00"
},
"cumulative_monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_adjustment": {
"value": "-20.0000",
"displayValue": "($20.00)"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"cumulative_monthly_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"total_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricingAdjustments": [
{
"adjustment_type": {
"value": "a96c83d653dd91105c0eddeeff7b12d8",
"displayValue": "MARKDOWN_PER"
},
"adjustment_value": {
"value": 20.0,
"displayValue": "20"
},
"adjustment_amount": {
"value": -20.0,
"displayValue": "($20.00)"
},
"adjustment_amount_total": {
"value": -20.0,
"displayValue": "($20.00)"
},
"adjustment_description": {
"displayValue": "home automation hub bundle discount"
},
"adjustment_sequence_id": {
"value": 1.0
},
"adjustment_matrix_type": {
"displayValue": "Configuration Component Price Adjustment"
},
"adjustment_basis": {
"value": "prv_price_point"
},
"price_point": {
"value": "net_price"
},
"pricing_plan_step": {
"value": "97b61272ffe722101fb14ad013cb14d7"
},
"running_price": {
"value": 80.0,
"displayValue": "$80.00"
}
}
],
"total_adjustment_amount": [
{
"pricePoint": "net_price",
"value": -20.0,
"displayValue": "($20.00)"
}
]
},
{
"line_id": "BASICMONIT1003",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "30.0000",
"displayValue": "$30.00"
},
"list_price": {
"value": "30.0000",
"displayValue": "$30.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "bc53e785d07a7910f8770dbf976be1e7",
"product_offering": "376111dfd0a63110f8770dbf976be140",
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"monthly_recurring_price": {
"value": "25.0000",
"displayValue": "$25.00"
},
"annual_recurring_price": {
"value": "300.0000",
"displayValue": "$300.00"
},
"unit_net_price": {
"value": "25.0000",
"displayValue": "$25.00"
},
"cumulative_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_price": {
"value": "25.0000",
"displayValue": "$25.00"
},
"cumulative_annual_recurring_price": {
"value": "300.0000",
"displayValue": "$300.00"
},
"unit_adjustment": {
"value": "-5.0000",
"displayValue": "($5.00)"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"cumulative_monthly_recurring_price_v1": {
"value": "25.0000",
"displayValue": "$25.00"
},
"total_recurring_price": {
"value": "25.0000",
"displayValue": "$25.00"
},
"pricingAdjustments": [
{
"adjustment_type": {
"value": "6e1c03d653dd91105c0eddeeff7b1232",
"displayValue": "MARKDOWN_AMT"
},
"adjustment_value": {
"value": 5.0,
"displayValue": "5"
},
"adjustment_amount": {
"value": -5.0,
"displayValue": "($5.00)"
},
"adjustment_amount_total": {
"value": -5.0,
"displayValue": "($5.00)"
},
"adjustment_description": {
"displayValue": "basic monitoring bundle discount"
},
"adjustment_sequence_id": {
"value": 1.0
},
"adjustment_matrix_type": {
"displayValue": "Configuration Component Price Adjustment"
},
"adjustment_basis": {
"value": "prv_price_point"
},
"price_point": {
"value": "net_price"
},
"pricing_plan_step": {
"value": "97b61272ffe722101fb14ad013cb14d7"
},
"running_price": {
"value": 25.0,
"displayValue": "$25.00"
}
}
],
"total_adjustment_amount": [
{
"pricePoint": "net_price",
"value": -5.0,
"displayValue": "($5.00)"
}
]
},
{
"line_id": "PREMMONIT2004",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "40.0000",
"displayValue": "$40.00"
},
"list_price": {
"value": "40.0000",
"displayValue": "$40.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "a663a785d07a7910f8770dbf976be115",
"product_offering": "e2619d9fd0a63110f8770dbf976be1ec",
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"monthly_recurring_price": {
"value": "35.0000",
"displayValue": "$35.00"
},
"annual_recurring_price": {
"value": "420.0000",
"displayValue": "$420.00"
},
"unit_net_price": {
"value": "35.0000",
"displayValue": "$35.00"
},
"cumulative_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_price": {
"value": "35.0000",
"displayValue": "$35.00"
},
"cumulative_annual_recurring_price": {
"value": "420.0000",
"displayValue": "$420.00"
},
"unit_adjustment": {
"value": "-5.0000",
"displayValue": "($5.00)"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"cumulative_monthly_recurring_price_v1": {
"value": "35.0000",
"displayValue": "$35.00"
},
"total_recurring_price": {
"value": "35.0000",
"displayValue": "$35.00"
},
"pricingAdjustments": [
{
"adjustment_type": {
"value": "6e1c03d653dd91105c0eddeeff7b1232",
"displayValue": "MARKDOWN_AMT"
},
"adjustment_value": {
"value": 5.0,
"displayValue": "5"
},
"adjustment_amount": {
"value": -5.0,
"displayValue": "($5.00)"
},
"adjustment_amount_total": {
"value": -5.0,
"displayValue": "($5.00)"
},
"adjustment_description": {
"displayValue": "premium monitoring bundle discount"
},
"adjustment_sequence_id": {
"value": 1.0
},
"adjustment_matrix_type": {
"displayValue": "Configuration Component Price Adjustment"
},
"adjustment_basis": {
"value": "prv_price_point"
},
"price_point": {
"value": "net_price"
},
"pricing_plan_step": {
"value": "97b61272ffe722101fb14ad013cb14d7"
},
"running_price": {
"value": 35.0,
"displayValue": "$35.00"
}
}
],
"total_adjustment_amount": [
{
"pricePoint": "net_price",
"value": -5.0,
"displayValue": "($5.00)"
}
]
},
{
"line_id": "INDOORCAM1006",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "35.0000",
"displayValue": "$35.00"
},
"list_price": {
"value": "35.0000",
"displayValue": "$35.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "81332f45d07a7910f8770dbf976be14e",
"product_offering": "1761dd9fd0a63110f8770dbf976be196",
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "28.0000",
"displayValue": "$28.00"
},
"monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_net_price": {
"value": "28.0000",
"displayValue": "$28.00"
},
"cumulative_net_price": {
"value": "28.0000",
"displayValue": "$28.00"
},
"cumulative_one_time_price": {
"value": "28.0000",
"displayValue": "$28.00"
},
"cumulative_monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_adjustment": {
"value": "-7.0000",
"displayValue": "($7.00)"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"cumulative_monthly_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"total_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricingAdjustments": [
{
"adjustment_type": {
"value": "a96c83d653dd91105c0eddeeff7b12d8",
"displayValue": "MARKDOWN_PER"
},
"adjustment_value": {
"value": 20.0,
"displayValue": "20"
},
"adjustment_amount": {
"value": -7.0,
"displayValue": "($7.00)"
},
"adjustment_amount_total": {
"value": -7.0,
"displayValue": "($7.00)"
},
"adjustment_description": {
"displayValue": "indoor camera bundle discount"
},
"adjustment_sequence_id": {
"value": 1.0
},
"adjustment_matrix_type": {
"displayValue": "Configuration Component Price Adjustment"
},
"adjustment_basis": {
"value": "prv_price_point"
},
"price_point": {
"value": "net_price"
},
"pricing_plan_step": {
"value": "97b61272ffe722101fb14ad013cb14d7"
},
"running_price": {
"value": 28.0,
"displayValue": "$28.00"
}
}
],
"total_adjustment_amount": [
{
"pricePoint": "net_price",
"value": -7.0,
"displayValue": "($7.00)"
}
]
},
{
"line_id": "OUTCAMERA1007",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "40.0000",
"displayValue": "$40.00"
},
"list_price": {
"value": "40.0000",
"displayValue": "$40.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "1",
"price_list_line": "9a136f45d07a7910f8770dbf976be1b4",
"product_offering": "6f6111dfd0a63110f8770dbf976be100",
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "32.0000",
"displayValue": "$32.00"
},
"monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_net_price": {
"value": "32.0000",
"displayValue": "$32.00"
},
"cumulative_net_price": {
"value": "32.0000",
"displayValue": "$32.00"
},
"cumulative_one_time_price": {
"value": "32.0000",
"displayValue": "$32.00"
},
"cumulative_monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_adjustment": {
"value": "-8.0000",
"displayValue": "($8.00)"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"cumulative_monthly_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"total_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricingAdjustments": [
{
"adjustment_type": {
"value": "a96c83d653dd91105c0eddeeff7b12d8",
"displayValue": "MARKDOWN_PER"
},
"adjustment_value": {
"value": 20.0,
"displayValue": "20"
},
"adjustment_amount": {
"value": -8.0,
"displayValue": "($8.00)"
},
"adjustment_amount_total": {
"value": -8.0,
"displayValue": "($8.00)"
},
"adjustment_description": {
"displayValue": "outdoor camera bundle discount"
},
"adjustment_sequence_id": {
"value": 1.0
},
"adjustment_matrix_type": {
"displayValue": "Configuration Component Price Adjustment"
},
"adjustment_basis": {
"value": "prv_price_point"
},
"price_point": {
"value": "net_price"
},
"pricing_plan_step": {
"value": "97b61272ffe722101fb14ad013cb14d7"
},
"running_price": {
"value": 32.0,
"displayValue": "$32.00"
}
}
],
"total_adjustment_amount": [
{
"pricePoint": "net_price",
"value": -8.0,
"displayValue": "($8.00)"
}
]
},
{
"line_id": "WINSENSOR1008",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "15.0000",
"displayValue": "$15.00"
},
"list_price": {
"value": "15.0000",
"displayValue": "$15.00"
},
"pricelist": "19d29513d0e63110f8770dbf976be122",
"quantity": "3",
"price_list_line": "91f26b45d07a7910f8770dbf976be19b",
"product_offering": "1b20347e11307110f877366201dea67f",
"parent_product_offer": "26d07c3211707110f877366201dea60c",
"top_product_offer": "26d07c3211707110f877366201dea60c",
"one_time_price": {
"value": "36.0000",
"displayValue": "$36.00"
},
"monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_net_price": {
"value": "12.0000",
"displayValue": "$12.00"
},
"cumulative_net_price": {
"value": "36.0000",
"displayValue": "$36.00"
},
"cumulative_one_time_price": {
"value": "36.0000",
"displayValue": "$36.00"
},
"cumulative_monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_adjustment": {
"value": "-3.0000",
"displayValue": "($3.00)"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"cumulative_monthly_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"total_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricingAdjustments": [
{
"adjustment_type": {
"value": "a96c83d653dd91105c0eddeeff7b12d8",
"displayValue": "MARKDOWN_PER"
},
"adjustment_value": {
"value": 20.0,
"displayValue": "20"
},
"adjustment_amount": {
"value": -3.0,
"displayValue": "($3.00)"
},
"adjustment_amount_total": {
"value": -9.0,
"displayValue": "($9.00)"
},
"adjustment_description": {
"displayValue": "window sensor bundle discount"
},
"adjustment_sequence_id": {
"value": 1.0
},
"adjustment_matrix_type": {
"displayValue": "Configuration Component Price Adjustment"
},
"adjustment_basis": {
"value": "prv_price_point"
},
"price_point": {
"value": "net_price"
},
"pricing_plan_step": {
"value": "97b61272ffe722101fb14ad013cb14d7"
},
"running_price": {
"value": 12.0,
"displayValue": "$12.00"
}
}
],
"total_adjustment_amount": [
{
"pricePoint": "net_price",
"value": -9.0,
"displayValue": "($9.00)"
}
]
}
],
"status": "Success",
"total_monthly_recurring_price": {
"value": "89.1666",
"displayValue": "$89.1666"
},
"total_monthly_recurring_price_v1": {
"value": "60.0000",
"displayValue": "$60.00"
},
"total_annual_recurring_price": {
"value": "1070.0000",
"displayValue": "$1,070.00"
},
"total_annual_recurring_price_v1": {
"value": "350.0000",
"displayValue": "$350.00"
},
"total_amount": {
"value": "200.0000",
"displayValue": "$200.00"
},
"total_amount_v1": {
"value": "610.0000",
"displayValue": "$610.00"
},
"total_one_time_price": {
"value": "200.0000",
"displayValue": "$200.00"
},
"total_one_time_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_monthly_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_one_time_margin": {
"value": "200.0000",
"displayValue": "$200.00"
},
"total_monthly_margin": {
"value": "89.1666",
"displayValue": "$89.1666"
},
"total_margin_amount": {
"value": "200.0000",
"displayValue": "$200.00"
},
"total_one_time_margin_percentage": {
"value": "100.0000",
"displayValue": "$100.00"
},
"total_monthly_margin_percentage": {
"value": "100.0000",
"displayValue": "$100.00"
},
"total_margin_percentage": {
"value": "100.0000",
"displayValue": "$100.00"
}
},
"settings": {
"pricing_elements": "PRICE,COST,NET_PRICE,LINE_ROLLUPS,HEADER_ROLLUPS,ADJUSTMENTS"
}
}
}
Externe ID-Lösung
Dieses Beispiel zeigt, wie die Funktion zur Auflösung externer IDs beim Festlegen von auf „wahr“ festgelegt wird Preisliste Und Product_Offering An eine anwenderdefinierte zugeordnete Variable namens DOORSENSOR1 .
„Use_external_Code“: Wahr: Aktiviert die externe Codeauflösung„Preisliste“: „DOORSENSOR1“: Wert ist einer anwenderdefinierten Kontextvariablen für den Preis zugeordnet„Product_Offering“: „DOORSENSOR1“: Wert ist einer anwenderdefinierten Kontextvariablen für das Produkt zugeordnet
Beispiel: Curl-Anforderung.
curl "https://instance.servicenow.com/api/sn_csm_pricing/v1/pricingengine/computePrice" \
--request POST \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data '{
"header": {
"source_system": "ServiceNow Headless API",
"requesting_record_id": "QT0001101",
"currency": "USD",
"lineItems": [
{
"pricelist": "DOORSENSOR1",
"product_offering": "DOORSENSOR1",
"periodicity" : "",
"quantity": "1",
"unit_of_measure": "cb2795d553020110286eddeeff7b12ff",
"transaction_date": "2023-12-18 23:37:11",
"line_id": "CONNECTEDC1100"
}
],
"pricelist": "19d29513d0e63110f8770dbf976be122",
"transaction_date": "2023-12-18 23:37:11"
},
"settings": {
"pricing_elements": "PRICE,COST,NET_PRICE,LINE_ROLLUPS,HEADER_ROLLUPS,ADJUSTMENTS",
"disable_validation": true,
"use_external_code": true
}
}' \
--user 'username:password'
{
"result": {
"header": {
"currency": "USD",
"lineItems": [
{
"line_id": "CONNECTEDC1100",
"status": "Success",
"currency": "USD",
"base_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"list_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricelist": "DOORSENSOR1",
"quantity": "",
"price_list_line": "3e93e785d07a7910f8770dbf976be1ee",
"product_offering": "DOORSENSOR1",
"one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_net_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"cumulative_annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"unit_adjustment": {
"value": "0.0000",
"displayValue": "$0.00"
},
"term_month": {
"value": 0,
"displayValue": 0
},
"cumulative_annual_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"cumulative_monthly_recurring_price_v1": {
"value": 0,
"displayValue": 0
},
"total_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"pricingAdjustments": [],
"total_adjustment_amount": []
}
],
"status": "Success",
"total_monthly_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_monthly_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_annual_recurring_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_annual_recurring_price_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_amount": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_amount_v1": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_one_time_price": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_one_time_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_monthly_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_cost": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_one_time_margin": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_monthly_margin": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_margin_amount": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_one_time_margin_percentage": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_monthly_margin_percentage": {
"value": "0.0000",
"displayValue": "$0.00"
},
"total_margin_percentage": {
"value": "0.0000",
"displayValue": "$0.00"
}
},
"settings": {
"pricing_elements": "PRICE,COST,NET_PRICE,LINE_ROLLUPS,HEADER_ROLLUPS,ADJUSTMENTS",
"use_external_code": true
}
}
}