> 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/sami-b2b-onboarding/store-access/log-in-before-applying.md).

# Ask buyers to log in before applying

Ask buyers to log in or create a customer account before they can fill in your application form.

By default, anyone can fill in your application form, and Sami B2B Onboarding creates the buyer's customer account when you approve them. You can ask buyers to log in first instead. Their application is then tied to the customer account they log in with.

## Choose who can apply

The **Account required** setting has two options:

| Option                                                      | What guests see                      | What logged-in customers see                             |
| ----------------------------------------------------------- | ------------------------------------ | -------------------------------------------------------- |
| **Anyone can apply, account created on approval** (default) | The form. They can send it.          | The form, with their account email filled in and locked. |
| **Log in first, then apply**                                | A log-in prompt instead of the form. | The form, with their account email filled in and locked. |

The setting covers every application form in your store. It works with every **Storefront visibility** option, including **Public catalog, public purchasing**. **Test mode** doesn't limit it: it applies to everyone as soon as you save.

## Turn it on

{% stepper %}
{% step %}

### Open Access

In the app, click **Settings**. **Access** opens first. If another section opens, click **Access** in the settings menu.
{% endstep %}

{% step %}

### Choose Log in first, then apply

Under **How buyers apply**, in **Account required**, choose **Log in first, then apply**.

<figure><img src="https://3844812229-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRrf4pQPgjvb3GW7IN3Ci%2Fuploads%2Fgit-blob-b8a7e0c7ffa94e46e0ab6781f0322edb97b589fa%2Fscreenshot-access-login-first-choice.png?alt=media" alt="The How buyers apply section with Log in first, then apply selected under Account required."><figcaption><p>Choose Log in first, then apply to show guests a log-in prompt instead of the form.</p></figcaption></figure>
{% endstep %}

{% step %}

### Save

Click **Save** in the save bar. **Settings saved** appears.
{% endstep %}
{% endstepper %}

## What guests see

On your form's page, guests see a prompt in place of the form. It keeps your form's header and design, and shows:

* the heading **Log in to apply**
* the message **Log in or create a customer account first, then fill in the application.**
* a **Log in** button, which opens your store's log-in page and brings the buyer back to the form afterwards
* a **Create account** link, which opens your store's sign-up page

<figure><img src="https://3844812229-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRrf4pQPgjvb3GW7IN3Ci%2Fuploads%2Fgit-blob-b5b8b4dc1c20ed50cac00696baa19caed271c4d5%2Fscreenshot-storefront-login-first-prompt.png?alt=media" alt="The Wholesale application page showing a Log in to apply prompt with a Log in button and a Create account link instead of the form."><figcaption><p>Guests see a log-in prompt in place of the form until they log in.</p></figcaption></figure>

Once logged in, the buyer sees the form. Their account email is filled in and can't be changed, so your decision reaches the address they log in with. A buyer who has applied before sees where their application stands instead of a blank form.

If a guest sends a form they opened before logging out, it's refused with **Log in to your account to send this application.**

## When the form opens without logging in

* **The private link to update an application.** When you ask a buyer for more information, their link opens the form so they can update their application, logged in or not. See [Request more information](/sami-b2b-onboarding/reviewing-applications/request-more-information.md).
* **The theme editor.** You see the form there, so you can design it.

Buyers who start from the application page in their customer account are already logged in, so they go straight to the form. See [Company application page](/sami-b2b-onboarding/customer-accounts/company-application-page.md).

## Change or translate the prompt

{% stepper %}
{% step %}

### Open Translate

Go to **Settings › Translate**.

* To change the English wording, click **Edit** next to your default language.
* To translate it, click **Translate** next to the language.
  {% endstep %}

{% step %}

### Edit the prompt

In the list on the left, under **Storefront**, click **Storefront messages**. In the **Form** card, change **Log-in prompt heading**, **Log-in prompt message**, **Log-in prompt button** and **Create account link**.
{% endstep %}

{% step %}

### Save

Click **Save** in the save bar.
{% endstep %}
{% endstepper %}

## Check it

1. Open your form's page in a private browser window. The **Log in to apply** prompt shows instead of the form.
2. Click **Log in** and log in with a customer account. You come back to the form page, and the form shows with your email filled in.
3. To let guests apply again, choose **Anyone can apply, account created on approval** and click **Save**.

## Next steps

* [Use the form page the app creates](/sami-b2b-onboarding/add-a-form-to-your-store/use-the-form-page.md) — find and share your form's page.
* [Company application page](/sami-b2b-onboarding/customer-accounts/company-application-page.md) — let logged-in customers apply from their account.
* [Lock the store](/sami-b2b-onboarding/store-access/lock-the-store.md) — your form's page stays open under the lock.
* [Translate](/sami-b2b-onboarding/settings/translate.md) — translate the rest of the form's wording.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.samita.io/sami-b2b-onboarding/store-access/log-in-before-applying.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
