Skip to main content

Concepts

Anrok is a cloud service that calculates and files sales tax and VAT. In Zenskar, Anrok is a third-party tax engine. When a served country uses Anrok as its tax engine, Zenskar asks Anrok to calculate the tax on invoices for that country. For how tax categories, served countries, and tax engines work together, see Tax configuration.

Anrok connections

An Anrok connection links one Anrok account to one Zenskar business entity. An Anrok connection uses an Anrok API key. The API key determines the Anrok account. The same connection form works for Anrok sandbox accounts and production accounts.
A business entity can have only one third-party tax engine connected. Zenskar rejects an Anrok connection for a business entity that already has another third-party tax engine.
Different business entities can connect different Anrok accounts. Connecting Anrok does not change the tax engine of any served country. Anrok calculates tax for a served country only after you select Anrok as that country’s tax engine.

Anrok tax codes

An Anrok tax code is the identifier of a product tax category in Anrok. Anrok uses the product tax category to decide how a type of goods or services is taxed. Anrok tax codes are the third-party tax codes of Anrok. You map a Zenskar tax category to an Anrok tax code. The list of Anrok tax codes combines the catalogs of all Anrok accounts connected in your organization. The mapping applies in every business entity that uses Anrok. Anrok has standard tax codes and custom tax codes. A custom tax code exists only in the Anrok account that created it. The ID of a custom tax code starts with sptc. If different business entities use different Anrok accounts, each Anrok account must offer every Anrok tax code that you map. The combined list can show a custom tax code that only one account offers. If an account does not offer a mapped code, contract activation fails for that account’s business entity. If a mapped Anrok tax code no longer exists in Anrok, Zenskar shows the code with the label “(not in Anrok)”.

Anrok products

An Anrok product is a record in Anrok that links a Zenskar product to an Anrok tax code. Anrok calculates tax for a line item only if the line item refers to an Anrok product. Zenskar creates Anrok products for you. The ID of an Anrok product has the following form:
Zenskar creates Anrok products at the following points: Zenskar sets the name and description of an Anrok product only when it creates the product. Later changes in Zenskar do not update the Anrok product. When you change the Anrok tax code of a tax category, Zenskar creates new Anrok products. The previous Anrok products stay in Anrok. An Anrok customer link connects a Zenskar customer to an existing customer in Anrok. The link determines how Zenskar identifies the customer to Anrok: In both cases, Zenskar also sends the customer’s billing address and tax ID. Anrok applies the exemption certificates of the Anrok customer that Zenskar identifies. Anrok does not use the Zenskar exempt_tax custom attribute. A link belongs to the Anrok connection of the customer’s business entity. One Anrok customer can be linked to only one Zenskar customer. You can change a link, but you cannot remove it. Disconnecting Anrok removes all links of that connection.

Address validation

When you save a customer whose business entity has Anrok connected, Zenskar asks Anrok to validate the customer’s default billing address. The validation runs in the background. If Anrok reports the address as invalid, activating a contract for the customer fails. An address that Anrok has not validated yet does not block activation.

Tax on contracts and invoices

Zenskar works with Anrok at the following points: Invoice generation fails in the following cases:
  • A tax category in the contract has no Anrok tax code.
  • The business entity’s address has no country. Anrok needs the address from which the sale is made.
Zenskar does not request estimates for billing dates more than three days in the future. Line items in those billing periods show no tax until Zenskar regenerates the invoice within three days of the billing date.

Approval

At approval, Zenskar holds the invoice in the following cases:
  • The tax inputs of a line item changed after invoice generation. Tax inputs include the customer’s address, tax IDs, custom attributes, and Anrok customer link, the Anrok tax code, and the Anrok connection.
  • The recalculated tax differs from the invoice’s tax by more than your organization allows.
  • The invoice has line items in future billing periods that Anrok has not priced yet.
  • Zenskar cannot reach Anrok, or Anrok returns an error.

Recording the transaction

After approval, Zenskar records the invoice’s tax in Anrok as a transaction. Zenskar tries up to five times. Zenskar sends the invoice email only after Anrok records the transaction. If Anrok does not record the transaction, the invoice stays approved. Zenskar does not send the invoice email. The ID of an Anrok transaction starts with zenskar: followed by the Zenskar invoice ID.

How-to guides

Connect Anrok

Prerequisites

  • You have an Anrok API key. You create API keys in Anrok, under Settings > Manage API keys.
  • The business entity does not have another third-party tax engine connected.
If your Anrok account is not registered to collect tax in a jurisdiction, Anrok returns no tax for that jurisdiction, without an error. Zenskar does not show a message. Before you select Anrok as the tax engine for a served country, register the jurisdictions in Anrok where you collect tax.
  1. Go to More > Integrations.
  2. Click the Anrok card. To find the card, you can filter by Sales Tax. Sales Tax category on the Integrations page, Anrok card
  3. Click NEW CONNECTION. The Anrok connector page NEW CONNECTION is unavailable while an existing Anrok connection has no business entity. To continue, click Select Business Entity on that connection. A connection pending configuration on the Connections tab
  4. In API Key, enter your Anrok API key. The Anrok connection form
  5. Click Connect. If the API key is valid, the Anrok Setup page opens at the Connect step. If the API key is not valid, Zenskar shows the message Invalid Credentials.
  6. In Select Zenskar Entity, select the business entity. The Anrok Setup screen, step 1: Connect
  7. Click Save & Continue.
  8. On the Countries Serving step, add or edit the countries that Anrok calculates tax for. In Tax Engine, select Anrok. For details, see Manage served countries. The Anrok Setup screen, step 2: Countries Serving
  9. Click Continue.
  10. On the Tax Categories step, set the Anrok Tax Code of each tax category that your products use. For details, see Map a tax category to an Anrok tax code. The Anrok Setup screen, step 3: Tax Categories
  11. Click Finish Setup.
Zenskar registers your products with Anrok in the background.

Map a tax category to an Anrok tax code

Prerequisites

  • Connect Anrok. The Anrok Tax Code field appears only after you connect Anrok.
  1. Go to Settings > Tax Configuration.
  2. On the Tax Categories tab, in the tax category’s actions menu, click Edit.
  3. In Anrok Tax Code, search for the Anrok tax code, and then select it. The Anrok Tax Code picker in the tax-category panel
  4. Click Save Changes.
You can also select the code directly in the Anrok Tax Code column of the tax-category list. The tax-category list with its Anrok Tax Code column Zenskar registers the products that use the tax category with Anrok in the background.

Prerequisites

  • Anrok is connected to the customer’s business entity.
After you link a customer, you cannot remove the link. You can only change it to another Anrok customer.
  1. Go to Customers, and open the customer.
  2. Click the Integrations tab.
  3. Under Linked Integration Objects, click Add Anrok ID. The Add Anrok ID dialog opens.
  4. In Anrok customer ID, enter the exact customer ID from Anrok.
  5. Click Look up. Zenskar shows the name and email of the Anrok customer.
  6. Click Save.
To change a link, in the Anrok ID’s actions menu, click Edit. Then repeat steps 4 to 6.

Check the Anrok transaction of an invoice

Prerequisites

  • The invoice is approved, partially paid, paid, or void. The Integrations tab does not appear on other invoices.
  1. Go to Invoices, and open the invoice.
  2. Click the Integrations tab. Under Linked Integration Objects, the Anrok ID card shows the ID of the Anrok transaction. To copy the ID, click the copy icon next to it. Under Integration Logs, each row is one sync event between Zenskar and Anrok for the invoice. The row shows the event, its status, and its timestamp. To show only failed events, click Failed. The Integrations tab of an approved invoice
  3. In Anrok, open Transactions, and search for the ID that you copied. The transaction shows the customer, the jurisdiction, and the sales, tax, and invoice amounts. If the integration worked, the amounts match the invoice in Zenskar. The matching transaction in the Transactions list of Anrok
To check the sync events of all invoices, go to More > Integrations, click the Anrok card, and then click the Logs tab. The tab has the same columns and filters as Integration Logs. The Logs tab of the Anrok connector

Disconnect Anrok

Disconnecting Anrok does not change the tax engine of any served country. Invoice generation fails for served countries that still use Anrok. Before you disconnect, change the tax engine of those countries. For steps, see Change the tax engine for a served country.
Disconnecting Anrok deletes all resource mappings of the connection, including the Anrok customer links. You cannot undo this. After you connect Anrok again, link each customer again. For steps, see Link a customer to an Anrok customer.
  1. Go to More > Integrations.
  2. Click the Anrok card.
  3. Click the Connections tab.
  4. On the connection, click Disconnect. The Delete Connector ID dialog opens.
  5. Click Delete.
Zenskar removes the connection and all of its resource mappings, including the Anrok customer links. Draft invoices that Anrok priced are held at approval after the disconnect. To apply the new tax engine, regenerate them.

Reference

Location

Connection form

Setup steps

Connection details

Each connection on the Connections tab shows the following details:

IDs in Anrok

Messages

Troubleshooting