Guides and Examples
...
Quotes
Multi-Currency
21 min
multi currency the nue cpq quote api supports creating quotes in different currencies when your org has multi currency enabled set the currencyisocode field at the quote level to control which currency the pricing engine uses for pbe resolution and amount calculations prerequisites before using multi currency quotes, ensure the following multi currency is enabled in your nue org price book entries (pbes) exist for the target currency each product must have a pbe in the requested currency currency iso codes follow the iso 4217 standard (e g , usd , eur , gbp , jpy ) if a product does not have a price book entry for the requested currency, the api returns an error setting the currency include currencyisocode as a top level field in the request body { "opportunityid" "006xx000001abc123", "name" "eur quote", "currencyisocode" "eur", "products" \[ ] } the pricing engine resolves pbes in the specified currency and calculates all amounts in that currency pbe currency matching request currency pbe currency result "eur" eur pbe exists eur pbe is used; amounts in eur "eur" no eur pbe error pricebook entry mismatch (omitted) default currency pbe exists default org currency is used (omitted) no default pbe error pricebook entry mismatch authentication const myheaders = new headers(); myheaders append("nue api key", "your api key here"); myheaders append("content type", "application/json"); use case 1 eur standalone product create a preview quote for a standalone product priced in euros const myheaders = new headers(); myheaders append("nue api key", "your api key here"); myheaders append("content type", "application/json"); const quotedata = { opportunityid "006xx000001abc123", name "eu enterprise license", subscriptionstartdate "2026 01 01", subscriptionenddate "2027 01 01", subscriptiontermdimension "month", subscriptionterm 12, currencyisocode "eur", products \[ { productsku "nue on salesforce", uom "user/month", quantity 10 } ] }; fetch('https //api nue io/cpq/quotes\ preview', { method 'post', headers myheaders, body json stringify(quotedata) }) then(response => response json()) then(result => { console log(`currency ${result quote currencyisocode}`); // "eur" console log(`total amount ${result quote totalamount}`); }) catch(error => console log('error ', error)); curl x post 'https //api nue io/cpq/quotes\ preview' \\ h 'nue api key your api key here' \\ h 'content type application/json' \\ d '{ "opportunityid" "006xx000001abc123", "name" "eu enterprise license", "subscriptionstartdate" "2026 01 01", "subscriptionenddate" "2027 01 01", "subscriptiontermdimension" "month", "subscriptionterm" 12, "currencyisocode" "eur", "products" \[ { "productsku" "nue on salesforce", "uom" "user/month", "quantity" 10 } ] }' the pricing engine resolves the eur price book entry for nue on salesforce and returns all amounts in euros use case 2 usd baseline comparison create the same quote in usd for side by side comparison with the eur quote const quotedata = { opportunityid "006xx000001abc123", name "us enterprise license", subscriptionstartdate "2026 01 01", subscriptionenddate "2027 01 01", subscriptiontermdimension "month", subscriptionterm 12, currencyisocode "usd", products \[ { productsku "nue on salesforce", uom "user/month", quantity 10 } ] }; fetch('https //api nue io/cpq/quotes\ preview', { method 'post', headers myheaders, body json stringify(quotedata) }) then(response => response json()) then(result => { console log(`currency ${result quote currencyisocode}`); // "usd" console log(`total amount $${result quote totalamount}`); }) catch(error => console log('error ', error)); curl x post 'https //api nue io/cpq/quotes\ preview' \\ h 'nue api key your api key here' \\ h 'content type application/json' \\ d '{ "opportunityid" "006xx000001abc123", "name" "us enterprise license", "subscriptionstartdate" "2026 01 01", "subscriptionenddate" "2027 01 01", "subscriptiontermdimension" "month", "subscriptionterm" 12, "currencyisocode" "usd", "products" \[ { "productsku" "nue on salesforce", "uom" "user/month", "quantity" 10 } ] }' the usd and eur quotes use different pbes with potentially different list prices compare totalamount values across both responses use case 3 no pbe for requested currency (error) if you request a currency for which no price book entry exists, the api returns an error const quotedata = { opportunityid "006xx000001abc123", name "jpy quote no pbe", subscriptionstartdate "2026 01 01", subscriptionenddate "2027 01 01", subscriptiontermdimension "month", subscriptionterm 12, currencyisocode "jpy", products \[ { productsku "nue on salesforce", uom "user/month", quantity 10 } ] }; fetch('https //api nue io/cpq/quotes\ preview', { method 'post', headers myheaders, body json stringify(quotedata) }) then(response => response json()) then(result => { if (result status === 400) { console log('error ', result message); // "no price book entry found for product nue on salesforce with currency jpy" } }) catch(error => console log('error ', error)); curl x post 'https //api nue io/cpq/quotes\ preview' \\ h 'nue api key your api key here' \\ h 'content type application/json' \\ d '{ "opportunityid" "006xx000001abc123", "name" "jpy quote no pbe", "subscriptionstartdate" "2026 01 01", "subscriptionenddate" "2027 01 01", "subscriptiontermdimension" "month", "subscriptionterm" 12, "currencyisocode" "jpy", "products" \[ { "productsku" "nue on salesforce", "uom" "user/month", "quantity" 10 } ] }' expected error response { "status" 400, "error" "failed to create quote", "message" "no price book entry found for product nue on salesforce with currency jpy" } use case 4 eur bundles multi currency works with bundles all products in the bundle parent and add ons must have pbes in the target currency const quotedata = { opportunityid "006xx000001abc123", name "eur bundle quote", subscriptionstartdate "2026 01 01", subscriptionenddate "2027 01 01", subscriptiontermdimension "month", subscriptionterm 12, currencyisocode "eur", products \[ { productsku "enterprise bundle", uom "license/month", quantity 20, addons \[ { productsku "addon support", uom "license/month", quantity 1 }, { productsku "addon storage", uom "gb/month", quantity 100 } ] } ] }; fetch('https //api nue io/cpq/quotes\ preview', { method 'post', headers myheaders, body json stringify(quotedata) }) then(response => response json()) then(result => { console log(`currency ${result quote currencyisocode}`); // "eur" console log(`bundle total ${result quote totalamount}`); const parent = result quotelineitems\[0]; console log(`parent ${parent totalprice}`); parent childrenlineitems foreach(child => { console log(` ${child product sku} ${child totalprice}`); }); }) catch(error => console log('error ', error)); curl x post 'https //api nue io/cpq/quotes\ preview' \\ h 'nue api key your api key here' \\ h 'content type application/json' \\ d '{ "opportunityid" "006xx000001abc123", "name" "eur bundle quote", "subscriptionstartdate" "2026 01 01", "subscriptionenddate" "2027 01 01", "subscriptiontermdimension" "month", "subscriptionterm" 12, "currencyisocode" "eur", "products" \[ { "productsku" "enterprise bundle", "uom" "license/month", "quantity" 20, "addons" \[ { "productsku" "addon support", "uom" "license/month", "quantity" 1 }, { "productsku" "addon storage", "uom" "gb/month", "quantity" 100 } ] } ] }' if any add on is missing an eur pbe, the entire quote request fails with a pricebook entry mismatch error use case 5 eur with discounts discounts work identically regardless of currency the discount percentage is applied to the currency specific list price const quotedata = { opportunityid "006xx000001abc123", name "eur with discount", subscriptionstartdate "2026 01 01", subscriptionenddate "2027 01 01", subscriptiontermdimension "month", subscriptionterm 12, currencyisocode "eur", discount 10, products \[ { productsku "nue on salesforce", uom "user/month", quantity 10, discount 15 } ] }; fetch('https //api nue io/cpq/quotes\ preview', { method 'post', headers myheaders, body json stringify(quotedata) }) then(response => response json()) then(result => { const line = result quotelineitems\[0]; console log(`list price (eur) ${line listtotalprice}`); console log(`discount ${line discount}%`); // 15% (line level overrides header) console log(`total price (eur) ${line totalprice}`); }) catch(error => console log('error ', error)); curl x post 'https //api nue io/cpq/quotes\ preview' \\ h 'nue api key your api key here' \\ h 'content type application/json' \\ d '{ "opportunityid" "006xx000001abc123", "name" "eur with discount", "subscriptionstartdate" "2026 01 01", "subscriptionenddate" "2027 01 01", "subscriptiontermdimension" "month", "subscriptionterm" 12, "currencyisocode" "eur", "discount" 10, "products" \[ { "productsku" "nue on salesforce", "uom" "user/month", "quantity" 10, "discount" 15 } ] }' the line level 15% discount overrides the header level 10% discount, applied to the eur list price use case 6 eur with quantity scaling quantity scaling works the same across currencies the pricing formula listprice x quantity x term uses the currency specific list price const quotedata = { opportunityid "006xx000001abc123", name "eur quantity scaling", subscriptionstartdate "2026 01 01", subscriptionenddate "2027 01 01", subscriptiontermdimension "month", subscriptionterm 12, currencyisocode "eur", products \[ { productsku "nue on salesforce", uom "user/month", quantity 5 } ] }; fetch('https //api nue io/cpq/quotes\ preview', { method 'post', headers myheaders, body json stringify(quotedata) }) then(response => response json()) then(result => { const line = result quotelineitems\[0]; console log(`unit price (eur) ${line listunitprice}`); console log(`quantity ${line quantity}`); // 5 console log(`term 12 months`); console log(`list total ${line listtotalprice}`); // unitprice 5 12 console log(`total ${line totalprice}`); }) catch(error => console log('error ', error)); curl x post 'https //api nue io/cpq/quotes\ preview' \\ h 'nue api key your api key here' \\ h 'content type application/json' \\ d '{ "opportunityid" "006xx000001abc123", "name" "eur quantity scaling", "subscriptionstartdate" "2026 01 01", "subscriptionenddate" "2027 01 01", "subscriptiontermdimension" "month", "subscriptionterm" 12, "currencyisocode" "eur", "products" \[ { "productsku" "nue on salesforce", "uom" "user/month", "quantity" 5 } ] }' the listtotalprice is calculated as eur listunitprice x 5 x 12 use case 7 missing currencyisocode in multi currency org when currencyisocode is omitted in a multi currency org, the pricing engine falls back to the org's default currency const quotedata = { opportunityid "006xx000001abc123", name "default currency fallback", subscriptionstartdate "2026 01 01", subscriptionenddate "2027 01 01", subscriptiontermdimension "month", subscriptionterm 12, products \[ { productsku "nue on salesforce", uom "user/month", quantity 10 } ] }; fetch('https //api nue io/cpq/quotes\ preview', { method 'post', headers myheaders, body json stringify(quotedata) }) then(response => response json()) then(result => { console log(`currency ${result quote currencyisocode}`); // org's default (e g , "usd") console log(`total amount ${result quote totalamount}`); }) catch(error => console log('error ', error)); curl x post 'https //api nue io/cpq/quotes\ preview' \\ h 'nue api key your api key here' \\ h 'content type application/json' \\ d '{ "opportunityid" "006xx000001abc123", "name" "default currency fallback", "subscriptionstartdate" "2026 01 01", "subscriptionenddate" "2027 01 01", "subscriptiontermdimension" "month", "subscriptionterm" 12, "products" \[ { "productsku" "nue on salesforce", "uom" "user/month", "quantity" 10 } ] }' the response's currencyisocode reflects the org's default currency pbe resolution uses that default currency multi currency behavior summary behavior description currency field set currencyisocode at the quote level (top level property) pbe resolution engine resolves pbes matching the requested currency all or nothing every product in the quote must have a pbe in the target currency discount behavior percentage discounts work identically across currencies amount discounts fixed discountamount values are in the specified currency default fallback if currencyisocode is omitted, the org's default currency is used bundle support all bundle components must have pbes in the target currency troubleshooting symptom likely cause resolution pricebook entry mismatch error no pbe exists for the requested currency create pbes in the target currency for all products partial bundle failure one add on missing a currency pbe ensure all bundle components have pbes in the target currency unexpected currency in response currencyisocode not set in request explicitly set currencyisocode in the request body wrong amounts pbe list price not set for currency verify the list price on the currency specific pbe