Custom price book (CPB) showing a 500 error
search cancel

Custom price book (CPB) showing a 500 error

book

Article ID: 284440

calendar_today

Updated On:

Products

CloudHealth

Issue/Introduction

A 500 error is usually seen for 2 reasons:

- When the request JSON format is not correct (should match with screenshot)
- Double quotes are not added for each parameter.  It is mandatory to add double quotes ("") for each parameter.

Resolution

Example:

{
  "book_name": "Test Book name",
  "specification": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<CHBillingRules createdBy=\"[email protected]\" date=\"2019-01-01\">\n  <Comment>This is the Price Book specification for a Customer</Comment>\n  <RuleGroup startDate=\"2021-12-01\">\n    <BillingRule name=\"Zero out EDP Credits\" includeDataTransfer=\"true\">\n      <BasicBillingRule billingAdjustment=\"0.0\" billingRuleType=\"fixedRate\" />\n      <Product productName=\"ANY\">\n        <LineItemDescription contains=\"Enterprise Program Discount\" />\n      </Product>\n    </BillingRule>\n  </RuleGroup>\n</CHBillingRules>"
}