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

# Notifications

This document describes MarketONE system-generated notifications. MarketONE delivers notifications to a Reseller (Service Provider) when action is required for end users (i.e., a Reseller's (Service Provider's) customers).

## How MarketONE Notifications Work

A notification is an essential message that informs a Reseller (Service Provider) when some action is required in relation to a Merchant partner subscription. The message contains key subscription details that the Reseller (Service Provider) can use to construct their own branded notification send to the end user.

As an example: an end user purchases an Platform-Managed Merchant subscription through the Reseller's (Service Provider's) website. The Reseller uses the [POST /submgmt/v2/subscriptions](https://docs.saas.amdocs.com/bundle/MarketONEAPIs/page/index.html#tag/subscriptions/operation/createSubscription) API to provision the new Merchant partner subscription in the MarketONE data store. However, the end user forgets or neglects to redeem their purchase and fully activate that subscription. After a set period of time, MarketONE sends the notification to the Reseller (Service Provider) as a reminder, and the Reseller (Service Provider) passes that reminder along to the customer.

## Setup and Configuration

MarketONE delivers notifications to integrated organizations through pre-defined API endpoints. To setup your automated event delivery, your organization will do the following:

1. Review MarketONE's notification API specification, and build the endpoint(s) to which MarketONE will send notifications.
2. Review the notification types, and determine your configuration preferences (see the table below).
3. Provide the endpoint URL(s) and desired settings to your delivery prime during your onboarding and integration phase with MarketONE.

Our operations team then handles all the event configuration on the MarketONE back-end. Available upon request, you can also update your notification settings at a later date.

This is similar to MarketONE [Events](events_r) configuration, except whereas events are optional, notifications are a mandatory part of the integration.

## Notification Types

| Notification | Description | Payload |
| - | - | - |
| partnerSubscription**Added** | MarketONE sends this when a new Merchant partnerSubscription is created on the platform. The notification includes Merchant partner subscription details, including a Merchant partner URL and redemption code, so that the customer can activate their subscription. | A list of key/value pairs. Keys are entity field names, and values are the corresponding values from the `partnerSubscription` entity in MarketONE. |
| partnerSubscription**ActivationReminder** | MarketONE sends this after a set period of time where an end user has purchased a Merchant partner subscription, but they have yet to redeem/activate it. This notification has the following configuration points: - Whether or not to enable or disable the notification per Merchant. - **Frequency** — The total number of times to (re)send a reminder - **Interval** — The length of time between each reminder For example, the frequency is 5 reminders and the interval is 2 days. A customer purchases a subscription, but does not activate it. MarketONE sends a reminder 2 days later, and then resends the reminder 2 days after that, and repeats until the fifth and final reminder (or until the end user activates the subscription). | A list of key/value pairs. Keys are entity field names, and values are the corresponding values from the `partnerSubscription` entity in MarketONE. |
| One-time passcode (OTP) | The OTP is required for user verification when enabling Direct Carrier Billing (DCB). MarketONE generates and sends the OTP to the Reseller (Service Provider), to notify the customer. | The customer's account identifier (e.g., MSISDN or email address), and the OTP value. |

## Notification API

MarketONE invokes the [POST /v2/notification](https://docs.saas.amdocs.com/bundle/MarketONECSPAdapter/page/index.html#tag/notification/operation/postNotification) API to send a notification to a Reseller (Service Provider). The Reseller (Service Provider) must support this API by building the appropriate endpoint (or endpoints) to receive notifications.

## Example Payload

```
{
   "type": " partnerSubscriptionActivationReminder ",
   "parameters": [
      {
         "key": "partnerSubscriptionId",
         "value": "6e8a8b4e-ad92-49db-ac29-3a18aa6cfdac"
      },
      {
         "key": "organizationId",
         "value": "organizationId"
      },
      {
         "key": "accountId",
         "value": "test_account_439161858"
      },
      {
         "key": "accountVid",
         "value": "test_account_439161858"
      },
      {
         "key": "subscriptionId",
         "value": "active_200_sub_439161858"
      },
      {
         "key": "subscriptionVid",
         "value": "active_200_sub_439161858"
      },
      {
         "key": "subscriptionItemId",
         "value": "231234234"
      },
      {
         "key": "externalPartnerSubscriptionId",
         "value": "externalPartnerSubscriptionId"
      },
      {
          "key": "registrationString",
          "value": "21234345"
      },
      {
          "key": "partnerUrl",
          "value": "https://example.com/redeem"
      },
      {
          "key": "partnerCode",
          "value": "PARTNERCODE001"
      },
      {
          "key": "productCode",
          "value": "MOCK3PROD0"
      },
      {
          "key": "createdDate",
          "value": "createdDate"
      },
      {
          "key": "updatedDate",
          "value": "updatedDate"
      },
      {
          "key": "startServiceDate",
          "value": "startServiceDate"
      },
      {
          "key": "endServiceDate",
          "value": "endServiceDate"
      },
      {
          "key": "serviceStatus",
          "value": "serviceStatus"
      },
      {
          "key": "billingStatus",
          "value": "billingStatus"
      },
      {
          "key": "type",
          "value": "type"
      },
      {
          "key": "state",
          "value": "state"
      },
      {
          "key": "billingPaymentMethod",
          "value": "billingPaymentMethod"
      }
   ]
}
```

## Notification Retry Protocol

If a notification isn't successfully delivered for any reason (e.g., a network outage), then MarketONE enacts a retry protocol to ensure a subsequent successful delivery. This protocol includes two separate mechanisms: a set number of automatic retries, and then operational retries in a separate, dedicated message queue.

## Automatic Retries

After the initial failure, MarketONE attempts a set number of immediate, automatic retries. Your organization can specify two variables:

* The maximum count of retries for an unsuccessful delivery.
* The time period in which retries are executed.

For example, MarketONE reattempts an unsuccessful delivery three times within a thirty second period. Alternatively, an organization can specify a desired count and time period, and the team will set these upon request.

## Operational Retries

Once all automatic retries are exhausted, MarketONE then moves the notifications/event to a separate, dedicated message queue. The message will then be delivered through one of two methods:

* Scheduled automatic jobs pick up messages from this queue at set intervals.
* The MarketONE operations team that monitors this queue (among others) can manually execute a retry to the organization's endpoint on a per-needed basis.

MarketONE will retry a notification delivery for any 5xx series HTTP error responses from the target endpoint.

**Note:** Currently, this retry protocol also applies to MarketONE's Merchant partner callbacks, i.e. product provisioning, de-provisioning and update partner subscription. In the near future, the platform will also support same retry mechanism for [Events](events_r) to which Resellers (Service Providers) can subscribe.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.