> For the complete documentation index, see [llms.txt](https://docs.samita.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.samita.io/samita-wholesale-b2b/registration-form/automatically-add-customer-to-a-company.md).

# Automatically add customer to a Company (B2B)

Automatically assign new Registration Form customers as a contact of a Shopify B2B Company, with a location and role, as soon as they register.

If your store uses Shopify's B2B **Companies** feature (grouping customers under a company for company-specific pricing, catalogs, locations, and roles), the Registration Form can now **automatically assign a new or updated customer as a contact of a Company** — no need to add each customer manually in Shopify Admin.

{% hint style="info" %}
Before using this feature, make sure your form is already connected to Shopify customer data. See [Integrate Registration Form with Shopify customer data](/samita-wholesale-b2b/registration-form/integrate-registration-form-with-shopify-customer-data.md).
{% endhint %}

## Two assignment modes

### 1. Add to a fixed company

Best when this form is dedicated to one specific group of customers (for example, a registration form just for a regional distributor).

* Every customer who registers through this form is added to the **one Company** you pick.

### 2. Add based on customer tags

Best when the same form is shared across different customer groups and you want the app to sort them automatically.

* You set up **rules**: "if the customer has tag X → add to Company Y".
* The app checks the customer's tags (after this submission) against your rules, top to bottom, and assigns the Company from the **first rule that matches**.
* Because Shopify only allows a customer to be a contact of **one Company at a time**, if a customer matches more than one rule pointing to *different* companies, only the first match is used.

## Assigning a Location and Role

For each Company you pick (in either mode), you can also choose which **Location** and **Role** the customer is assigned at within that company. You can add more than one Location + Role pair per company if needed.

## Steps to manage

{% stepper %}
{% step %}

### Open the form's integration settings

From the app, click **Registration Form**, open the form you want, then click the **Integration** tab and choose **Shopify**.

<figure><img src="https://1875078098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI28ZFsoFjOa0T0AsCVi%2Fuploads%2Fgit-blob-a72e32e0962869665519e8c2c5b61773b1fd62ee%2Fregistration-form-integration-shopify-overview.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Enable "Add to company"

Turn on **Add to company**. The **Company assignment** options appear right below it.

<figure><img src="https://1875078098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI28ZFsoFjOa0T0AsCVi%2Fuploads%2Fgit-blob-0b674132cce6c57a2653f52788aa40badbeab481%2Fregistration-form-add-to-company-toggle.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Choose a Company assignment mode

Under **Company assignment**, choose:

* **Add to fixed company/companies** — pick one Company, then optionally add Location + Role rows.
* **Add based on customer tags** — click **Add rule** for each tag → Company mapping you need; for each rule, pick the Company and optionally add Location + Role rows.

<figure><img src="https://1875078098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI28ZFsoFjOa0T0AsCVi%2Fuploads%2Fgit-blob-64cad04487b0a3d76395e5dbe1281a0e805fbb21%2Fregistration-form-company-assignment-mode.png?alt=media" alt=""><figcaption></figcaption></figure>

Once you pick a Company, its Location and Role pickers appear — click **Add location** to add more than one Location + Role pair.

<figure><img src="https://1875078098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI28ZFsoFjOa0T0AsCVi%2Fuploads%2Fgit-blob-61d1a696d4c93e60f268e10b854c61fb5a6c9951%2Fregistration-form-company-location-role.png?alt=media" alt=""><figcaption></figcaption></figure>

In **Add based on customer tags** mode, add one rule per tag you want to match — each rule has its own Company, Location, and Role:

<figure><img src="https://1875078098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI28ZFsoFjOa0T0AsCVi%2Fuploads%2Fgit-blob-66343a6fc326897e42e688255a751f29504e7310%2Fregistration-form-company-tag-rules.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Save

Click **Save**.
{% endstep %}
{% endstepper %}

{% hint style="success" %}
**Result:** after a customer submits the form, their Shopify customer account is created (or updated), and — usually within about 2 minutes — they're added as a contact of the matching Company, with the Location and Role you configured (if any).
{% endhint %}

## Notes

* Requires Shopify's **B2B / Companies** feature to be available on your store.
* Assignment happens shortly after the customer is created/updated through the form, but can take a couple of minutes to complete — this is expected, not an error.
* A customer can only belong to **one Company** at a time (a Shopify limitation). If the customer already belongs to a different Company, this new assignment can move them to the newly matched Company.

> ### **Need support?**
>
> If you do encounter any difficulty while proceeding these steps, don’t show any hesitation to contact us promptly via the email address [support@samita.io](https://help.samita.io/support@samita.io)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.samita.io/samita-wholesale-b2b/registration-form/automatically-add-customer-to-a-company.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
