Price Book Object Import/Export

Use the pricebook.xsd schema file to import price books.

Granularity: selected price book.

Deleting Price Tables

You can use the price book import to delete all price tables associated with a specific SKU with a single line using the delete-all attribute, as follows:

<price-table product-id="xyz" mode="delete-all" /> 

Import Mode and Storefront Visibility

If you import your price book in UPDATE mode, each row in the price book table is updated in one transaction and the new price is visible in the storefront after the transaction is committed.

When updating price tables, remember that a product can have only one active price table at a time. Don’t update a price table’s online dates to overlap the online dates of another price table for the same product.

If you import in REPLACE mode, the whole price book is loaded in one transaction and the new prices shown after transaction commit. The prices for the cart are not cached but the script calculateCart.ds loads the price for a line item. Price book changes made in this mode are visible in the storefront after the transaction has been committed. If a line item price changes after the price book load, the new price is visible in the cart as well.

If you import a read-only price book, the import speed is reduced by at least 60%. However, the prices can't be manually edited in Business Manager. Read-only price books should be imported in REPLACE mode for the fastest import times and fewest import failures. To use read-only price books, contact Salesforce Customer Support to have the High Scale Price Books feature enabled.

You can't change the currency of a price book using import in MERGE or UPDATE mode. However, you can change the currency of a price book in REPLACE mode.

If you import your price book in DELETE mode, the complete price book is deleted, instead of just the price assignments of SKUs listed in the XML.

If you don't plan to reuse the price book, we recommend creating a custom job calling script API PriceBookMgr.unassignPriceBookFromAllSites(PriceBook) to remove all price book site assignments for that price book after the price book is deleted.

Price book import ignores price books that contain a negative amount or quantity value. The problem is reported in the import log.

Price book import rejects price books with unknown currencies. The system reports a data warning.

Read-Only Price Books

Delete and Delete-all are the only mode attributes supported for read only price books. If you import a read only price book in REPLACE mode with any mode attribute, the import succeeds but ignores the mode attribute. If you import a read-only price book in MERGE or UPDATE mode with the delete attribute, it behaves the same as an editable price book.

Read-only price books process Delete-all imports first. For example, you’re selling scarves with a tiered pricing structure. If a shopper buys one, they cost three dollars each. If the shopper buys five scarves, they cost two dollars each. You want to update your pricing for the scarves so that they cost two dollars and fifty cents regardless of how many are purchased. You can update the price table using the Delete-all import mode.

When importing a read-only price book, you can’t specify a <targetNamespace> value.

Table 1. Example
Price Table Name Price Table Value
Original Price Table

<price-table product-id="scarf">

<amount quantity="1">3.00</amount>

<amount quantity="5">2.00</amount>


Imported Price Table

<price-table product-id="scarf">

<amount quantity="1">2.50</amount>


<price-table product-id="scarf" mode="delete-all">


New Price Table

<price-table product-id="scarf">

<amount quantity="1">2.50</amount>


After the import, only the price in the new price table takes effect. All scarves cost two dollars and fifty cents, regardless of quantity purchased.




Granularity: passed price books.
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.