This service enables you to use Avalara AvaTax to perform the following actions on Order and Inventory Management documents:
- global AvalaraTaxCalculationService()
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> calculateTaxForPurchaseOrder(Set<Id> purchaseOrderIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> calculateTaxForApVoucher(Set<Id> apVoucherIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> postTaxForApVoucher(Set<Id> apVoucherIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> commitTaxForApVoucher(Set<Id> apVoucherIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> postAndCommitTaxForApVoucher(Set<Id> apVoucherIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> cancelTaxForApVoucher(Set<Id> apVoucherIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> calculateTaxForApVoucherCredit(Set<Id> apVoucherCreditIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> postTaxForApVoucherCredit(Set<Id> apVoucherCreditIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> commitTaxForApVoucherCredit(Set<Id> apVoucherCreditIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> postAndCommitTaxForApVoucherCredit(Set<Id> apVoucherCreditIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> cancelTaxForApVoucherCredit(Set<Id> apVoucherCreditIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> calculateTaxForCustomerQuotation(Set<Id> customerQuotationIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> calculateTaxForSalesOrder(Set<Id> salesOrderIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> calculateTaxForInvoice(Set<Id> invoiceIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> postTaxForInvoice(Set<Id> invoiceIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> commitTaxForInvoice(Set<Id> invoiceIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> postAndCommitTaxForInvoice(Set<Id> invoiceIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> cancelTaxForInvoice(Set<Id> invoiceIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> calculateTaxForCreditInvoice(Set<Id> creditInvoiceIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> postTaxForCreditInvoice(Set<Id> creditInvoiceIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> commitTaxForCreditInvoice(Set<Id> creditInvoiceIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> postAndCommitTaxForCreditInvoice(Set<Id> creditInvoiceIds)
- global static Map<Id, scmc.AvalaraTaxCalculationService.Result> cancelTaxForCreditInvoice(Set<Id> creditInvoiceIds)
calculateTaxForPurchaseOrder
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> calculateTaxForPurchaseOrder(Set<Id> purchaseOrderIds)
Calculates tax for the specified purchase orders.
Input Parameters
purchaseOrderIds |
Set<Id> |
IDs of the purchase orders for which tax is to be calculated. Due to Foundations limitation, only the first purchase order ID will be processed from the set of purchase order IDs. |
Return Value
Map that contains the ID of the purchase order and a result that indicates whether the action was successful and provides a user-friendly success or error message.
calculateTaxForApVoucher
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> calculateTaxForApVoucher(Set<Id> apVoucherIds)
Calculates tax for the specified AP vouchers.
Input Parameters
apVoucherIds |
Set<Id> |
IDs of the AP vouchers for which tax is to be calculated. Due to Foundations limitation, only the first AP voucher ID will be processed from the set of AP voucher IDs. |
Exceptions Thrown
SCMC.APVoucherException |
Thrown when the AP voucher is in a status where tax cannot be calculated. |
Return Value
Map that contains the ID of the AP voucher and a result that indicates whether the action was successful and provides a user-friendly success or error message.
postTaxForApVoucher
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> postTaxForApVoucher(Set<Id> apVoucherIds)
Posts tax in Avalara for the specified AP vouchers.
Note: You can only perform this action if the Disable Commit checkbox is deselected on the Tax Calculation Settings page.
Input Parameters
apVoucherIds |
Set<Id> |
IDs of the AP vouchers for which the tax is to be posted. Due to Foundations limitation, only the first AP voucher ID will be processed from the set of AP voucher IDs. |
Exceptions Thrown
SCMC.APVoucherException |
Thrown when the AP voucher is in a status where tax cannot be posted. |
Return Value
Map that contains the ID of the AP voucher and a result that indicates whether the action was successful and provides a user-friendly success or error message.
commitTaxForApVoucher
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> commitTaxForApVoucher(Set<Id> apVoucherIds)
Commits tax in Avalara for the specified AP vouchers.
Notes:
- You can only perform this action if the Disable Commit checkbox is deselected on the Tax Calculation Settings page.
- If the Posting Tax to Avalara Optional checkbox is selected on the Tax Calculation Settings page, this action first posts the tax and immediately commits it in Avalara.
Input Parameters
apVoucherIds |
Set<Id> |
IDs of the AP vouchers for which the tax is to be committed. Due to Foundations limitation, only the first AP voucher ID will be processed from the set of AP voucher IDs. |
Exceptions Thrown
SCMC.APVoucherException |
Thrown when the AP voucher is in a status where tax cannot be committed. |
Return Value
Map that contains the ID of the AP voucher and a result that indicates whether the action was successful and provides a user-friendly success or error message.
postAndCommitTaxForApVoucher
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> postAndCommitTaxForApVoucher(Set<Id> apVoucherIds)
Posts and commits tax in Avalara for the specified AP vouchers.
Note: You can only perform this action if the Disable Commit checkbox is deselected on the Tax Calculation Settings page.
Input Parameters
apVoucherIds |
Set<Id> |
IDs of the AP vouchers for which the tax is to be posted and committed. Due to Foundations limitation, only the first AP voucher ID will be processed from the set of AP voucher IDs. |
Exceptions Thrown
SCMC.APVoucherException |
Thrown when the AP voucher is in a status where tax cannot be posted or committed. |
Return Value
Map that contains the ID of the AP voucher and a result that indicates whether the action was successful and provides a user-friendly success or error message.
cancelTaxForApVoucher
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> cancelTaxForApVoucher(Set<Id> apVoucherIds)
Cancels tax in Avalara for the specified AP vouchers.
Input Parameters
apVoucherIds |
Set<Id> |
IDs of the AP vouchers for which the tax is to be canceled. Due to Foundations limitation, only the first AP voucher ID will be processed from the set of AP voucher IDs. |
Exceptions Thrown
SCMC.APVoucherException |
Thrown when the AP voucher is in a status where tax cannot be canceled. |
Return Value
Map that contains the ID of the AP voucher and a result that indicates whether the action was successful and provides a user-friendly success or error message.
calculateTaxForApVoucherCredit
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> calculateTaxForApVoucherCredit(Set<Id> apVoucherCreditIds)
Calculates tax for the specified AP voucher credits.
Input Parameters
apVoucherCreditIds |
Set<Id> |
IDs of the AP voucher credits for which tax is to be calculated. Due to Foundations limitation, only the first AP voucher credit ID will be processed from the set of AP voucher credit IDs. |
Return Value
Map that contains the ID of the AP voucher credit and a result that indicates whether the action was successful and provides a user-friendly success or error message.
postTaxForApVoucherCredit
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> postTaxForApVoucherCredit(Set<Id> apVoucherCreditIds)
Posts tax in Avalara for the specified AP voucher credits.
Note: You can only perform this action if the Disable Commit checkbox is deselected on the Tax Calculation Settings page.
Input Parameters
apVoucherCreditIds |
Set<Id> |
IDs of the AP voucher credits for which the tax is to be posted. Due to Foundations limitation, only the first AP voucher credit ID will be processed from the set of AP voucher credit IDs. |
Return Value
Map that contains the ID of the AP voucher credit and a result that indicates whether the action was successful and provides a user-friendly success or error message.
commitTaxForApVoucherCredit
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> commitTaxForApVoucherCredit(Set<Id> apVoucherCreditIds)
Commits tax in Avalara for the specified AP voucher credits.
Notes:
- You can only perform this action if the Disable Commit checkbox is deselected on the Tax Calculation Settings page.
- If the Posting Tax to Avalara Optional checkbox is selected on the Tax Calculation Settings page, this action first posts the tax and immediately commits it in Avalara.
Input Parameters
apVoucherCreditIds |
Set<Id> |
IDs of the AP voucher credits for which the tax is to be committed. Due to Foundations limitation, only the first AP voucher credit ID will be processed from the set of AP voucher credit IDs. |
Return Value
Map that contains the ID of the AP voucher credit and a result that indicates whether the action was successful and provides a user-friendly success or error message.
postAndCommitTaxForApVoucherCredit
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> postAndCommitTaxForApVoucherCredit(Set<Id> apVoucherCreditIds)
Posts and commits tax in Avalara for the specified AP voucher credits.
Note: You can only perform this action if the Disable Commit checkbox is deselected on the Tax Calculation Settings page.
Input Parameters
apVoucherCreditIds |
Set<Id> |
IDs of the AP voucher credits for which the tax is to be posted and committed. Due to Foundations limitation, only the first AP voucher credit ID will be processed from the set of AP voucher credit IDs. |
Return Value
Map that contains the ID of the AP voucher credit and a result that indicates whether the action was successful and provides a user-friendly success or error message.
cancelTaxForApVoucherCredit
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> cancelTaxForApVoucherCredit(Set<Id> apVoucherCreditIds)
Cancels tax in Avalara for the specified AP voucher credits.
Input Parameters
apVoucherCreditIds |
Set<Id> |
IDs of the AP voucher credits for which the tax is to be canceled. Due to Foundations limitation, only the first AP voucher credit ID will be processed from the set of AP voucher credit IDs. |
Return Value
Map that contains the ID of the AP voucher credit and a result that indicates whether the action was successful and provides a user-friendly success or error message.
calculateTaxForCustomerQuotation
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> calculateTaxForCustomerQuotation(Set<Id> customerQuotationIds)
Calculates tax for the specified customer quotations.
Input Parameters
customerQuotationIds |
Set<Id> |
IDs of the customer quotations for which tax is to be calculated. Due to Foundations limitation, only the first customer quotation ID will be processed from the set of customer quotation IDs. |
Return Value
Map that contains the ID of the customer quotation and a result that indicates whether the action was successful and provides a user-friendly success or error message.
calculateTaxForSalesOrder
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> calculateTaxForSalesOrder(Set<Id> salesOrderIds)
Calculates tax for the specified sales orders.
Input Parameters
salesOrderIds |
Set<Id> |
IDs of the sales orders for which tax is to be calculated. Due to Foundations limitation, only the first sales order ID will be processed from the set of sales order IDs. |
Return Value
Map that contains the ID of the sales order and a result that indicates whether the action was successful and provides a user-friendly success or error message.
calculateTaxForInvoice
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> calculateTaxForInvoice(Set<Id> invoiceIds)
Calculates tax for the specified invoices.
Input Parameters
invoiceIds |
Set<Id> |
IDs of the invoices for which tax is to be calculated. Due to Foundations limitation, only the first invoice ID will be processed from the set of invoice IDs. |
Exceptions Thrown
SCMC.SCMException |
Thrown when tax was already committed or canceled for the invoice. |
Return Value
Map that contains the ID of the invoice and a result that indicates whether the action was successful and provides a user-friendly success or error message.
postTaxForInvoice
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> postTaxForInvoice(Set<Id> invoiceIds)
Posts tax in Avalara for the specified invoices.
Note: You can only perform this action if the Disable Commit checkbox is deselected on the Tax Calculation Settings page.
Input Parameters
invoiceIds |
Set<Id> |
IDs of the invoices for which the tax is to be posted. Due to Foundations limitation, only the first invoice ID will be processed from the set of invoice IDs. |
Exceptions Thrown
SCMC.SCMException |
Thrown when tax was already posted, committed, or canceled for the invoice. |
Return Value
Map that contains the ID of the invoice and a result that indicates whether the action was successful and provides a user-friendly success or error message.
commitTaxForInvoice
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> commitTaxForInvoice(Set<Id> invoiceIds)
Commits tax in Avalara for the specified invoices.
Notes:
- You can only perform this action if the Disable Commit checkbox is deselected on the Tax Calculation Settings page.
- If the Posting Tax to Avalara Optional checkbox is selected on the Tax Calculation Settings page, this action first posts the tax and immediately commits it in Avalara.
Input Parameters
invoiceIds |
Set<Id> |
IDs of the invoices for which the tax is to be committed. Due to Foundations limitation, only the first invoice ID will be processed from the set of invoice IDs. |
Exceptions Thrown
SCMC.SCMException |
Thrown when tax was already committed or canceled for the invoice. |
Return Value
Map that contains the ID of the invoice and a result that indicates whether the action was successful and provides a user-friendly success or error message.
postAndCommitTaxForInvoice
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> postAndCommitTaxForInvoice(Set<Id> invoiceIds)
Posts and commits tax in Avalara for the specified invoices.
Note: You can only perform this action if the Disable Commit checkbox is deselected on the Tax Calculation Settings page.
Input Parameters
invoiceIds |
Set<Id> |
IDs of the invoices for which the tax is to be posted and committed. Due to Foundations limitation, only the first invoice ID will be processed from the set of invoice IDs. |
Exceptions Thrown
SCMC.SCMException |
Thrown when tax was already posted, committed, or canceled for the invoice. |
Return Value
Map that contains the ID of the invoice and a result that indicates whether the action was successful and provides a user-friendly success or error message.
cancelTaxForInvoice
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> cancelTaxForInvoice(Set<Id> invoiceIds)
Cancels tax in Avalara for the specified invoices.
Input Parameters
invoiceIds |
Set<Id> |
IDs of the invoices for which the tax is to be canceled. Due to Foundations limitation, only the first invoice ID will be processed from the set of invoice IDs. |
Return Value
Map that contains the ID of the invoice and a result that indicates whether the action was successful and provides a user-friendly success or error message.
calculateTaxForCreditInvoice
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> calculateTaxForCreditInvoice(Set<Id> creditInvoiceIds)
Calculates tax for the specified credit invoices.
Input Parameters
creditInvoiceIds |
Set<Id> |
IDs of the credit invoices for which tax is to be calculated. Due to Foundations limitation, only the first credit invoice ID will be processed from the set of credit invoice IDs. |
Exceptions Thrown
SCMC.SCMException |
Thrown when tax was already committed or canceled for the credit invoice. |
Return Value
Map that contains the ID of the credit invoice and a result that indicates whether the action was successful and provides a user-friendly success or error message.
postTaxForCreditInvoice
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> postTaxForCreditInvoice(Set<Id> creditInvoiceIds)
Posts tax in Avalara for the specified credit invoices.
Note: You can only perform this action if the Disable Commit checkbox is deselected on the Tax Calculation Settings page.
Input Parameters
creditInvoiceIds |
Set<Id> |
IDs of the credit invoices for which the tax is to be posted. Due to Foundations limitation, only the first credit invoice ID will be processed from the set of credit invoice IDs. |
Exceptions Thrown
SCMC.SCMException |
Thrown when tax was already posted, committed, or canceled for the credit invoice. |
Return Value
Map that contains the ID of the credit invoice and a result that indicates whether the action was successful and provides a user-friendly success or error message.
commitTaxForCreditInvoice
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> commitTaxForCreditInvoice(Set<Id> creditInvoiceIds)
Commits tax in Avalara for the specified credit invoices.
Notes:
- You can only perform this action if the Disable Commit checkbox is deselected on the Tax Calculation Settings page.
- If the Posting Tax to Avalara Optional checkbox is selected on the Tax Calculation Settings page, this action first posts the tax and immediately commits it in Avalara.
Input Parameters
creditInvoiceIds |
Set<Id> |
IDs of the invoices for which the tax is to be committed. Due to Foundations limitation, only the first credit invoice ID will be processed from the set of credit invoice IDs. |
Exceptions Thrown
SCMC.SCMException |
Thrown when tax was already committed or canceled for the credit invoice. |
Return Value
Map that contains the ID of the credit invoice and a result that indicates whether the action was successful and provides a user-friendly success or error message.
postAndCommitTaxForCreditInvoice
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> postAndCommitTaxForCreditInvoice(Set<Id> creditInvoiceIds)
Posts and commits tax in Avalara for the specified credit invoices.
Note: You can only perform this action if the Disable Commit checkbox is deselected on the Tax Calculation Settings page.
Input Parameters
creditInvoiceIds |
Set<Id> |
IDs of the credit invoices for which the tax is to be posted and committed. Due to Foundations limitation, only the first credit invoice ID will be processed from the set of credit invoice IDs. |
Exceptions Thrown
SCMC.SCMException |
Thrown when tax was already posted, committed, or canceled for the credit invoice. |
Return Value
Map that contains the ID of the credit invoice and a result that indicates whether the action was successful and provides a user-friendly success or error message.
cancelTaxForCreditInvoice
global static Map<Id, scmc.AvalaraTaxCalculationService.Result> cancelTaxForCreditInvoice(Set<Id> creditInvoiceIds)
Cancels tax in Avalara for the specified credit invoices.
Input Parameters
creditInvoiceIds |
Set<Id> |
IDs of the credit invoices for which the tax is to be canceled. Due to Foundations limitation, only the first credit invoice ID will be processed from the set of credit invoice IDs. |
Return Value
Map that contains the ID of the credit invoice and a result that indicates whether the action was successful and provides a user-friendly success or error message.