# A user's profile: ERP identity and rep agencies

> For the administrator: on the user's profile, link the ERP login and seller code and attach the person to a rep agency company.

Source: https://vendria.com/en/ajuda/ficha-do-usuario-identidade-no-erp-e-representacoes

## Where to find it

In your account menu, under **Users**, by clicking the person. The top shows the name,
the email (or the WhatsApp contact) and whether the account is **Active** or **Inactive**. The
**Edit data and profiles** button opens the registration window: name, contact, roles
and stores.

Below come three cards: **Data and profiles**, **ERP identity** and
**Rep agencies**. The first is the registration summary; the other two are what
didn't fit in the edit window.

## Details and roles

The **Data and profiles** card shows, read-only, the person's **WhatsApp**, **Email** and
**Roles** in your company, for example **Seller**, **Store Admin**
or **Buyer**. To change any of them, use **Edit data and profiles**.

⚠️ If the person has a company-level role (owner or
company administrator), only the owner can edit them. For everyone else, the
click on **Edit data and profiles** shows the notice "Only the company owner
can manage company administrators" and the window doesn't even open, instead of
letting you fill everything in and fail on save.

## Three identities that get confused all the time

The **ERP identity** card separates two things that look the same and aren't:

- **ERP accounts**: that person's login in the supplier's system. It's about
  access to the ERP, not about commission.
- **Seller codes in the ERP**: the commercial code: commission and portfolio. It's through
  it that the order goes out assigned to the right person in the ERP.

The third identity is the **Rep agencies** card: which rep agency
this person sells on behalf of.

Login and code can point to different connections, and that's not an error: they are
separate records in your ERP. And neither of them is the **Seller code** in the
edit window, which is an internal Vendria code.

## ERP accounts: linking the person's login

The **ERP accounts** block says **Saves right away**: there is no save button, each
link takes effect the moment it's made.

1. Click **Link account**.
2. In the **Link ERP account** window, filter by name, username or email. If the
   person doesn't show up, **Search the ERP** queries again, because the initial list may
   come truncated.
3. Choose their login.

With no link, the block says no ERP account points to the person. The
**X** next to a login undoes the link.

When the login was renamed or deleted in the ERP, the block warns that that user
no longer exists there. If Vendria finds the new login, it offers the button
**Relink to** followed by the name; if it doesn't, unlink and choose the new
user.

## ERP seller codes: linking the commission

The **Seller codes in the ERP** block shows one badge per code linked to the person,
with the connection name next to it. The same seller can be 7 in one ERP and 88 in another,
and the badge says which.

1. Click **Link code**.
2. The **Link seller code** window lists only the ERP codes that still
   **have no owner**. Search by name, document or code.
3. Choose the code. It belongs to this person immediately.

The link grants no access at all: it only says whose code it is. That's why it applies
to any role. If the list says "All ERP codes already have an owner", the code
you're looking for is already linked to someone; taking it from an owner is a separate act.

Only a code linked by hand has the **X** to unlink. A code that the sync
with the ERP gave the person can't be undone here. A rep agency's code
is managed in **Sales reps**.

## Rep agencies: which company the person sells on behalf of

Each row of the **Rep agencies** card shows:

- the rep agency's name, which takes you to its page;
- the person's **role** inside it: **Partner**, **Administrative** or **Seller**;
- the **Main** badge, when they are the main contact;
- the account status, for example "Confirmation not sent", "Awaiting
  confirmation", "Confirmed on" with the date, or "Own account — signs in with the login
  they already have";
- **Serves:**, with the stores that rep agency's mandate covers.

It's the same reading as the rep agency's members tab, over the same data: the two
screens don't diverge. With no rep agency, the card says the person doesn't represent
any company that serves yours.

## Linking a person to a rep agency

1. Click **Link to a rep agency**.
2. Search by name, legal name, CNPJ or code and choose the rep agency. Those that
   serve other companies come with the **serves others** badge.
3. Click **Link**.

The person signs in with the login they already have; there's no invitation to send.

⚠️ The link may be refused, and the reasons are not your fault:

- the rep agency **serves other organizations**: putting someone from your team in it
  would give them access there too, and that decision belongs to the others;
- the rep agency has **its own CNPJ**: it can start serving other
  organizations without going through you, taking along the people from your company;
- the person administers your company, or the rep agency serves stores you don't
  administer; then the owner is the one who links.

In the first two cases, Vendria support makes the link.

## Removing a person from a rep agency

**Remove**, on the rep agency's row, asks for confirmation and explains the effect: the
person loses the access they had through that rep agency, and the customers they
served there become **without an owner**: they start showing as "No seller" on the
**Customers** screen, where you check the rows and choose the new seller.

The removal may be refused, and the message says why:

- the person is the rep agency's **only Partner**; promote another Partner first;
- the rep agency **is already managed by its own Partner**; the removal is theirs, on
  the rep agency's own team screen;
- the person is **linked to an ERP**; deactivate the sales rep in the ERP and the
  sync propagates it.

## Common questions

**I linked the ERP login and the order still goes out without a seller.** A login is not a
code. Also link it in **Seller codes in the ERP**.

**The code I want doesn't show up on the list.** The list only shows codes without an owner.
If it already belongs to someone else, unlink it there first.

**Why can't I edit this person?** They have a company-level role, and
only the owner edits those roles.

**I removed someone from a rep agency and customers disappeared.** They were left without a
seller. Open **Customers**, check the rows and assign a new seller.
