Over the past two years, MIBAR.net has built PowerApps applications for several of our current and prospective NetSuite clients as a way to extend ERP to mobile devices and/or add custom processes that would be difficult to recreate in NetSuite itself. Solutions include mobile order entry or customer order entry applications or receiving and inventory management applications amongst other use cases. In many of these projects, we’ve written complex Power Automate flows to move data in and out of the Common Data Service that our PowerApps use as a backend, however, one of the limitations we’ve hit is the ability to push data from PowerApps in real-time to NetSuite from Power Automate due to a lack of connectors that can hash the authentication signature.
As I wrote about last year, we have been able to get around this limitation by generating the necessary authentication header in Netsuite and sending the header to trigger the Power Automate Flows that organize and return the necessary Common Data Service to Netsuite. This has a couple of flaws – most obviously, this requires a scheduled script in Netsuite to create the header and trigger the Flow, which at its most frequent, can only query data every 15 minutes. A second issue is that the Flow must return the data to Netsuite once receiving the authentication header within 5 minutes to prevent it from expiring.
Our team has talked about solutions to this issue as our PowerApps practice has expanded and hypothesized various solutions to this problem. Most notably, as we’ve been expanding our practice into the Azure stack, we identified Azure functions as a potential solution. Recently, we had the opportunity to test this out as part of building a proof-of-concept Flow to query data from an API that has similar authentication requirements to that of Netsuite. As part of this work, I worked with one of our developers to train on Azure Functions and deploy a serverless app that receives a string to be hashed, a key, and a third parameter for the hashing mechanism and returns the hashed string to the Flow.
With a little bit of elbow grease, we were able to fully deploy the serverless app and leverage it to return our hashed string to Flow which we then can use in a variety of different contexts, most notably NetSuite! While this could have been accomplished with a C# application hosted locally, being able to leverage the Azure cloud to host this application alleviates several logistical hurdles such as scalability, reducing the need for hardware, amongst others.
With several NetSuite-PowerApps implementations that require near-real-time bidirectional integrations in our pipeline this spring, moving past this limitation in Flow will allow us to expand on our practice and provide more reliable service to both existing and prospective customers. Schedule a consultation if you are interested in learning more.