# Customer login flow

Import npm library in your login flow.

```
npm i priceops
```

Install in react code in the login flow.

When a customer logins, call the setCustomer function of Priceops library to set customer.

Usually it is the customer information of the logged in customer.

ID is unique as well as email, between all customers sent to PriceOps.

As an example

```javascript


// import priceops function from priceops library

import priceops from 'priceops';

// You can include this line in your UI code anywhere after the customer data
// available
// Customer id is the unique customer id in your app
// Customer email is the email your customers use to access your app

       priceops.setCustomer(customer.id, customer.email);


// On logout call the below function to remove the customer information from
// priceops library

       priceops.onCustomerLogout();

```


---

# Agent Instructions: 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:

```
GET https://docs.priceops.net/documentation/developers/customer-login-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
