Tax Mappings for Invoices and Credits

You can extend and customize the existing tax interface by using custom metadata types and tax mappings. These customizations help you with unique business requirements such as the inclusion of specific data for accurate calculations and audits.

Here are some prerequisites before you work with the tax mappings for invoices and credits.

Request Mappings for Header Attributes 

This table defines the request mappings between the header attributes of a tax callout and fields of applicable objects.

Header AttributesInvoice MappingNegative Invoice MappingCredit Mapping
currencyIsoCodeInvoice.CurrencyISOCodeInvoice.CurrencyISOCodeCreditMemo.CurrencyISOCode
isCommitIf status is DRAFT then this value is False. If status is POSTED, then this value is True.If status is DRAFT then this value is False. If status is POSTED, then this value is True.This value is True until Summer ’25. From Winter ’26, if status is DRAFT, then this value is False. If status is POSTED, then this value is True.
referenceEntityIdInvoice.IDInvoice.IDCreditMemo.ID
taxEngineIdTaxTreatment.TaxEngine.IDTaxTreatment.TaxEngine.IDTaxTreatment.TaxEngine.ID
transactionDateSystemDateSystemDateSystemDate
sellerDetails   
codeTaxEngine.SellerCodeTaxEngine.SellerCodeTaxEngine.SellerCode
customerDetails   
accountIdInvoice.BillingAccount.IDInvoice.BillingAccount.IDCreditMemo.BillingAccount.ID
codeNULLNULLNULL
exemptionNoInvoice.BillingAccount.TaxExemptionNumber. Available from Spring ’26.Invoice.BillingAccount.TaxExemptionNumber. Available from Spring ’26.CreditMemo.BillingAccount.TaxExemptionNumber. Available from Spring ’26.
exemptionReasonNULLNULLNULL
exemptionStatusInvoice.BillingAccount.TaxExemptionStatus. Available from Spring ’26.Invoice.BillingAccount.TaxExemptionStatus. Available from Spring ’26.CreditMemo.BillingAccount.TaxExemptionStatus. Available from Spring ’26.
exemptionExpirationDateInvoice.BillingAccount.TaxExemptionExpirationDate. Available from Spring ’26.Invoice.BillingAccount.TaxExemptionExpirationDate. Available from Spring ’26.CreditMemo.BillingAccount.TaxExemptionExpirationDate. Available from Spring ’26.
deliveryTermsInvoice.BillingAccount.DeliveryTerms. Available from Spring ’26.Invoice.BillingAccount.DeliveryTerms. Available from Spring ’26.CreditMemo.BillingAccount.DeliveryTerms. Available from Spring ’26.
billingProfileIdInvoice.BillingAccount.ID. Available from Spring ’26.Invoice.BillingAccount.ID. Available from Spring ’26.CreditMemo.BillingAccount.ID. Available from Spring ’26.
additionalTaxIdentificationDetailsInvoice.BillingAccount.AddTaxIdentificationDetails. Available from Spring ’26.Invoice.BillingAccount.AddTaxIdentificationDetails. Available from Spring ’26.CreditMemo.BillingAccount.AddTaxIdentificationDetails. Available from Spring ’26.
taxIdentificationNumberInvoice.BillingAccount.TaxIdentificationNumber. Available from Spring ’26.Invoice.BillingAccount.TaxIdentificationNumber. Available from Spring ’26.CreditMemo.BillingAccount.TaxIdentificationNumber. Available from Spring ’26.
taxTypeIf status is DRAFT, then this value is Estimated. If status is POSTED, then this value is Actual.If status is DRAFT, then this value is Estimated. If status is POSTED, then this value is Actual.This value is Actual until Summer ’25. From Winter ’26, if status is DRAFT, then this value is Estimated. If status is POSTED, then this value is Actual.
taxTransactionTypeDebitCreditCredit
effectiveDateinvoice.InvoiceDateIf you’re creating from negative lines, then this value is the original Invoice.InvoiceDate value.If you’re using standalone credit memo, then this value is the CreditMemo.CreditDate value.
addresses   
billToNULLNULLNULL
shipToNULLNULLNULL
shipFromNULLNULLNULL
soldToNULLNULLNULL
taxEngineAddressTaxEngine.AddressTaxEngine.AddressTaxEngine.Address
referenceDocumentCodeNULLIf you’re converting from negative lines, then this value is the original document code Invoice.ID & "Debit" & TaxEngine.ID.If you’re using standalone credit memo, then this value is NULL. Otherwise, this value is the documentCode value of the original invoice.
descriptionInvoice.DescriptionInvoice.DescriptionInvoice.Description
documentCodeInvoice.ID & "_Debit_" & TaxEngine.IDInvoice.ID & "_Credit_" & TaxEngine.IDCreditMemo.ID & "_Credit_" & TaxEngine.ID
shouldVoidFALSEFrom Winter ’26, if the request is to void a posted invoice, then this value is TRUE. Else, it is FALSE.FALSE
lineItemsRefer to the next line attributes section.Refer to the next line attributes section.Refer to the next line attributes section.

Request Mappings for Line Attributes 

This table defines the request mappings between the line attributes of a tax callout and fields of applicable objects.

Line AttributesInvoice MappingNegative InvoicesCredit Mapping
taxCodeTaxTreatment.TaxCodeTaxTreatment.TaxCodeTaxTreatment.TaxCode
productCodeTaxTreatment.ProductCodeTaxTreatment.ProductCodeTaxTreatment.ProductCode
productIdInvoiceLine.ProductIdInvoiceLine.ProductIdProductId
amountInvoiceLine.ChargeAmountInvoiceLine.ChargeAmountCreditMemoLine.ChargeAmount
effectiveDateInvoiceLine.Invoice.InvoiceDateIf you’re creating from negative lines, then this value is the original Invoice.InvoiceDate value.CreditMemoLine.CreditMemo.CreditDate
lineNumberInvoiceLine.IDInvoiceLine.IDCreditMemoLine.ID
descriptionInvoiceLine.DescriptionInvoiceLine.DescriptionCreditMemoLine.Description
quantityInvoiceLine.QuantityInvoiceLine.QuantityNULL
addresses   
billToInvoiceLine.BillingAddress.AddressInvoiceLine.BillingAddress.AddressCreditMemoLine.BillingAddress.Address
shipToInvoiceLine.ShippingAddress.AddressInvoiceLine.ShippingAddress.AddressCreditMemoLine.ShippingAddress.Address
shipFromInvoiceLine.ShippingFrom.AddressInvoiceLine.ShippingFrom.AddressCreditMemoLine.ShippingFrom.Address
soldToNULLNULLNULL
productskuInvoiceLine.Product.productCodeInvoiceLine.Product.productCodeCreditMemoLine.Product.productCode
referenceDocumentCodeNULLIf you’re converting from negative lines, then this value is the original Document Code - "Invoice.ID" & "Debit" & TaxEngine.ID.If you’re using standalone credit memo, then this value is NULL. Otherwise, this value is the documentCode value of the original invoice.

Response Mappings for Header Attributes 

This table defines the response mappings between the header attributes of a tax callout and fields of applicable objects. This response structure is used to create the InvoiceLineTax records.

Header AttributesInvoice MappingNegative Invoice MappingCredit Mapping
currencyIsoCodeInvoice.CurrencyISOCodeInvoice.CurrencyISOCodeCreditMemo.CurrencyISOCode
isCommitNot persisted.Not persisted.Not persisted.
referenceEntityIdInvoice.IDInvoice.IDCreditMemo.ID
taxEngineIdTaxTreatment.TaxEngine.IDTaxTreatment.TaxEngine.IDTaxTreatment.TaxEngine.ID
transactionDateSystemDateSystemDateSystemDate
sellerDetails   
codeTaxEngine.SellerCodeTaxEngine.SellerCodeTaxEngine.SellerCode
customerDetails   
accountIdInvoice.BillingAccount.IDInvoice.BillingAccount.IDInvoice.BillingAccount.ID
codeNot persisted.Not persisted.Not persisted.
exemptionNoNot persisted.Not persisted.Not persisted.
exemptionReasonNot persisted.Not persisted.Not persisted.
taxTypeIf status is DRAFT, then this value is Estimated. If status is POSTED, then this value is Actual.If status is DRAFT, then this value is Estimated. If status is POSTED, then this value is Actual.Actual
taxTransactionTypeDebitCreditCredit
effectiveDateinvoice.InvoiceDateIf you’re creating from negative lines, then this value is the original Invoice.InvoiceDate value.If you’re using standalone credit memo, then this value is the CreditMemo.CreditDate value. If you’re creating from negative lines, then this value is the original Invoice.InvoiceDate value.
addresses   
billToNot persisted.Not persisted.Not persisted.
shipToNot persisted.Not persisted.Not persisted.
shipFromNot persisted.Not persisted.Not persisted.
soldToNot persisted.Not persisted.Not persisted.
taxEngineAddressNot persisted.Not persisted.Not persisted.
referenceDocumentCodeNot persisted.Not persisted.Not persisted.
descriptionNot persisted.Not persisted.Not persisted.
documentCodeInvoice.ID & “_Debit_” & TaxEngine.IDInvoice.ID & “_Credit_” & TaxEngine.IDCreditMemo.ID & “_Credit_” & TaxEngine.ID
statusCommitted  
taxEngineLogs   
resultCodeTaxEngineInteractionLog.ResultCodeTaxEngineInteractionLog.ResultCodeTaxEngineInteractionLog.ResultCode
createddateNot persisted.Not persisted.Not persisted.
IdNot persisted.Not persisted.Not persisted.
transactionDateNot persisted.Not persisted.Not persisted.
amountDetails   
exemptAmountNot persisted.Not persisted.Not persisted.
taxAmountIf header tax is enabled, then this value is Invoice.TotalTaxesCapturedAtHeader.If header tax is enabled, then this value is Invoice.TotalTaxesCapturedAtHeader.If header tax is enabled, then this value is CreditMemo.TotalTaxesCapturedAtHeader.
totalAmountNot persisted.Not persisted.Not persisted.
totalAmountWithTaxNot persisted.Not persisted.Not persisted.
lineItemsRefer to the next line attributes section.Refer to the next line attributes section.Refer to the next line attributes section.

Response Mappings for Line Attributes 

This table defines the response mappings between the line attributes of a tax callout and fields of applicable objects.

Line AttributesInvoice MappingNegative InvoicesCredit Mapping
taxCodeInvoiceLineTax.taxCodeInvoiceLineTax.taxCodeInvoiceLineTax.taxCode
productCodeNot persisted.Not persisted.Not persisted.
productIdNot persisted.Not persisted.Not persisted.
amountDetails   
exemptAmountNot persisted.Not persisted.Not persisted.
taxAmountNot persisted.Not persisted.Not persisted.
totalAmountNot persisted.Not persisted.Not persisted.
totalAmountWithTaxNot persisted.Not persisted.Not persisted.
effectiveDateInvoiceLineTax.taxEffectiveDateInvoiceLineTax.taxEffectiveDateCreditMemoLineTax.taxEffectiveDate
lineNumberInvoiceLineTax.InvoiceLineInvoiceLineTax.InvoiceLineCreditMemoLineTax.CreditMemoLine
descriptionNot persisted.Not persisted.Not persisted.
quantityNot persisted.Not persisted.Not persisted.
addresses   
billToNot persisted.Not persisted.Not persisted.
shipToNot persisted.Not persisted.Not persisted.
shipFromNot persisted.Not persisted.Not persisted.
soldToNot persisted.Not persisted.Not persisted.
productskuNot persisted.Not persisted.Not persisted.
referenceDocumentCodeNot persisted.Not persisted.Not persisted.
taxesRefer to the next tax attributes section.Refer to the next tax attributes section.Refer to the next tax attributes section.

Response Mappings for Tax Attributes 

This table defines the response mappings between the tax attributes of a tax callout and fields of applicable objects.

Line AttributesInvoice MappingNegative InvoicesCredit Mapping
exemptAmountInvoiceLineTax.taxExemptAmountInvoiceLineTax.taxExemptAmountNot persisted.
exemptReasonNot persisted.Not persisted.Not persisted.
imposition   
typeNot persisted.Not persisted.Not persisted.
NameInvoiceLineTax.TaxNameInvoiceLineTax.TaxNameCreditMemoLineTax.TaxName
jurisdiction   
countryNot persisted.Not persisted.Not persisted.
idNot persisted.Not persisted.Not persisted.
levelNot persisted.Not persisted.Not persisted.
nameNot persisted.Not persisted.Not persisted.
regionNot persisted.Not persisted.Not persisted.
stateAssignedNoNot persisted.Not persisted.Not persisted.
rateInvoiceLineTax.taxRateInvoiceLineTax.taxRateCreditMemoLineTax.TaxRate
taxInvoiceLineTax.taxAmountInvoiceLineTax.taxAmountCreditMemoLineTax.TaxAmount
taxIdInvoiceLineTax.TaxTransactionNumberInvoiceLineTax.TaxTransactionNumberCreditMemoLineTax.TaxTransactionNumber
taxableAmountNot persisted.Not persisted.Not persisted.