Action - getContext

Purpose:

When invoked, this action will allow the admin user to obtain productId, productName, and category of the current product. That can be leveraged in business logic of the admin integration.

Inputs:

None


Returns:

Type: Promise

==> Resolved:

A subset of the current product attributes:

{
  "productId": "e1db96c0-8b38-408e-be8a-b5xxxxxxxxxx",
  "serviceSetupId": "b813b51a-179b-45c7-bb34-01xxxxxxxxxx",
  "productName": "product name",
  "category": "categoryName"
}

If the user does not have permission, the Promise will resolve to an empty object - {}

==> Rejected

An error is raised, containing a message attribute with details on the error that occurred

{
  message: "{{ERROR_DETAILS}}"
}