This API allows you to calculate tax for credit memo generated by the createCreditRebill API. For more information, see Creating Credit and Rebill Credit Memos and Calculating Tax for Credit and Rebill.

You must call the calculateTaxForCreditRebill API after calling the createCreditRebill API, when the following scenarios true:

  • You have defined the TestTaxCallbackWithExternalCallout callback class in Setup > Develop > Custom Settings > Config Custom Classes > Tax Callback Class.
  • You want to select both Auto Approve credit memo and Unrate the usage inputs options.
APISignature
calculateTaxForCreditRebillstatic Map calculateTaxForCreditRebill(Id creditMemoId, Boolean autoApproveCreditMemo, Boolean unrateUsageInputs)

This API accepts the following input parameters. 

Request

Field

Type

Required?

Description

creditMemoId

IdYes

ID of the credit memo.

autoApproveCreditMemoBooleanYesIf set to true, Conga Billing auto-approves credit memos.
unrateUsageInputsBooleanYesIf set to true, Conga Billing unrates usage inputs.

The API returns a Map<String, Value> as a response parameter.

Response

Field

Type

Description

Result

MapThe result map contains the success string and a value

If the API executes successfully, the value contains the following keys: 

  • success - set to true
  • creditMemoId - the ID of the created credit memo

If the API is not executed successfully,  the value contains the following keys: 

  • success - set to false
  • errorMessage - contains the error message
  • stackTrace - contains the stackTrack of the API call