CUI validation at checkout
This feature checks what the customer types in the Company field at Shopify checkout. If the value does not follow the rule set for this field, the customer sees a message and has to correct it before completing the order.
Invoices for legal entities (company)
xConnector recognizes a legal entity by the CUI (company tax ID) entered in the Company field and automatically issues the invoice in the company's name. The company name, Trade Register number and address are filled in automatically from ANAF data.
For this to workflow, the company number (CUI) must be entered correctly. In practice, customers often type the company name, "PF", "-" or a wrong CUI in the Company field, and the invoice can no longer be issued to the company.
The checkout validation requires customers to enter a valid CUI, so invoices for legal entities are issued correctly the first time
The validation can be applied to the Company field of the shipping address (Shipping address company) or of the billing address (Billing address company). You choose one field, the one where your customers usually enter their company details.
Example

Step 1: Enabling the feature in Shopify and the required xConnector settings
Set it up according to this article.
Step 2: Enable the validation of the Company name field
1. Go to xConnector → Profile → Checkout customization → Company (CUI) validation section.
2. In the Company field rule card, check Validate the Company field at checkout.
3. Under Checkout field, check the address or addresses where the Company field should be validated. You can check one or both:
- Shipping address company, for the Company field in the shipping address
- Billing address company, for the Company field in the billing address
At least one must be checked.
4. Under Pattern (regular expression), keep the default rule ^(RO)?[0-9]{2,10}$. It accepts 2 to 10 digits, with or without RO in front. To also accept a lowercase "ro", use ^(?:[Rr][Oo])?[0-9]{2,10}$ instead.
5. Under When the value matches, choose Allow only values that match.
6. Under Message shown to the customer, keep the default message or enter your own text, up to 250 characters. It is displayed under the Company field when the value is not valid. Example: Enter the company CUI
only if you want an invoice issued to your company. Ex: RO12345678
7. Click Save.
8. The first time you save, Shopify asks you to approve a permission for checkout rules. Approve it, otherwise the rule is not activated.
9. Check that Active in Shopify appears in the top-right corner of the card, together with the message "The Company (CUI) validation is active in checkout." You can click Check status in Shopify at any time to confirm the status.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article