# Returning customers

Returning-customer behavior is built from two pieces: identity and continuity.

## Identify the customer

```js
plandalf.identify(userJwt);
```

Use a server-signed JWT for account-specific purchases. A plain email string is not decoded as customer identity by the backend. On logout, call `reset()` and start fresh with `session: null`; resetting identity is separate from session continuity.

## Resume within a tab or browser

```js
plandalf.present("pro-plan", {
  continuity: "tab"
});
```

For longer purchase decisions, use browser continuity.

```js
plandalf.present("annual-plan", {
  continuity: "browser"
});
```

## Resume from a token

```js
plandalf.present("pro-plan", {
  session: "cks_..."
});
```

## Start fresh

```js
plandalf.present("pro-plan", {
  session: null,
  continuity: false
});
```

## Related docs

-   [Identify customers](https://plandalf.com/docs/sdk/identify)
-   [Session continuity](https://plandalf.com/docs/packages/sdk/interfaces/FlowOpenOptions)
-   [Live events](https://plandalf.com/docs/packages/sdk/interfaces/FlowEvent)

Source: https://plandalf.com/docs/product-guides/checkouts/returning-customers
