# 💼 Companies - settings

Correctly setting up the autocomplete and validation of company data makes it easier for your B2B customers to fill in registration and order forms. In this guide, we'll show you how to manage company fields in Foxentry, what the tricky points are when mapping a company's registered address, and what advanced features you can set up for this service.

Company groups and recommended settings (best practices)

The basis for correct operation is dividing the data into so-called groups. A group brings together fields that logically belong together (typically the company ID, VAT ID, entity name, and registered address). Just like with other services, Foxentry can offer you, in the administration, an automatic pre-set form configuration based on our tested recommendations ("best practices") for a specific country. A blue banner above the list of fields informs you about this.

In the right-hand panel next to the list of groups, you can set the overall validation behavior for the given company group:

  Evaluation level: determines how strictly the entered data should be checked (minimal, medium, strict),

  Visual evaluation: here you determine whether visual states and error messages should be shown to users at all. You can enable showing all states, limit it to only valid/invalid data, or turn off the visualization entirely,

  Correction mode: this setting determines how corrections of errors within the group should be governed (e.g. automatically correcting typos in names or the company ID),

  Cross-country correction mode: a special setting for cases where you have multiple countries enabled and the user enters information that matches a result in a different country.

  
    
  

Behavior of individual fields within the group

If you expand a specific group by clicking Edit, you'll get a detailed list of mapped fields (company ID, VAT ID, name, street, etc.). For each field, you define whether it should offer autocomplete, validation, or whether it should only be automatically filled based on the selection of a different field.

  An important specific point for the registered address

  Fields used for entering the company's registered address (street, city, postal code) logically have autocomplete and validation disabled within the company group. They are set to "fill only", which means the address is only inserted into them automatically once a specific company is selected by its company ID or name.

If you want the customer to also be able to type directly into the street field and have the standard address autocomplete work there, you must map a second, separate group from the Addresses category onto the very same inputs (fields). Both services will then work on a single field at the same time.

  Validate: once a value is entered in this field, a check of its correctness is carried out,

  Fill only: the system automatically fills in the field based on an autocomplete selection or after the successful validation of other fields in the group (e.g. after manually entering the company ID and clicking away, the system automatically fills in the company name and VAT ID itself). However, if the user enters a value directly into a field set up this way, neither validation nor autocomplete will run in it,

  Autocomplete: typing into this field activates a drop-down with company suggestions,

  Hidden input: an informational label for fields that are not visible to the user on your website.

  
    
  

Pitfalls when mapping DIČ, VAT ID, and IČ DPH

If your form supports multiple countries (e.g. you ship goods to the Czech Republic, Slovakia, and Poland), you will likely run into the fact that each country treats tax identification numbers a little differently. The functionality also differs depending on whether it's a domestic or an international business transaction.

Differences between countries (e.g. Czech Republic vs. Slovakia)

In the Czech Republic, the situation is straightforward: the company ID (IČ) serves as the company identifier, and the Czech "DIČ" plays the role of the VAT ID. VAT payers always have their DIČ filled in. For non-VAT-payers, the DIČ is not filled in for domestic transactions. For international transactions, however, non-payers often have the status of an "identified person", and in that case their DIČ is filled in.

  
    
  

In Slovakia, the system is a bit more complex. They have an IČ (same as in the Czech Republic), a DIČ (a Tax ID for the purposes of ordinary taxes), and an IČ DPH (which is the equivalent of the VAT ID). If a Slovak company is a VAT payer, its IČ DPH is always filled in. If it is not a payer, the IČ DPH is not filled in for domestic transactions (but it is for foreign transactions).

  
    
  

Recommended solution for multilingual websites

The most common problem arises when you create a single input on your website for "VAT ID" with the same ID, regardless of whether the user currently has the form switched to CZ or SK (e.g. id="dic"). Foxentry then has no way to unambiguously determine which field the correct VAT ID should be filled into. We therefore recommend naming your inputs semantically, according to their universal meaning:

  
    
      CZ form
      SK form
      PL form
      Recommended input ID
    
  
  
    
      IČ
      IČ
      REGON
      companyId
    
    
      DIČ
      IČ DPH
      VAT ID
      vatId
    
    
      -
      DIČ
      NIP
      taxId
    
  

Domestic vs. international transactions

For the system to correctly evaluate whether a transaction is domestic or international, it follows the Project country setting. If your client is puzzled that their VAT ID isn't being filled in even though it should be (because, for example, they are an identified person), this setting is likely the cause – the system considers the user and the transaction to be domestic.

  
    
  

Advanced settings for the Companies service

If you switch to the Service settings tab in the top menu and expand the Companies section, you'll get access to detailed settings for the autocomplete's own behavior, the format of the returned data, and filtering.

Autocomplete options and history

  Number of results in the autocomplete: determines the maximum number of companies that can be shown to the user at once in the autocomplete drop-down (a value from 1 to 20 can be chosen),

  Max. number of results from history: the number of entities shown in the autocomplete that the user has entered at some point in the past (the history is stored in the browser). You can show 0 to 3 historical records.

Formatting of results (name and registered address)

  Entity name format: sometimes an entity's official name in the register is long or differs from how it's commonly used. You can therefore choose the official name, which is filled in exactly according to the state register, or a standardized name, which is automatically adjusted and shortened (for example, the name "AVANTRO společnost s ručením omezeným" is inserted into the form as "AVANTRO s.r.o."),

  Entity's registered address: you can choose whether the official address of the company is filled into the form (exactly as recorded in the register, even though it may historically contain typos or not be properly structured), or its validated address (a corrected and fully structured equivalent of this address from our address database).

Filtering and company database

  Company database: determines the allowed countries whose company registers will be used for searching, autocomplete, and validation on your website,

  Filtering of autocomplete results: this setting determines which results the autocomplete will offer in cases where some fields are already filled in (e.g. the user filled in part of the company ID and only then started typing the name). The filter option will only offer companies that exactly match the already-entered company ID. The prioritize only option will put these companies in the top positions, but will also show others. Filtering can also be turned off entirely,

  Include dissolved entities: a simple toggle that allows you to include, in the autocomplete search results, companies that have already ceased operating (are in liquidation, dissolved, etc.).

Geolocation

  Prioritize results by geolocation: the system takes geographic location into account purely based on the user's IP address, and will start prioritizing companies from their presumed vicinity in the autocomplete. Since the location is derived from the IP address, this determination may be slightly inaccurate and differ from the device's physical location.
