---
schema_version: "1"
id: 7a2d178499cb9f2b87c7b55376941ca5bc7b3ddf434a0a2ca22d4bab49f0d8d7
title: Point of Sale Loyalty SPIs
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/commerce/264-0-0/rt_pos_clienteling_loyalty_spis.md
canonical_url: https://help.salesforce.com/s/articleView?id=commerce.rt_pos_clienteling_loyalty_spis.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 036e3957ae9dfd4168738264c7050a2a9dc643e11ab5ded565b84060e4dd5c77
description: Use Point of Sale's SPI to connect your loyalty program to the POS app. Make it easier to find loyalty customers and show rewards.
products:
  - Commerce
release: "264"
---
# Point of Sale Loyalty SPIs

Use Point of Sale's SPI to connect your loyalty program to the POS app. Make it easier to find loyalty customers and show rewards.

For an overview of the Point of Sale loyalty feature capability, read this [article](https://help.salesforce.com/s/articleView?id=commerce.rt_pos_clienteling_loyalty_overview.htm&release=264.0.0&type=5 "Point of Sale supports loyalty integration. This integration facilitates the search for loyalty customers within the app, and shows and applies available rewards to the cart.").

## Prerequisites

- Modern POS App Build: 9.7.1 or greater
- Platform Support: iPhone & iPad
- Offline Support: no

## Leveraging Loyalty Information via Point of Sale SPIs

Configure Clienteling Service Provider Interfaces (SPIs) in Point of Sale to get customer loyalty information.

### Clienteling SPIs for Retrieving Loyalty Customer Information

There are four Clienteling SPIs you'll need to configure for retrieving customer loyalty information. After being configured, this information is passed and displayed on the POS app:

- Available rewards and their point values
- Point balances
- Tiers
- Loyalty visual badge
- Total rewards monetary value

For a complete list of fields available in the Clienteling SPI, refer to the Backend SPI Field under the CMS Grouping "User Loyalty Profile" in this [_article_](https://help.salesforce.com/s/articleView?id=commerce.rt_adv_config_sf_int_sfoms.htm&release=264.0.0&type=5 "The field mappings provide a mapping of the custom fields between Point of Sale and the Salesforce OMS. The following properties are used to map the fields from Point of Sale's Order objects to the Salesforce objects. On a high-level overview, this is how information about an order is selectively processed and then posted to SF OMS.")_._

To configure the Clienteling SPIs:

1. In CMS, go to **Integrations > Custom Connectors**.
2. Select **Create**.
3. Under **Connector Type**, select "**SPI**".
4. Under **Endpoint Name**, select a Clienteling SPI to configure. Refer to the table for the four SPIs required. Create a configuration for each of the four SPIs.
5. Configure the rest of the required fields.
6. Save your changes. ![The Custom Connection Configuration settings for the Get Customer configuration.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-retail-264-0-0-production-enus/17d647fb-8988-49fb-9add-c4f4cc79c9e4/retail/images/rt_pos_clienteling_custom_connect_config.png)

  
| Endpoint Name | Endpoint | Description |
| --- | --- | --- |
| SEARCH\_CUSTOMERS | GET/merchant/spi/sample/endpoint/sa/customers | Get a list of customers enrolled in the loyalty program, allowing for search and filtering based on specific criteria. |
| UPDATE\_CUSTOMER | PUT/merchant/spi/sample/endpoint/sa/customers | Update a customer's loyalty program profile, including personal details. |
| CREATE\_CUSTOMER | POST/merchant/spi/sample/endpoint/sa/customers | Enroll a new customer into the loyalty program, create a customer profile and initiate loyalty point tracking. |
| GET\_CUSTOMER | GET/merchant/spi/sample/endpoint/sa/customers/{customerId} | Find detailed information about a customer's loyalty program account. This information includes the customer’s points, tier level, rewards they can use, monetary value of their rewards, and the points each reward is worth. |

For more information on Point of Sale SPIs, refer to [Point of Sale API, SPI, and Webhook Specs](https://developer.salesforce.com/docs/commerce/retail-cloud/guide/retail-cloud-api-spi-webhook-specs.html).

### Loyalty Points SPI for Retrieving Redeemed Points

For app builds 9.8.1 or greater, with Point of Sale's [Loyalty SPI](https://developer.salesforce.com/docs/commerce/retail-cloud/guide/retail-cloud-api-spi-webhook-specs.html#retail-cloud-spi-summary), the points redeemed during a transaction are retrieved from a third-party provider if starting tendering. This data is retained until the transaction is ready for receipt printing. The initial request, submitted during Phase 1 order submission, includes the order or cart payload. The response includes earned loyalty points that are available for printing. Note, if the call fails or takes more than 1,000 milliseconds, the transaction isn't rolled back and the points won't be available to print on the receipt.

![The Custom Connection Configuration with the Loyalty Points Earned endpoint configured.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-retail-264-0-0-production-enus/17d647fb-8988-49fb-9add-c4f4cc79c9e4/retail/images/rt_pos_clienteling_retrieve_loyalty_spi.png)

  
| Endpoint Name | Endpoint | Description |
| --- | --- | --- |
| LOYALTY\_POINTS\_EARNED | POST/merchant/spi/sample/endpoint/sa /getLoyaltyPoints | The POS app doesn't count loyalty points that are redeemed. This SPI gets the number of loyalty points that are redeemed in a transaction from a different system. |

## Understanding Loyalty Reward Types

Apply coupons and transaction discounts to orders in the Point of Sale (POS) app.

### Transaction Discounts

Transaction discounts are applied to the order subtotal, calculated before taxes. In the "Get Customer" reward object under loyaltyProfile, these discounts are identified by setting the "rewardType" as "Discount." These rewards are specified as currency values. They can be marked as combinable with other loyalty rewards or not by setting "combinable" as "true" (combines this reward with others) or "false" (doesn't add if another is chosen). Rewards can't be added to the cart if they reduce the cart subtotal to under $0. Additionally, there are no restrictions on combining a loyalty transaction discount with other promotions.

A sample payload for a transaction discount looks like this:

```
{
     "profile": {
     "address": {
     "addressLine1": "12500 street",
     "addressLine2": "New York",
     "city": "New York",
     "countryCode": "US",
     "emailAddress": "tom@email.com",
     "firstName": "Tom",
     "lastName": "Cruise",
     "phone": "789-111-1111",
     "postalCode": "12345",
     "state": "NY",
     "storeId": "string"
     },
     "customerId": "789",
     "customerGroup": "string",
     "email": "tom@email.com",
     "firstName": "Tom",
     "lastName": "Cruise",
     "postalCode": "string",
     "phoneMobile": "1234567890"
     },
     "loyaltyProfile":{
     "rewards": [
     {
     "amount": "5.0",
     "code": "123",
     "codetype": "HONORM",
     //"expiryDate": 1706659200000,
     "labelText": "AG",
     //"redeemedDate": 1643587200000,
     "rewardId": "123",
     "statusDesc": "string",
     "rewardType": "Discount"
     },
     ]
     },
     "sessionId": "",
     "statusCode": "SUCCESS",
     "statusMessage": "OK"
     }
```

![The Transaction Rewards marked for a transaction discount in the POS app.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-retail-264-0-0-production-enus/17d647fb-8988-49fb-9add-c4f4cc79c9e4/retail/images/rt_pos_clienteling_loyalty_rewards_pos.png)

### Coupons

Coupons are linked to a promotion code, which already exist within the Point of Sale promotion engine. In the "Get Customer" reward object under loyaltyProfile, these coupons are identified by setting the "rewardType" as "Coupon." To successfully apply a coupon reward to the cart, the reward code provided must match a valid single-use or multi-use promotional code associated with an active promotion. When a coupon reward is applied to the cart, the POS app will treat the reward code as a coupon code. The POS will also adhere to all the combinability and applicability rules set within the promotion engine for that specific code.

A sample payload for a coupon would look like the following:

```
{
     "profile": {
     "address": {
     "addressLine1": "12500 street",
     "addressLine2": "New York",
     "city": "New York",
     "countryCode": "US",
     "emailAddress": "tom@email.com",
     "firstName": "Tom",
     "lastName": "Cruise",
     "phone": "789-111-1111",
     "postalCode": "12345",
     "state": "NY",
     "storeId": "string"
     },
     "customerId": "789",
     "customerGroup": "string",
     "email": "tom@email.com",
     "firstName": "Tom",
     "lastName": "Cruise",
     "postalCode": "string",
     "phoneMobile": "1234567890"
     },
     "loyaltyProfile":{
     "rewards": [
     {
     "amount": "5.0",
     "code": "123",
     "codetype": "HONORM",
     //"expiryDate": 1706659200000,
     "labelText": "AG",
     //"redeemedDate": 1643587200000,
     "rewardId": "123",
     "statusDesc": "string",
     "rewardType": "Coupon"
     },
     ]
     },
     "sessionId": "",
     "statusCode": "SUCCESS",
     "statusMessage": "OK"
     }
```

![The POS app showing a 30 percent off coupon.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-retail-264-0-0-production-enus/17d647fb-8988-49fb-9add-c4f4cc79c9e4/retail/images/rt_pos_clienteling_coupons_app.png)