# Retail Sales Benchmarks
source: https://developer.mastercard.com/small-business-credit-analytics/documentation/use-cases/retail-sales-benchmarks/index.md

## Overview {#overview}

Retail Sales Benchmarks metrics provides a monthly breakdown of merchant location performance against a benchmark peer set across 14 benchmark metrics for the latest month.

|   Metrics Category    |                              Description                              |                     Sample Metrics                     |
|-----------------------|-----------------------------------------------------------------------|--------------------------------------------------------|
| **Business Metadata** | Metrics on small business identity and operations                     | Last seen transaction date First seen transaction date |
| **Merchant Sales**    | Metrics on business' retail sales and sales growth                    | Average spend per card index                           |
| **Channel Sales**     | Metrics on customer's preferred channel at the business location      | % of e-Commerce transactions index                     |
| **Customer Loyalty**  | Metrics on recurring customer activity at the small business location | Cards repeated in 6 months index                       |
| **Returns**           | Metrics on the rate of returned purchases                             | Returned transactions index                            |
| **Business Risk**     | Metrics on business' authorization and fraud rates                    | Fraud chargeback index                                 |

## Pre-requisites {#pre-requisites}

Prior to accessing the Retail Sales Benchmarks metrics, clients or lenders must meet the following pre-requisites:

### 1. Merchant Matching {#1-merchant-matching}

The client or lender needs to have the below basic details for Small Business (SMB) merchant location. Small Business Credit Analytics performs the merchant match operation based on the necessary details shared for the merchant location. The best matches are shared with the client for them to decide on which is the intended merchant location they want to request data on.

* Country
* ID Type
* ID Value
* Merchant Location Name
* Address
* City
* State
* Zip Code

**Note** - The Small Business Credit Analytics API provides clients with access to business metrics pertaining to a distinct merchant location. In case if a merchant has presence across multiple locations, client will need to request details for each merchant location separately.

### 2. Retail Sales Benchmarks Metrics {#2-retail-sales-benchmarks-metrics}

* The client needs to have consent from the merchant before requesting the API to fetch merchant metrics
* The Location ID returned in the merchant match response in the previous step is needed to request merchant metrics
* To request metrics, the client will need to specify "retail_sales_benchmarks" for the metrics_type parameter and "monthly" for the metrics_frequency parameter in the request

## Sequence Diagram {#sequence-diagram}

## Execution Steps {#execution-steps}

### 1. Merchant Matching {#1-merchant-matching-1}

1. Small business or retailer provides their details to the lender for credit purposes

2. The lender makes the Small Business Credit Analytics API call for merchant match. The request for merchant match can be made in one of the following two ways:

   1. By providing ID parameters (Recommended)
      * country
      * id type
      * id value
   2. By providing Name and Address details
      * country
      * merchant location name
      * address
      * city
      * state
      * zip code
3. Small Business Credit Analytics API takes the input to check-in merchant database for location:

   * In the case of multiple matches found it returns the location details in decreasing order of similarity between input and match found
     * A maximum of 10 matches could be shared as part of the API response
   * The response consists of the additional parameters for Location ID (unique ID for location in the Mastercard system)
   * You will receive an error response for an invalid request or any missing request parameter.
4. The lender would need to perform a check if the intended merchant location is in the API response or not.

   * In case of a validation error or no match found or intended merchant location not in API response, the lender needs to update the input and perform step 2 again

### 2. Retail Sales Benchmarks Metrics {#2-retail-sales-benchmarks-metrics-1}

1. The lender makes the API call for metrics on the identified location from the merchant match response. The request requires the following input parameters:

   * Location ID
   * Consent Flag
   * Metrics Type- "retail_sales_benchmarks"
   * Metrics Frequency- "monthly"  
     **Note:** Metrics are delivered in "monthly" aggregations only, and "weekly" frequency is not supported.
2. The API validates the inputs and responds with metrics for the selected merchant location. You will receive an error response for an invalid request or any missing request parameter. You can receive the following valid responses for all metrics:

   * 0: In the event that no transactions were observed for the respective metrics at the merchant location.
   * null: In the event that the minimum number of transactions needed to calculate the respective metrics was not met in that period for the merchant location.
   * -1 : In the event that there were transactions at the merchant location but insufficient transactions in the merchant competition set.
3. The lender processes the returned metrics and other data sources for credit decisions, performs internal credit decisioning and communicates the credit decision outcome to small businesses or retailers.

[← Retail Sales Analytics](https://developer.mastercard.com/small-business-credit-analytics/documentation/use-cases/retail-sales-analytics/index.md)

