Site iconAxway Blog

Amplify Central Connected Gateway Custom API Subscription Flow – Incident Management Use Case

Amplify Central Connected Gateway Custom API Subscription Flow incident management

In a prior post, we looked at an API Subscription Approval flow that integrates with your CRM for a business process-based approval mechanism for API subscribers.

In this post, we will look at an API Subscription Approval flow that integrates with your incident management system for an IT-centered API subscription approval process. Again, we’ll use Axway’s Integration Builder to implement the subscription approval flows and Jira for incident management but the principles apply to other incident management applications, such as ServiceNow.

We will actually have two Integration Builder flows, one will be triggered by a subscription event webhook from Amplify Central (e.g. when a new API subscription request is initiated) and the other will be triggered by events in Jira and update the API subscription and add a comment to the incident.

The approval or rejection is handled in the Jira incident itself when an IT stakeholder sets the custom approval field, adds a comment, and closes the incident.

The process is described as follows:

This data flow is described in the diagram below:

Data Flow Diagram

You can view the end-to-end process here.

Amplify Central/Discovery Agent Setup

As described above and in a prior post, the Amplify Central discovery agent should be set up for webhook approval and sending the email to the subscriber as described in the discovery_agent.yml fragment below:

.
.
.
subscriptions:
  approval:
    mode: webhook
    webhook:
      url: https://staging.cloud-elements.com/elements/api-v2/formulas/instances/4.....3/executions
      headers:
        Header=Authorization,Value=User IPJ.......NW4=, Organization 79......c2a05

  notifications:
    webhook:
    smtp:
      host: email-smtp.us-east-1.amazonaws.com
      port: 587
.
.
.

or the da_env_vars.env fragment below:

. . .
CENTRAL_SUBSCRIPTIONS_APPROVAL_MODE=webhook
CENTRAL_SUBSCRIPTIONS_APPROVAL_WEBHOOK_URL=https://staging.cloud-elements.com/elements/api-v2/formulas/instances/463433/executions
CENTRAL_SUBSCRIPTIONS_APPROVAL_WEBHOOK_HEADERS=Header=Authorization,Value=User IPJ.......NW4=, Organization 79......c2a05
CENTRAL_SUBSCRIPTIONS_NOTIFICATIONS_SMTP_HOST=email-smtp.us-east-1.amazonaws.com
CENTRAL_SUBSCRIPTIONS_NOTIFICATIONS_SMTP_PORT=587
. . .

Jira Custom Fields

There are several custom fields that should be added to your Jira instance in order to support this approval flow use case. We need to store the Catalog Item ID and Subscription ID for our subscription request in order to update our subscription request later via API call. I created two custom fields for these: CatalogItemId and SubscriptionId.

I also added two additional custom fields: Approve/Reject which is a picklist to select Approve or Reject for our request, the other is Approve/Reject Comment to store a comment related to the approval. These are shown below:

Jira Custom Fields
Jira Custom Fields – Pick List

To summarize, I added four custom fields to Jira:

Refer to the Jira documentation for instructions on how to add and configure custom fields.

Even though we created custom fields with certain names (CatalogItemId, SubscriptionId, …), Jira represents these as customfield_xxxxx internally and in API calls and responses. In the subscription flows, we will need to retrieve a list of all fields and then determine what customfield_xxxxx corresponds to the custom field names provided when we created the custom field. This will make more sense when we review the flows below.

Integration Builder Flow 1

The first flow is a manually triggered Integration Builder flow that is responsible for responding to the Amplify Central subscription webhook call and will create a Jira Incident when a subscription request is detected. The flow is shown below:

Integration Builder Flow 1

Flow Instance

The flow instance is shown below:

Integration Builder Flow 1 Instance

The variables are described below:

Flow Description

An example of the MS Team message is shown below:

MS Teams Message

The flow can be downloaded from here.

Integration Builder Flow 2

The second flow is a (Jira) connector event-triggered Integration Builder flow that is responsible for responding to Jira events (e.g. incident closed). The flow is shown below:

Integration Builder Flow 2

Flow Instance

The flow instance is shown below:

Integration Builder Flow 2 Instance

The variables are described below:

Flow Description

The flow can be downloaded from here.

Summary

In this Amplify Central API Subscription Approval Flow example, we saw how Integration Builder, with its Helpdesk connectors, enables a robust subscription flow that integrates with your IT-based processes.

Learn more about Amplify Central.

Exit mobile version