VIESConnect - Setup and use

VIESConnect verifies customer and vendor VAT numbers through the EU VIES service, either manually from the setup page or automatically through the job queue. Each run produces a report that is sent by email or shown on screen and stored in the validation log.

 

Prerequisites

Business Central online, version 28 or later.

Internet access from Business Central to the EU VIES service.

The permission set XSC_VIESConnect for the users who set up and run VIESConnect.

Your own company's VAT registration number and country in Company Information. VIESConnect sends it to VIES as the requester, so VIES returns a consultation number that documents the check.

Email set up in Business Central if the report is to be sent by email.

Correct Country/Region Code on customers and vendors, and EU Country/Region Code on the countries.

 

Getting started

1. Search for VIESConnect Setup and open the page.

2. The first time, a 14-day trial license is applied automatically. To request a license, choose Click to request license in the License section. No license is needed in a sandbox environment.

3. Activate Customer and/or Vendor checks and set the filters (see below).

4. Choose how you want the report: Mail or Download.

5. Choose Run verification to make a first check.

 

The setup page

 

Customer and Vendor sections

Active – turns the check of customers/vendors on or off.

Customer filter / Vendor filter – click the field to set filters (e.g. No., posting group, country/region, blocked). The field shows how many accounts match the filter. Use the assist-edit button to open the filtered list.

Valid for period – how long a valid VIES check is accepted before the VAT number is checked again, e.g. 1M (one month) or 3M. Leave blank to check every time.

Update verification log – when enabled, the results are written to the standard VAT Registration Log in Business Central, including the name and address returned by VIES and the consultation number. The validity period is based on this log, so enable it if accounts that were checked recently should not be checked again.

 

Notification section

Active – how the report is delivered: Mail (sent to the mail recipients), Download (shown on screen) or Skip (no report, only the validation log).

Mail recipients – one or more email addresses, separated by semicolons (;).

Mail template – the template used for the report. A Danish (DAN) and an English (ENU) template are included and the one matching your company is selected automatically.

Name match warning level (%) – valid VAT numbers where the name from VIES matches the name in Business Central with a lower score than this value (0–100) are listed as warnings in the report. Default is 70. Set it to 0 to turn the name check off.

 

Webservice section

Web Service – the address of the EU VIES service. It is filled in automatically; normally you do not need to change it.

Communication log – when enabled, all requests to and responses from VIES are logged, including failed attempts.

Communication log retention (days) – how many days entries are kept in the communication log. Default is 1 day.

Validation log retention (days) – how many days entries, including the stored reports, are kept in the validation log. Default is 30 days. 0 keeps all entries.

 

License section

License Code – your license code. Choose Click to request license to request a trial or a standard license.

Status/Expires – shows whether the license is valid and when a trial license expires.

 

Actions

Run verification – starts a verification based on the current setup.

Mail templates – opens the mail templates.

Validation log – one line per verification run with the totals and the stored report.

Communication log – the requests and responses exchanged with VIES.

Name match whitelist – accounts where a different name in VIES is accepted.

​

What happens during a verification

 

For each customer and vendor included by the filters, VIESConnect:

1. Checks that the account is in an EU country and has a VAT number.

2. Checks the VAT number against the VAT Registration No. Formats for the country. Numbers that do not match are reported as incorrectly formatted and are not sent to VIES.

3. Finds VAT numbers used by more than one account (duplicates).

4. Skips accounts that were verified as valid within the Valid for period.

5. Looks up the remaining VAT numbers in VIES. Before the first lookup, VIESConnect reads the current status of VIES and of each member state; accounts in a member state that is unavailable are not sent but reported as not verified.

6. Compares the name returned by VIES with the account name and calculates a match score.

 

If VIES or a member state is busy, VIESConnect waits and tries again (up to three times with increasing waiting time) and slows down the pace of the lookups. If a member state keeps refusing, it is skipped for the rest of the run, and if VIES as a whole keeps refusing, the remaining lookups are skipped. Accounts that could not be checked are reported as not verified and are included again in the next run.

 

When the communication log is enabled, an account that was looked up in VIES within the last 24 hours is not looked up again.

 

The report
 

The report contains:

 

VIES availability – the status of the VIES service and of each member state that was checked, with the number of accounts.

Customer and vendor sections – the number of accounts in each category: outside the EU, without VAT number, incorrectly formatted VAT number, duplicate VAT number, verified earlier, verified, invalid and not verified. Click a number to open the list of the accounts in Business Central.

Warnings – name differs from VIES – valid VAT numbers where the name in VIES does not resemble the name in Business Central, with both names and the match score.

 

Every report is stored in the Validation log. Select a line and choose Show report or Download report.

​

Name match whitelist

If the name difference is expected (e.g. a trading name differs from the registered company name), add the account to the Name match whitelist:

 

Select Customer or Vendor and the account number.

Accepted VIES name is suggested from the latest valid check (requires Update verification log). If VIES later returns another name, the warning appears again – for example if the VAT number now belongs to another company.

Leave Accepted VIES name blank to accept any name for the account.

 

Mail templates

The report is built from an HTML template. Open Mail templates from the setup page to see the templates.

 

Export templates saves all templates to a JSON file.

Import templates loads templates from such a file, e.g. from another company or environment. You are asked before existing templates are overwritten.

The templates that come with VIESConnect are added automatically when the app is installed or updated, but only if a template with the same code does not exist. Your own changes are never overwritten.

 

Advanced users can adjust the HTML. The values are inserted with placeholders such as {{CustTotal}}, {{CustVerified}}, {{ViesStatus}}, {{CountryRows}} and {{CustNameWarningRows}} (customer placeholders start with Cust, vendor placeholders with Vend). Export the included template to see all placeholders in use.

​

Automatic verification via the job queue

1. Open Job Queue Entries and create a new entry.

2. Object Type to Run: Codeunit. Object ID to Run: 6242150 (XSC_VIESConnectUtil).

3. Set a recurrence, e.g. once a night, preferably outside office hours when VIES is less busy.

4. Set the status to Ready.

Use the notification type Mail for job queue runs – Download shows the report on screen and requires a user session.

Troubleshooting

​

Many accounts are not verified – VIES or a member state may have been unavailable or busy. Check the VIES availability section in the report and the Communication log (failed attempts are marked as Error). The accounts are checked again in the next run.

Many numbers are incorrectly formatted – check the VAT number and country on the account and the VAT Registration No. Formats for the country.

 

The same accounts are checked every time – enable Update verification log and set a Valid for period.

"The Web Service field … is blank" – enter the VIES address in Web Service: https://ec.europa.eu/taxation_customs/vies/rest-api/

No email received – check the mail recipients, the email setup in Business Central and that the notification type is Mail.

Too many name warnings – lower the Name match warning level or add accepted differences to the Name match whitelist.

​