> ## Documentation Index
> Fetch the complete documentation index at: https://docs.napps.io/llms.txt
> Use this file to discover all available pages before exploring further.

# CustomerContextService

`customerContext` lets you read basic customer session information.

Use it when your extension needs to know whether the customer is authenticated or needs the current customer's basic profile.

## Global Name

```ts theme={null}
customerContext
```

## API

```ts theme={null}
interface CustomerContextService {
  getCustomer(): CustomerInfo | null;
  isAuthenticated(): boolean;
}

interface CustomerInfo {
  name: string;
  email: string;
}
```

## Methods

### isAuthenticated

Returns whether the customer is authenticated.

```ts theme={null}
if (customerContext.isAuthenticated()) {
  // Customer is signed in.
}
```

### getCustomer

Returns the current customer information, or `null` when there is no customer.

```ts theme={null}
const customer = customerContext.getCustomer();

if (customer) {
  console.log(customer.name);
  console.log(customer.email);
}
```
