Configuration

The AES uses an xml file to store the configuration. You can edit the file using a text editor, we recommend using Notepad++. After any changes in the configuration file, you need to restart the service. Most of the Avatax calculating settings are taken from the Avatax Add-on configuration. Settings are stored in the xml file with pairs of key-value, you can configure each one by editing the “value” attribute for each key.  

Timer

Is the time in milliseconds to check and process new documents. Here for example you configure the service to run every 10 seconds

<add key="timer" value="10000"/>

ExcludeApps

This value is a list of applications names, separated by a semicolon(;). The application name is the windows process name that you can check in the windows task manager. AES will not process and calculate taxes for documents generated by the applications declared on this list. For example, the Service must not process a document generated by itself, because it will cause a loop. Avatax add-on generated or updated document also mustn’t be processed, tax will already be calculated by the add-on. This is a sample excluding calculations on documents created or modified by the Avatax add-on, by the SAP client application and by the AES.

<add key="ExcludeApps" value="SBOAvaTax;SAP Business One;Argentis Avatax Event Service;Argentis.AvataxEventService"/>

 

Log

The service can log event errors at an Event source visibles from the Windows Event Viewer. You can switch this on or off by using true or false this configuration key:

<add key="Log" value="true"/>

 

MaxRetries

In case a tax calculation fails, or updating an SAP document fails, the AES can be configured to retry processing the event before removing it from the queue. This setting specifies the retry count before removing the event from the queue.

<add key="MaxRetries" value="5"/>

 

PostCreatedInvoicesToAvatax

Set to true to post invoices to Avatax as committed documents. Remember the calculated tax cannot be set to the SAP invoice, as this document is not editable after created. Use true or false as value.

<add key="PostCreatedInvoicesToAvatax" value="true"/>

 

DraftToDocument

To capture new draft documents and post it as the final document. If succeed, the draft will be deleted after posting the document. When processing the draft, the AvaTax Event Service will read the draft, calculate and set the tax with AvaTax, post the final document in SAP, and delete the draft. Also if the document is a postable document: AR Invoice or AR Credit Memo, the Event Service will also commit the document to AvaTax. <add key="DraftToDocument" value="true" /> Each document type can be controlled independently, to ensure you only process the desired draft document type, and there is a setting for each type of document, that you need to enable.

<add key="DraftOrderToDocument" value="true" />
<add key="DraftDeliveryNoteToDocument" value="true" />
<add key="DraftARInvoiceToDocument" value="true" />
<add key="DraftARCreditMemoToDocument" value="true" />

 

SAP Connection Settings

The Avatax Event Service connects to SAP by using the SAP DI-API. You have to set the parameters to the desired company, by completing all:

<add key="DatabaseServerName" value="SAPServer"/>
<add key="DatabaseServerType" value="11"/> 
<add key="DatabaseUserName" value="sa"/>
<add key="DatabaseUserPassword" value="saPassword"/>
<add key="SBOLicenseServer" value="SAPServer"/>
<add key="SBOLicenseServerPort" value="40000"/>
<add key="SBOCompanyDBName" value="Avatax"/>
<add key="SBOCompanyUserName" value="manager"/>
<add key="SBOCompanyUserPassword" value="manager"/>
<add key="SLDServer" value="SAPServer:30015"/>
<add key="UseTrusted" value="false"/>

DatabaseServerName: The SAP Server name.

DatabaseServerType: Use one of the SAP defined database server types code number, as described in the enumeration:
dst_MSSQL = 1
dst_DB_2 = 2
dst_SYBASE = 3
dst_MSSQL2005 = 4
dst_MAXDB = 5
dst_MSSQL2008 = 6
dst_MSSQL2012 = 7
dst_MSSQL2014 = 8
dst_HANADB = 9
dst_MSSQL2016 = 10
dst_MSSQL2017 = 11

DatabaseUserName: The Database Server user name.

DatabaseUserPassword: The Database Server user password.

SBOLicenseServer: The SAP License Server name (only the name, do not include the port as it's defined in a separated setting).

SBOLicenseServerPort: The SAP License Server port. Usually 40000 or 30000

SBOCompanyDBName: The SAP database name. It's the SAP Company.

SBOCompanyUserName: The SAP login user name.

SBOCompanyUserPassword: The SAP login user password.

SLDServer: The SAP System Landscape Directory server. Usually requires to indicate the server and the port, like server:30015 if the port is 30015

UseTrusted: If your database security settings allows to use the windows user to authenticate, you can turn this setting on. Valid values are true or false.