Status updates

This guide will teach you to use Minna Technologies API's to consume and present status updates for actions. This guide is the continuation of Detect subscriptions and Initiate action.

Overall architecture

The current status of actions can be fetched from Cancel API. Status updates also generate Insights that can be consumed and presented to the user in various ways.

Batch process

Minna Technologies recommend that you fetch the status of the actions using a batch process. Running the batch process once every 24 hours is sufficient to have the most up to date statuses.

Database storage

See Detect subscriptions - Database storage for details.

Possible error states

  • Failed to fetch order status
  • Failed to open WebUI

Fetch cancellation status

The Cancel API is used to fetch the cancellation status. You should associate a cancellation with a transaction by matching on the serviceProviderId that is in the Cancel response model.

[
  {
    "serviceProviderId": "7c48a1ab-da9d-4999-b5ee-916c614f23b4"
  }
]

Enable order status in UI

When an order status is available, it should replace the action on the transaction with the status and the associated date for that status.

Action ongoing

Transaction entry point with status should be visible for 30 days counting from createdAt. Afterwards it should not appear.

The static entry point should continue to be visible after 30 days. statusLastChangedAt is the date that should be shown to the user.

[
  {
    "status": {
      "cancellationStatus": "Ongoing"
    },
    "createdAt": "2019-06-21T11:09:03Z",
    "statusLastChangedAt": "2019-06-27T11:09:03Z"
  }
]
Order status on transactionsOrder status on transactions

Order status on transactions

Order status using static entry pointOrder status using static entry point

Order status using static entry point

Action successful

Transaction entry point with status should be visible for 30 days counting from createdAt. Afterwards it should not appear.

The static entry point should continue to be visible after 30 days. completedAt is the date that should be shown to the user.

[
  {
    "status": {
      "cancellationStatus": "Successful"
    },
    "createdAt": "2019-06-21T11:09:03Z",
    "completedAt": "2019-06-27T11:09:03Z"
  }
]
Completed action on transaction and static entry pointCompleted action on transaction and static entry point

Completed action on transaction and static entry point

Action failed

Transaction entry point with status should be visible for 14 days counting from createdAt. Afterwards it should not appear.

The static entry point should continue to be visible after 14 days. completedAt is the date that should be shown to the user.

[
  {
    "status": {
      "cancellationStatus": "Failed"
    },
    "createdAt": "2019-06-21T11:09:03Z",
    "completedAt": "2019-06-27T11:09:03Z"
  }
]
Failed action on transaction and static entry pointFailed action on transaction and static entry point

Failed action on transaction and static entry point

Review ongoing action

When the user clicks on a transaction entry point the behavior should change to instead navigate the user to the detailed view of the ongoing status.

Reviewing ongoing actionReviewing ongoing action

Reviewing ongoing action

Reviewing ongoing ordersReviewing ongoing orders

Reviewing ongoing orders

API flow

For the API flow you will have to create your own ongoing action UI. This requires the following values:

Field

Example value

serviceProvider.name

More Noise

serviceProvider.services[i].categoryNameText

Music streaming

cancellation.status.cancellationStatus

Ongoing (display as Cancellation ongoing)

cancellation.createdAt

2021-07-15

cancellation.lastUpdatedAt

2021-07-16

WebUI flow

When the user clicks an ongoing action entry point that should use the same functionality as initiating an action. Since the action is ongoing a detailed status view will be shown instead to the user. See Initiate action for more details.

Review completed orders

When the user clicks on a transaction entry point the behavior should change to instead navigate the user to the detailed view of the complete status.

Reviewing completed ordersReviewing completed orders

Reviewing completed orders

API flow

For the API flow you will have to create your own ongoing action UI. This requires the following values:

serviceProvider.name

More Noise

serviceProvider.services[i].categoryNameText

Music streaming

cancellation.status.cancellationStatus

Successful (display as Cancellation completed)

cancellation.createdAt

2021-07-16

WebUI flow

Don't know how this will work? Would we be able to use manage-subscriptions/webui to the get the WebUI URL in this case as well? Presumably by not providing a serviceProviderId? Although that is a required field ATM.

Insights and notifications

The users can get additional feedback about their ongoing orders from Insights. See Insights to learn more about enabling Insights.


Did this page help you?