Accorto can maintain Tax Locations for "Ship From" (service location) and "Ship To" (billing address).  We use Avalara to validate Tax Locations.


Use

Tax Location

For Service Locations ("Ship From"), you can define shared addresses and resource-specific (private) addresses.

In the Tab Tax Location, create and validate the addresses:


Usually, it is just necessary to enter Street and zip code - in addition to the Name (Alias).

You can also copy the address entered in the Salesforce User record.


Once validated, you can make it your default address:

To make the address only accessible to you, select your Resource record. This way, no one else can see the address (other than administrators).


Resource

Set your default Location in the Tab Resource for your record. If no location was selected in the timesheet, this location is used.


Account

You can assign a Location to an account.  Via the "Tax" button in an account record, you can create tax locations from the account billing and/or shipping address - details.


Timesheet

If enabled, select the Tax Location. If no location was selected in the timesheet, the default resource location is used.


In addition to your private (not shared locations, e.g. home), depending on the project you selected, you may select also locations for that account, e.g. for on-site work.

If a tax location is selected for the project, only that location can be selected.

Tax Location Selection


Setup

Tax Location Sharing

By default, Tax Locations are private. To enable everyone to use the shared locations (i.e. not resource-specific), create Tax Location Sharing Rules based on Criteria "Shared equals True".

To enable managers or accountants/administrators to view the resource-specific addresses, add Sharing Rules Based on record owner.

Example:


Avalalara Setup

In > Setup > Custom Settings > Accorto Avalara - Manage your settings and create/edit the Default Organization Level Value.

Enter Production and Sandbox endpoints and license keys.


Remote Site Settings

In > Setup > Remote Site Settings, create entries for both production and sandbox endpoints, e.g.

https://sandbox-rest.avatax.com


Add Tax Location to Timesheet

If the Resource has a Tax Location defined, the location info is automatically added to the TE Item record.

If you want users to be able to select a location, add the Tax Location to the T+E Item Fieldset:

  • > Setup > Object Manager -- select T+E Item
  • in Field Sets, select Entry_Timesheet and/or Entry Table
  • Add the field Tax Location  to the Field Set


Batch upload

You can set the user address to the default resource tax location.  The following API calls are the same as

- Tab: Tax Location - click New

- Click Button: Copy address from User

- Click Button: Validate

- Click Button: Make this my Default

Single Record

// parameter: User.Id
System.debug(accorto.TaxLocation.setUserDefault(userId)); 
// parameter: user record
System.debug(accorto.TaxLocation.setUserDefault(user));

If the tax location is valid, the tax location is saved and the resource updated with the new tax location. Note that if not successful, the tax location is not created. 



Missing Resource Defaults

This API call queries all resources without Tax Locations, where the resource and user are active and the user has a street and postal code.

// parameter: number of records to be processed - example: 10
System.debug(accorto.TaxLocation.setMissingResourceDefaults(10));
// output: Ok: 9, Errors: 1
// details...

The tax location is saved/set even if the tax location is invalid.  In the tab Tax Location, create a View with invalid addresses and handle them appropriately.  Note that the tax location is not selectable until valid.


With the default tax location set on resource level, this location is used if no other location is entered.