# Customer details on documents and learning of commercial patterns

> For the administrator: choose which customer details go in the downloaded PDF and Excel, and decide whether the store learns each customer's payment terms, freight and discount.

Source: https://vendria.com/en/ajuda/dados-do-cliente-nos-documentos

## Where to find it

In your account menu, under **Catalog and exports**, on the **Quotes and
orders** tab, near the end of the tab, in blocks that come collapsed and open when you click the
title:

- **Header**: which customer details appear on documents (next to what appears
  at the top of the quote sent; right below comes the **Totals** block, for the footer);
- **General settings**, the last one on the tab: the **Learn commercial patterns** switch.

Both settings belong to the **store** you are in, and each change is saved
immediately: the screen confirms with **Saved**.

## Which customer details appear on the quote and the order

In **Customer fields shown on screen and in export files**, check what should appear
in the customer block of documents: **Legal Name**, **CNPJ**, **State
Registration**, **Phone**, **Email**, **Email NF-e** and **Address**.

The choice applies to the **PDF and Excel** the team downloads from the quote and the
order. It applies immediately, including to documents that already exist: the next
file generated already comes out with the new choice.

What goes **to the customer** follows another rule:

- the **quote sent** and the **order copy** follow the header of the quote
  template in use (the **Sent estimate** row, in the **Templates** list on the same
  tab). Legal name
  and CNPJ always appear, and the template turns address, contact and state
  registration on or off. The PDF of a version already sent to the customer stays as it was sent;
- the **review page** the customer opens through the link shows the details from
  their record, without the selection of this screen: they are the customer's own details.

The customer's trade name, the buyer and their WhatsApp always remain on the
document: the setting decides what is shown **in addition**, it does not serve to
hide whose order it is.

## When the order is invoiced to a customer branch

If the order is invoiced to a branch with its own tax record, the document
shows the legal name, CNPJ and state registration **of the branch**, instead of those
of the head office. In the files the team downloads, the boxes checked here still
decide which of these details appear.

## Learn commercial patterns: what it is

The **Learn commercial patterns** switch makes the store remember the conditions the
seller chooses for each customer. When it is on and the seller changes a condition
on an order, the new value becomes **that customer's default**, and their next order
is already born filled in that way.

What is learned:

- **payment terms**;
- **payment method**;
- **freight type**;
- the order's **manual discount**, which becomes a discount rule for that customer
  in the store.

## When the store learns

The learning happens when the order is **confirmed** in Vendria.

## What the learning never overwrites

- the conditions an administrator defined on the customer's profile: they were
  negotiated and stay as they are;
- the conditions **locked** for that customer;
- payment terms that are not among those allowed by the store's installment
  rules.

## ⚠️ When to turn the learning off

Turn off **Learn commercial patterns** if the conditions of each order are
negotiated case by case and should not become a rule. With the switch on, an
exceptional discount given on one order becomes that customer's discount on the
next ones, and this appears as a customer discount rule. See [Commercial rules and discount](/en/ajuda/regras-comerciais-e-desconto).

Turning it off does not undo what has already been learned: the defaults and discount rules
that already exist remain on the customer's profile and in the commercial rules until someone
changes them.

## Common questions

- **I checked CNPJ and it did not appear**: the customer has no CNPJ on record.
- **The new order came with a discount nobody gave**: the learning is
  on and a previous order from that customer had a manual discount. Check the
  customer's discount rules.
- **I configured it in one store and the other stays the same**: both settings are
  per store.
