Salesforce Billing Standard Objects
TaxParameters Class
TaxResults Class
TaxEngines Interface
REST API for Converting Invoice Lines with Negative Balances
Previous Versions
Your tax engine implements this interface. It contains methods for calculating tax, clearing in-memory entities from the previous call, and clearing legal references from the previous call.
blng
Learn more about the methods available with the TaxEngines interface.
Learn more about the methods available with the TaxEngines interface.
The TaxEngines interface includes these methods.
Sets the in-memory IDs, such as credit note IDs, debit note IDs, to null.
Sets the in-memory list of legal entities to null.
calculateTax(taxParametersInstance)
Returns the calculated tax for the specified taxParametersInstance parameter.
Sets the in-memory IDs, such as credit note IDs, debit note IDs, to null.
global static Void resetSObjectListofIds()
Type: Void
Sets the in-memory list of legal entities to null.
global static Void resetLegalEntityReferences()
Type: Void
Returns the calculated tax for the specified taxParametersInstance parameter.
global static Map<Id,TaxResults> calculateTax(TaxParameters taxParametersInstance)
taxParametersInstance: Type: TaxParameters
The taxParametersInstance parameter is populated based on the process that uses tax calculation. These examples show the sample values for each process.
Order is created
1TaxParameters:[
2 isCommitOnGetTax=false,
3 isStandardFromBatch=false,
4 legalEntityReference=80105000000i1MqAAI,
5 listOfSObjectIds=(),
6 listOfSObjects=(),
7 mapOfSObjectByUniqueId={},
8 mapOfTaxResultsById={},
9 mapOfTaxTreatmentById={},
10 sObjectId=null,
11 sObjectTypeInstance=OrderItem,
12 sobjectInstance=null,
13 taxMethod=null
14]Bill Now or Invoice is created
1TaxParameters:[
2 isCommitOnGetTax=false,
3 isStandardFromBatch=false,
4 legalEntityReference=a2305000000BKIoAAO,
5 listOfSObjectIds=(),
6 listOfSObjects=(),
7 mapOfSObjectByUniqueId={},
8 mapOfTaxResultsById={},
9 mapOfTaxTreatmentById={},
10 sObjectId=null,
11 sObjectTypeInstance=blng__InvoiceLine__c,
12 sobjectInstance=null,
13 taxMethod=null
14]Invoice is manually posted
1TaxParameters:[
2isCommitOnGetTax=false,
3 isStandardFromBatch=false,
4 legalEntityReference=null,
5 listOfSObjectIds=(a2305000000BKIoAAO),
6 listOfSObjects=(),
7 mapOfSObjectByUniqueId={},
8 mapOfTaxResultsById={},
9 mapOfTaxTreatmentById={},
10 sObjectId=null,
11 sObjectTypeInstance=blng__Invoice__c,
12 sobjectInstance=null,
13 taxMethod=postTax
14]Type: Map<Id,TaxResults>