MS Team Notification from SecureTransport: A Step-by-Step Guide to build custom routing step

Managed File Transfer (MFT) is a critical subject for many organizations; missing files result into missing SLAs and, in case of file transfer errors, immediate attention is needed. This is where Microsoft Teams and Slack beat email – responsiveness in Teams/Slack is much faster.

With the increasing popularity of Microsoft Teams and Slack, many users of Axway’s MFT solutionAMPLIFY SecureTransport – have been asking for file transfer notifications on these platforms. Right now, SecureTransport sends notification only via email out-of-the-box. This is the primary reason customers are looking for Teams or Slack notifications in the MFT solution.

Axway Marketplace provides several plugins as custom connectors and custom routing steps of Axway’s MFT solution SecureTransport. Axway’s R&D team keeps adding these plugins in the marketplace to keep up with market demand and we understand that it is a moving target. To address this, AMPLIFY SecureTransport packaged our SDK and developer guide to help our customers build their own custom routing step or pluggable transfer site in a simple and safe way. This allows a client community to create their own artifacts and contribute to the MarketPlace as an Open source.

Recently, I had the opportunity to use this feature myself. I was involved in a project where I needed to send notifications to MS Teams. Unfortunately, there was no such plugin in the marketplace. So, I built a plugin as SecureTransport’s custom routing step using the SecureTransport framework. In this blog, I am going to take you through my journey to build the custom routing step so that you have a kick start whenever you need to build one.

Framework Components

Developing custom routing steps is easier than developing a pluggable transfer site. Here are the main components of the framework you need to work on:

  • HTML Page – this is where you design the custom step. In this case, I have MicrosoftTeamNotification.html where I wrote the HTML code as per page design.

Here is my HTML code snippet

  • You can write JS code in a JS file include in the HTML. I have written the JS code in the html page. Here is how my JS code snippet looks like.

  • Bean – this is a java component. In this case, I have MicrosoftTeamNotificationBean.java, this is a POJO class that corresponds to the page information.
  • Producer – this is another java component. In this case, I have MicrosoftTeamNotificationProducer.java. Here I have implemented the team notification. Here is my producer class looks like.

As you can see in the above code snippet, I have only one public method called “process” and that’s all you need. When routing step control comes to this step, this method is invoked. In this method, I capture routing step configuration, determine if the previous steps were succeeded/failed, evaluating the notification texts, get transfer error details, send notifications, etc.

Note: To capture error details (in case the configuration suggests to include error details in the notification text) I made calls to ST APIs. Here are the API details.

  • /api/v1.4/transfers?limit=10&offset=0&coreId=<coreId>. This will return a list of transfer entries (equals to the number of steps in the routing) with corresponding status and link to itself. I filtered these entries and considered the one which failed and then make the second API call to get the error details.
  • /api/v1.4/transfers/{transferId}. This returns many details about the transfer entry with the error content.
  • MS Team connector – obviously, you need to know how to send messages to MS team. MS team provides a list of connectors, one of them is “Incoming Webhook”. Once you configure an “Incoming Webhook” for a channel, it gives you an endpoint to post the message into.

Note: To learn more about Incoming Webhook of MS Team channel, check out this link 

Routing Step Features

Here are the features available in the 1st version of the routing step.

  • Ability to send a notification for successful transfers.
  • Ability to send a notification for failed transfers.
  • Ability to use different notification text for success and failed transfers
  • Choice of using hardcoded text and expression variable in the notification text

  • Ability to use variables in the notification text. Supported variables are as mentioned below.

  • Ability to include error details in the failed transfer notification.

  • Ability to resubmit the transfer from MS team. 

Routing Step

  • Add MS Team Notification step in the Advance Routing

  • Provide details in the step

 

MS Team Notifications

Here is how this custom routing step posts notification text into MS Team.

  • Successful File Transfers

  • Failed File Transfers

Conclusion

Building the custom routing step took me less than 5 days. Granted, you need web development skills to make this happen but Axway does make this simple for our customers.

If you are not comfortable building a custom routing step yourself, you should contact your account executive or Axway support. We have a team within Axway who can help you build these transports and they are not tied to regular SecureTransport release cycles.

Building custom routing steps using SecureTransport SDK is safe to do and when you want to upgrade to newer editions of SecureTransport the custom routing step will not break.

Now that you’ve mastered creating a custom routing step, learn how to build a custom MFT connector.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.