# The quote's customer: identify, set and change

> How Vendria identifies the quote's customer from the document, how to set or change the customer, register a new customer in the ERP and what the price recalculates.

Source: https://vendria.com/en/ajuda/o-cliente-da-cotacao

## Where to find it

Open the quote in **Quotes**. The customer appears in the **Customer** section, right at the
top of the page.

When the quote is open for editing (draft), the customer is the
**Company** field of the customer block: the same field that appears in the cart of a
new quote. Outside the editor, the **Customer** section has the link **Set
customer** (no customer) or **Change customer** (with a customer).

## Why the quote's customer changes the price

The chosen customer decides the negotiated discount, the price table and, in a store
integrated with an ERP, the price adjustment the ERP keeps for them. While the
quote has no customer, the prices are the price table prices.

In a store that applies a per-customer percentage coming from the ERP, the screen warns about this
next to the customer field with the **Base price.** strip: values may
**go up or down** as soon as the customer is linked. When the customer has an
adjustment in effect, the **Customer** section shows a **Price:** line with the name of the
table and the percentage, for example "105% of the table".

## How Vendria identifies the customer on its own

When the quote is born from a document (photo, PDF, spreadsheet), Vendria tries to
find the customer and says how it found them, with a line right below the section title:

- **Identified by the CNPJ in the document**: the CNPJ read matched a record.
- **Identified by the name in the document**: it matched by the company name.
- **Identified by the CNPJ of N branches**: the document had the CNPJs of
  branches, and they point to the same customer.
- **Identified by X of Y recognized branches**: the branch names written
  on the order matched registered branches of one customer.

If you change the customer later, the line disappears: it describes the automatic
choice, not yours.

⚠️ Automatic identification respects your portfolio. If the customer found in the
document belongs to another seller, Vendria does not link them and warns: **Customer
identified in the document is outside your portfolio. Link not applied.** The
quote stays without a customer, at price table prices.

## Customer not identified: what the screen offers

Without a customer, the section shows the amber badge **Customer not identified**, followed
by what was read from the document (name, CNPJ, city, phone). It is the invitation for
you to choose the right customer before sending the proposal.

When there are likely candidates, the **Suggested customers** field appears, with a
"1 suggestion" or "N suggestions" button. Each suggestion shows the CNPJ and the reason for the
guess ("by name" or "X of Y branches"). Choosing a suggestion links the
customer; it does not confirm the quote. The **Likely buyer** line sums up the
strongest candidate and asks you to confirm.

In a group order without a parent company, the section says **Group order · N destinations,
one order for each · no parent company**. This is not an issue: each destination has its
own customer. In the cart and in the editor the same mode appears as **By store ·
N stores**.

## Search for the customer by ERP code

When the quote has no customer and the store is integrated with an ERP that allows this
search, the **Customer** section shows the box **Head office not identified — attach the
customer to check branches in the ERP**, with two paths:

1. In **Search by customer code**, type the code the customer has in the ERP
   in the **Customer code (ERP)** field and click **Search**.
2. If only one ERP answers, the head office is set right away: **Head office set:
   <legal name> · CNPJ … · connection …**.
3. If more than one ERP has that code, the screen asks **Several customers
   found — choose the ERP** and lists the options; click the right one.
4. With the head office set, Vendria looks for its branches in the ERP.

The box's other path is **Enter the head office CNPJ**, to type the CNPJ by hand.

Common messages from the code search: **No customer with that code in the ERP.**,
**This store's ERP does not allow search by code.** and **Could not
check the ERP right now. Try again.**

In the editor, this box does not exist: the **Company** field itself accepts the ERP
code in the search (**Customer name, CNPJ or code...**).

On WhatsApp, the same code works: write *"customer 43"* in the conversation. See
[Choose the conversation's customer on WhatsApp](/en/ajuda/escolher-o-cliente-na-conversa).

## Set or change the customer outside the editor

1. In the **Customer** section, click **Set customer** or **Change customer**.
2. Type in the **Search customer...** field. Each line of the list shows the legal name
   on top and, below, trade name, city, ERP code and CNPJ.
3. In a store with an ERP, type at least 3 letters for the search to also include the
   ERP's customers. Lines with the database icon come from there: clicking
   brings the customer into Vendria and links them right away (the line shows "importing...").
4. Click the customer. The message **Customer linked — totals updated**
   confirms it.

To leave the quote without a customer, use **Remove customer**, at the end of the same
list. The message is **Customer removed — totals updated**.

If the customer does not exist anywhere, the list footer may offer
**Register new customer in ERP**. See the section *A customer that does not exist in the
system*, further down.

When the quote is part of a purchase with several orders, the link becomes
**Set in the purchase** or **Change in the purchase** and takes you to the purchase page, where the
customer is set for all orders at once. In a company that treats each
order in the purchase as independent, the link stays **Set customer** or
**Change customer** and the change applies only to that order.

## Set the customer in the editor (Company field)

On a draft, click the **Company** field ("Select a customer") and search. The
list starts with your portfolio.

- **None** leaves the quote without a customer.
- **Search outside my portfolio in the ERP…** widens the search to the whole
  ERP base; **← Back to my portfolio** undoes it.
- **Only customers from this ERP** hides those without a record in the ERP of this
  quote's store; **Show all customers** goes back to the full list.
- A **Partial portfolio — type to search all your customers.** notice
  means the open list shows only part of the portfolio; typing the name
  searches all of it.

With the customer chosen, the **Contact (optional)** field appears next to it, to
indicate the person at the customer who placed the order.

## What recalculates when you set or change the customer

- **Totals and discount**: the quote is repriced with the new
  customer's discount and table. The change applies to the whole quote, not only to new lines.
- **ERP adjustment**: the customer's price adjustment is read again from the ERP at the moment of
  linking. If it changed, the screen warns **This customer's adjustment changed in the ERP: from … to
  …. Prices have already been recalculated.** If the ERP did not respond, the warning says the
  price uses the adjustment from the last reading and asks you to check in the ERP before sending.
- **Payment terms and freight**: suggestions that had come from the previous customer are dropped,
  and the screen looks up the last paid ones for the new customer again.
- **Branch in the list**: a customer's branches appear indented below them,
  so you can find them by the name or CNPJ of a store in the chain. Clicking a branch
  chooses the customer itself: the one who pays for the order is always the customer. On an
  allocated order, each destination's branches stay as they were.

## Use data from the document or from the ERP

In an integrated store, Vendria checks the customer's CNPJ in the ERP. When the ERP
responds, the **Customer** section starts showing legal name, trade name, state registration,
email and phone as they are in the ERP, and next to the badges the **Use
document data** button appears. It goes back to showing what was read from the order; **Use data
from the ERP** undoes it. If the two differ, the difference appears in amber next to it.

The CNPJ is never replaced by this choice: it is the key for the check.

## A customer outside your portfolio

The quote's customer has to be in the portfolio of **whoever sells that order**.
When the quote's seller is already set, the customer list comes filtered
by their portfolio, and the top of the list says so: **Only <name>'s portfolio.**
To see everyone, an administrator removes the seller in the **Seller** block.

If you are a **sales rep**, you reach only the customers in your portfolio (or your
rep agency's). Choosing a customer outside it is refused with **Customer outside
your portfolio.** The message does not say whose customer it is, on purpose.

## A customer that does not exist in the system

Registering a new customer is a task for your company's administrator. Until the
registration comes through, the quote stays without a customer, at price table prices, and you link
it later. See [Request the registration of a new customer](/en/ajuda/pedir-o-cadastro-de-um-cliente-novo).

### Register a new customer in the ERP, without leaving the quote

In a store with an ERP, whoever can register customers in the ERP sees, in the footer of the
customer picker, the option **Register new customer in ERP**. It appears in **Set
customer** / **Change customer** on the quote page, in the **Company** field of the
editor and the cart, and in the customer picker on the purchase page. Who can: the
company's administrators and, in a rep agency company, the Partner, the
Administrative and the Seller the rep agency allowed in **Permissions**.

1. Search for the customer first. If they do not appear, click **Register new customer
   in ERP**.
2. The **Register customer in ERP** window opens with what you typed in the search:
   a valid CNPJ goes into the **CNPJ** field; a name goes into **Legal name**.
3. Complete the data and check the list of connections: one line per ERP of the
   company, with a checkbox. The free ones come checked, and those of this
   quote's ERP appear with the **required for this order** badge. Uncheck the ones you
   do not want; a connection that cannot receive the registration appears disabled,
   with the reason.
4. Click **Send registration to the ERP**.

The customer goes into the quote **right away**, and the message says: *"Registration sent to the
ERP (Filial). The customer is already on this quote; confirmation unlocks when the
ERP approves the registration."* You keep building the quote normally, with the
right customer and their prices.

⚠️ **Confirming stays locked until the ERP approves the registration** (in stores that
accept the registration together with the order, see below). The ERP only accepts
orders from customers registered in it, and accepting the registration is a manual step by
whoever looks after the ERP. Meanwhile, the customer check strip shows
*"Registration sent to the ERP (Filial) on 08/10 at 14:30 — awaiting approval"*.
When the ERP approves it, use **Check in ERP** and confirmation unlocks.

Sometimes the registration is sent, but the customer cannot go into this quote. The
message says so without giving the reason: *"The registration was sent to the ERP (Filial),
but the customer could not go into this quote. Choose the customer in the list when
they appear or talk to whoever manages customers."*

### In a store that accepts the registration inside the order

Some stores have an ERP that receives the new customer **together with the order**: the
two arrive in the same submission, and the back office approves the customer and imports the order
right after. In those stores, when the quote has no customer yet and is not allocated
among branches, the window opens with one more choice, *When the registration goes to the
ERP*:

- **Register along with the order** (recommended, already checked): the registration
  is saved in Vendria and goes to the ERP in the same submission as the order, when the quote
  is confirmed. The button is **Save to send with the order**, and there is no list
  of connections: the destination is this quote's ERP.
- **Send the registration now**: the usual submission, with the list of connections.

With **Register along with the order**, the message says *"Registration saved to go to the
ERP (Filial) together with the order. The customer is already on this quote, and it can already
be confirmed: the back office approves the registration and imports the order right after."*
Here **confirming does not wait for approval**. What happens next, and what to do
if the back office refuses the registration, is in [Request the registration of a new customer](/en/ajuda/pedir-o-cadastro-de-um-cliente-novo).

If the window says this quote's ERP *"does not accept the registration inside
the order yet"*, check **Send the registration now**: the path above applies.

## When it goes wrong

- **"Customer outside your portfolio."**: the customer belongs to another seller. Ask the
  administrator to adjust the portfolio, or for the owning seller to handle the order.
- **"The customer can't be changed: …"**: the change reprices the quote, and
  the price cannot change at this moment. If the message says **is with the
  buyer (sent version)**, the customer has a sent proposal in hand:
  open the quote and change the customer there. It goes back to editing after the
  notice, and the version they received stops being valid. See [Edit a sent proposal: reopen, revise and resend](/en/ajuda/retomar-uma-proposta-enviada). In
  other cases, such as a quote that has already gone to the ERP or a confirmed order the
  customer accepted through the link, duplicate the quote to redo it with another customer.
- **"ERP connector down — can't check your portfolio right now."**: the
  list depends on the ERP's portfolio and it did not respond. The portfolio has not
  disappeared; try again in a moment.
- **"No customer with that name in the order seller's portfolio."**: the search
  is narrowed to the portfolio of this quote's seller.
- **"ERP unavailable — try again."**: the search in the ERP base failed; the
  customers already registered still appear.

To choose the customer on WhatsApp, see [Choose the conversation's customer on WhatsApp](/en/ajuda/escolher-o-cliente-na-conversa).

## Common questions

**How do I find the customer by their ERP code?** On screen, type the code in the
editor's **Company** field or, outside the editor, in **Customer code (ERP)**
in the box in the **Customer** section (when the store's ERP allows this search). On
WhatsApp, write *"customer 43"* to Dri.

**Does changing the customer change the price of the lines already on the quote?** Yes. The
whole quote is repriced with the new customer's discount, table and ERP
adjustment, not only the lines added later.

**Can the quote have no customer?** Yes, at price table prices, and the
**Customer** section shows the **Customer not identified** badge. Choose the customer before
sending, so their discount applies.

**Why wasn't the customer in the document linked?** When the screen
warns **Customer identified in the document is outside your portfolio. Link
not applied.**, they belong to another seller's portfolio, and the quote stays without a
customer. Without that warning, Vendria was not sure who the customer is: check
the **Suggested customers** or search for the customer by name, CNPJ or code.
