Skip to content

Setting Up Tax Data Retrieval

Some countries, like the United States or Canada, have very complex sales tax rules that are difficult to manage. JustOn allows for retrieving tax data from an external tax provider.

Info

The tax data retrieval is available as of JustOn 2.43.

Since tax providers are usually not free of charge, the tax data is retrieved automatically only when an invoice is finalized. It is also possible to retrieve draft tax data for draft invoices on demand, but this may involve additional costs, depending on the external tax provider. Also, the finalize process ignores draft tax data and retrieves the actual tax data to guarantee correct invoices. This is why draft invoices may not show the actual tax information.

For further technical details, see Implementation Details.

Info

For general information about JustOn's tax capabilities, see JustOn Tax Handling.

Configuring External Tax Provider

The external tax provider is configured as part of the tenant settings.

Info

Currently, only AvaTax from Avalara is supported as an external tax provider. To use the internal JustOn tax calculation, specify Internal or leave the field empty.

  1. In Setup, open Custom Settings.
    In Salesforce Lightning, navigate to Custom Code > Custom Settings.
    In Salesforce Classic, navigate to Develop > Custom Settings.
  2. Click Manage in the row of Tenant.
  3. Click Edit the row of the tenant you intend to edit.
  4. In the Tax Provider field, specify the information as required.
    To use the internal tax provider, specify Internal or leave the field empty.
    To set up an external tax provider, specify a JSON expression like {"Provider":"AvaTax","Option1":"Value1","Option2":"Value2"}. This allows for passing additional tax provider options.
    The only mandatory parameter of the JSON configuration is Provider, which specifies the external tax provider to be used (currently, AvaTax only), like {"Provider":"AvaTax"}.
  5. Click Save.

Note

Be aware that when using external tax providers like AvaTax, you must specify the complete address information for the tenant.

Adding Tax Data Retrieval Button

Usually, the tax data is retrieved automatically upon invoice finalization. Certain business use cases, however, require the tax data to be retrieved manually. To this end, you can add the button External Tax Provider to the invoices list view.

  1. Navigate to the object management settings of the Invoice object.
  2. Click Search Layouts.
  3. Click Edit in the row of the Invoices List View.
  4. In the Custom Buttons section, move External Tax Provider to the Selected Buttons column.
  5. Click Save to save the modified page layout.
    For help about modifying page layouts, see Managing Page Layouts.

▶ Depending on the invoice status, the button either invokes the retrieval of draft tax data for draft invoices, or repeats the tax provider update for final invoices.

Invoice Status Condition Result
Draft Retrieves draft tax data from the tax provider, replaces existing tax details of invoice line items.
Open Tax retrieval status is not Final Updates the external tax provider with the final invoice data.