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

# Introduction

> Connect Smile and configure how customers are rewarded.

## Overview

Our integration with [Smile](https://smile.io) makes it easy to reward customers for linking accounts and making retail purchases.

Subtotal awards points directly in Smile by posting points transactions against each customer's Smile profile. No matching earning rule needs to exist on the Smile side — Subtotal calculates the points, then records the transaction with a description you choose.

## Get your Smile API key

Sign in to your Smile admin and navigate to *Settings → Developer Tools → Manage API keys*. Generate a new REST API key for Subtotal and copy the secret value — you'll need it to connect the integration.

<img src="https://mintcdn.com/typecastleinc/lLyv3OgTga4hu9ZN/images/integrations/smile/smile-api-key.png?fit=max&auto=format&n=lLyv3OgTga4hu9ZN&q=85&s=b27b99b200e2ffc1b102285d531c3c9a" alt="smile api keys" className="rounded-lg border border-gray-100" width="679" height="183" data-path="images/integrations/smile/smile-api-key.png" />

<Note>
  Smile shows the full secret only once, at creation time. After that only the last four characters are visible. Store the key somewhere safe, or generate a new one if you lose it.
</Note>

## Connect your Smile account

Sign in to the Subtotal Dashboard and connect your Smile account to enable the integration.

Navigate to [*Integrations → Smile → Connect*](https://dashboard.subtotal.com/integrations/smile).

Click the `Connect Smile` button.

<img src="https://mintcdn.com/typecastleinc/lLyv3OgTga4hu9ZN/images/integrations/smile/smile-inactive.png?fit=max&auto=format&n=lLyv3OgTga4hu9ZN&q=85&s=f57bc252915c38f7b556320492128e66" alt="smile inactive" className="rounded-lg border border-gray-100" width="978" height="156" data-path="images/integrations/smile/smile-inactive.png" />

Paste your Smile REST API key, then click `Save Integration`.

<img src="https://mintcdn.com/typecastleinc/lLyv3OgTga4hu9ZN/images/integrations/smile/smile-connect-dialog.png?fit=max&auto=format&n=lLyv3OgTga4hu9ZN&q=85&s=1a771a882e6c8b1766910b472adf19d2" alt="set smile api key" className="rounded-lg border border-gray-100" width="600" height="244" data-path="images/integrations/smile/smile-connect-dialog.png" />

You should now see an `Active` status on the Smile integration page.

<img src="https://mintcdn.com/typecastleinc/lLyv3OgTga4hu9ZN/images/integrations/smile/smile-active.png?fit=max&auto=format&n=lLyv3OgTga4hu9ZN&q=85&s=6d8b0019ecaa22e35c7fbd27441080bf" alt="smile active" className="rounded-lg border border-gray-100" width="963" height="156" data-path="images/integrations/smile/smile-active.png" />

## How Subtotal awards points in Smile

For each qualifying event, Subtotal:

1. Looks up the Smile customer by **email** (`GET /v1/customers?email=…`).
2. POSTs a points transaction (`POST /v1/points_transactions`) with the computed point value and the **Action name** you set as the transaction description.

The description shows up in the customer's Smile activity feed, so choose something customer-friendly (e.g. `Retail purchase`, `Linked a retail account`). Subtotal does not reference any Smile-side earning rule or custom activity token — the only required setup in Smile is the API key.

## Configure actions

After connecting, configure the actions Subtotal should send to Smile. Each action maps a Subtotal event (an account being linked, a purchase being made) to a points award.

<img src="https://mintcdn.com/typecastleinc/lLyv3OgTga4hu9ZN/images/integrations/smile/smile-add-action.png?fit=max&auto=format&n=lLyv3OgTga4hu9ZN&q=85&s=679eb45a71437508dad4f9916461877d" alt="smile integration settings" className="rounded-lg border border-gray-100" width="1280" height="720" data-path="images/integrations/smile/smile-add-action.png" />

| Setting                 | Description                                                                                                                                                    |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Customer identifier** | The field on the connection used to identify the customer in Smile. The Subtotal Smile integration currently only supports identifying customers by **Email**. |
| **Actions**             | One or more event-to-reward mappings. Each action specifies the event type, retailers it applies to, and the points to award.                                  |

To add an action, click `Add action` and choose an event:

| Field                                      | Description                                                                                                                                                                                                                                                                                                                         |
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Event**                                  | `account.linked` (fired when a customer links a retailer account) or `purchase.created` (fired for each purchase Subtotal collects).                                                                                                                                                                                                |
| **Action name**                            | A human-readable label. Sent to Smile as the points transaction description — this is what the customer will see in their Smile activity feed.                                                                                                                                                                                      |
| **Retailers**                              | Restrict the action to specific retailers, or apply it to all.                                                                                                                                                                                                                                                                      |
| **Points** *(account.linked)*              | Flat number of points awarded when a customer links a qualifying account.                                                                                                                                                                                                                                                           |
| **Points per dollar** *(purchase.created)* | Points awarded per dollar of spend on items Subtotal collects from the purchase. Subtotal computes points as `ceil(items_subtotal × points_per_dollar)` — where `items_subtotal` is the sum of `price × quantity` for each collected item — and sends the resulting integer to Smile. Taxes, shipping, and other fees are excluded. |
| **Start date** *(purchase.created)*        | Only purchases made on or after this date are rewarded. This controls how much historical purchase data gets sent to Smile when a customer first links their account.                                                                                                                                                               |

See [Rewarding linked accounts](/docs/integrations/smile/linked-account) and [Rewarding purchases](/docs/integrations/smile/purchases) for examples of each action type.

## Customer identification

The Smile integration identifies customers by their **email address**. Subtotal calls Smile's `GET /v1/customers?email=…` endpoint to resolve the Smile customer for each connection, then awards points against that customer's profile.

How the email is captured depends on your setup:

* **Shopify app** — the customer's email is captured automatically from their Shopify profile. No additional parameters needed.
* **API integration** — include the `email` field when creating a connection via [`POST /connections`](/docs/api-reference/connections/create). Without it, Subtotal won't be able to identify the customer in Smile.

<Note>
  If no Smile customer exists for a connection's email (e.g. the customer hasn't been created in Smile yet), the action is skipped and logged. The customer must exist in Smile at the time the event is processed — points cannot be awarded retroactively.
</Note>
