Configure a site to use loyalty programs

The following sections describe how to configure your sites to recognize and use loyalty programs.

Associate a loyalty program’s secondary currency to a site

You can use Admin endpoints to define the secondary currency for a site by setting the secondaryCurrency property.

To associate secondary currency to a site, issue a PUT request to the /ccadmin/v1/sites/{site_id} endpoint on the administration server. The following example identifies the secondary currency of the Site US as US Dollars:

PUT/ccadmin/v1/sites/siteUS
{
  "properties": [
    {
      "secondaryCurrency": "USD",
    }
}

Associate loyalty programs with a site

Loyalty programs can be associated with specific sites. To see which loyalty programs are associated with a site, issue a GET request using the /ccadmin/v1/sites/{site_id} endpoint on the administration server. The response may be similar to the following:

{
  "...": "...",
  "loyaltyPrograms": [
    {
      "repositoryId": "siteUS_pg100001",
      "programId": "pg100001",
      "programName": "Premier",
      "associationDate": "2017-07-05T14:15:37.000Z"
    },
    {
      "repositoryId": "siteUS_pg100002",
      "programId": "pg100002",
      "programName": "Insider",
      "associationDate": "2017-07-05T14:15:37.000Z"
    }
  ]
}

To associate a loyalty program with a site, issue a PUT request to the /ccadmin/v1/sites endpoint on the administration server. For example:

{
  "properties": {
    "...": "...",
    "loyaltyPrograms": [
      {
        "programId": "pg100001",
        "programName": "Premier"
      }
    ]
  }
}

You can associate a loyalty program with a site at any time by issuing a PUT request to /ccadmin/v1/sites/{site_id}.

Associate a loyalty program price group with a site

Once your site has been configured to recognize loyalty programs, you can create price groups for the loyalty program and associate the price group with the site.

Create a price group for loyalty points

Once you create a currency for the loyalty points, merchandisers can use the Commerce administration interface to create and activate a price group for the currency. A price group is a set of price lists (list price, sale price, and shipping surcharge), in a specific currency, for the products, SKUs, and shipping surcharges in a catalog. Creating a price group for the points-based currency lets you price catalog items in the points so a shopper can select the points-based currency from a list of supported currencies and see those prices on your store.

For details about creating and activating price groups, see Configure Price Groups.

Associate the loyalty points price group

To associate the loyalty program price group with a site, issue a PUT request using /ccadmin/v1/sites/

{site_id} .

For example:

PUT /ccadmin/v1/sites/siteUS
{
  "properties": {
  "priceListGroupList": [
    {
      "active": true,
      "id": "defaultPriceGroup"
    },
        {
      "active": true,
      "id": "loyaltyPoint"
    }
  ]
  }
}

Enable a loyalty payment gateway

If you are going to integrate with a gateway for paying with loyalty points., you must configure your loyalty point programs as described in the Integrate with a Loyalty Point Payment Gateway section.