{"title":"Collect company details at checkout","slug":"how-to-add-company-name-to-checkout","url":"https://support.storeconnect.com/articles/how-to-add-company-name-to-checkout","url_markdown":"https://support.storeconnect.com/articles/how-to-add-company-name-to-checkout.md","subtitle":null,"summary":"Add a company name field to your B2B checkout using a Store Variable, make it required with custom JavaScript, and relabel it through Theme Locale translations.","type":"Help_Documentation","video_url":"","keywords":"company name at checkout, b2b checkout, checkout fields, store variable, company name field, required field, theme locale, locale translation, field label, business name, account display name, enable company name","last_modified":"2026-08-21T07:12:35+0000","body_markdown":"For B2B transactions, it's useful to capture the customer's company name during checkout. Use this process to add a company name field to your checkout, and optionally make it required and relabel it.\n\nWhen the field is enabled, an account is created during checkout based on the company name (or the customer's first and last name if no company is given). The customer can later update the company name, which updates only the account's **Display Name** field.\n\n## Enable the company name field\n\nThe field is turned on with a **Store Variable**:\n\n1.  Open the **Store** record you want to allow a company name on.\n2.  In the **Store Variables** related list, create a new **Store Variable**.\n3.  Give it a **Name**, such as `Enable Company Name`.\n4.  Set the **Key** to `enable_company_name`.\n5.  Set the **Value** to `true`.\n6.  Switch on **Available in Liquid**.\n7.  Click **Save**.\n\n    ![Store Variable record with the enable_company_name key set to true and Available in Liquid enabled](https://res.cloudinary.com/hzkr6fi81/image/upload/v1781677747/documentation-media/company-name-field/enable-company-name.png)\n\nThe company name field now appears at checkout:\n\n![Checkout form showing the company name field](https://res.cloudinary.com/hzkr6fi81/image/upload/v1781677748/documentation-media/company-name-field/company-name-field.png)\n\n## Make the company name required\n\nIf the field is left blank, it is filled automatically with the customer's full name. To force customers to enter a business name instead, add a small script to your store's head content:\n\n1.  From your **Store** record, find the **Head Content** field. Make sure you are using **Head Content**, not **Header Content**.\n2.  If a content block is already linked, open it and skip to step 4. If there is no link, edit the field and select **New Content Block**.\n3.  Select the **No Added Styling** template and give the block a name such as `Head Content`.\n4.  Add the following to the **Content** field:\n\n    \n```\n    {%- if current_request.path == '/checkout/customer_information' %}\n\n            document.addEventListener('DOMContentLoaded', ()=\u003e {\n            const nameField = document.querySelector('#checkout_customer_information_form_company_name');\n            nameField.setAttribute('required', 'required');\n            });\n\n    {%- endif %}\n    ```\n\n\n5.  Click **Save**.\n\n## Change the field label\n\nTo relabel the company name field (for example to \"Business Name\"), use a **Theme Locale** translation:\n\n1.  From the **Store** record, find the **Theme** field.\n2.  If a theme is already linked, open it and skip to step 4. If there is no link, edit the field and select **New Theme**, then give the theme a name such as `My Theme`.\n3.  Open the theme's **Theme Locales** related list, and open a **Locale** record (or create one if none exist).\n4.  In the locale's related list, create a **Locale Translation**.\n5.  In the **Key** field, enter `checkout.customer_information.form.company_name`.\n6.  In the **Value** field, enter the label you want, such as `Business Name`.\n7.  Click **Save**.\n\n## Confirm it is working\n\nOpen your store's checkout and confirm the company name field appears with the label you set. If you added the script, confirm the field is required: try to continue without entering a company name, and check that checkout stops you."}