PowerShell with Portals CLI

Power Apps Portals can be handled using Portals CLI that became available this winter.

Documentation here:

https://docs.microsoft.com/en-us/powerapps/maker/portals/power-apps-cli

ALM Best practise

Working this way is best practise for Application Lifecycle Management (ALM) and makes it possible to deploy portals to dev, test and production in a painful and fluent way.

Powershell with Portals CLI

We use PowerShell to handle Portals commands to authenticate, create auth profiles, download and upload portal content. This enables us to use Visual Studio Code when working with Portals code.

Auth

Download

Portal code in VS code

Plug n Play!

The Salespeople get a call from a new customer, they can register a new client using our simple form in SharePoint. The forms have been created using SPFx (SharePoint Framework) with React. The data from the form will then be processed and sent to DataVerse using a Cloud Flow to create a new contact.   

When the form is submitted, it creates a record in SharePoint, which we then create a contact in DataVerse with.

When the customer gets created in DataVerse we figured out we want to create a flow that alerts on both email and teams chat when a new customer arrives, this allows our resources to verify the customer and add the customer to our flow.

When a contact record is created, we automatically post a message in teams and send an email to our dedicated email.

Tag: Plug’n’Play & Stairway to Heaven

Its all about apps and responsiness

We have created a model-driven app to contain our customer card, this customer card contains a lot of data about the customers and which deal they have, and started with.

We have also embedded a Canvas App into this model-driven app which includes top deals right now.

During the creation of these apps, we had a focus on making this responsive. So the information could be reached whether you are on a mobile, tablet, or desktop device.

As you could see in the picture above, we can see that the model-driven app, with an embedded canvas app, is responsive.

The real nasty hacker

  1. When visiting www.elskling.no we used Fiddler to decrypt the HTTPS traffic to find the API they are using to get data. And turned it into our own custom connector.

2. We came above another API that gets both historical and today’s spot price in Norway. This could be filtered with “NO1” and so on, based on where in Norway you want to get a price from.

After getting some errors using the API, we needed an API key. After submitting an email to the email listed we received an API Key. After some more research, we could see that this is an API created by a “hacker” who abuses another public API that requires payment. We think that this is the ultimate candidate for “Thieving bastard”.

We are using this API to visualize today’s spot price and to create a local history in our database to create forecasts on prices with AI in the future.

3. The last API we are using is to get each day’s weather forecast, this is going to be combined with historical spot prices to forecast future prices on electricity. These prices are very much based on weather, and that’s why it is very relevant to include this in our library of apis.

Visual identity

We have created a visual identity for our brand

In OneNote we have a visual guide that all apps and services should follow.

In addition we have created a logo that apply to the colours and embodies the playfulness and professionalism that the company embodies.

The logo is picturing a lightning symbol with arrows around it to symbolise that the company deals in swapping electrical providers. The lightning symbol is also indicating the automaticallity of the processes if switching from one provider to another.

Full logo

The full logo will be used in the portal header and canvas app, as well as for SharePoint site and Power BI.

Logo text alone

This logo text alone can be used where the full logo is to big or when the resolution is too low and the text becomes unreadable.

Logo icon alone

The logo icon will be used as favicon in portals, as icon in Canvas Apps and as icon for DevOpsTeam.

Crawl, Mine & Process

We have created a scheduled flow that crawls through www.elskling.no results in my neighborhood electricity prices to get which provides that I could choose in my area.

  1. We created a custom connector, which gets data from www.elskling.no, so we could get this data using a Cloud Flow.
  2. Using this custom connector we were able to get all the providers of the zipCode we sent with the request.

3. After getting these data, we are able to add the Current Rate of each supplier to our Account record in Dataverse. By running this flow hourly, we are able to always get the latest price from each supplier.

Community Champion

Sharing what we are going to create and the event on social media. We have also been around helping other teams and sharing our knowledge. As well as talking ideas with other community champions (aka the one and only CRMkeeper)!

We been out and playing “santa” for Skill Bombshells, they borrowed IoT devices to achieve even more awesomeness with their product!!

PowerSwap Corp

Ninja turtles recently came up with an issue, after Rafael emptied the water heater after a long shower. They received an electricity bill that was way above what they used to. The electricity prices have recently increased a lot in New York City and ninja turtles need a solution before they are not able to pay their bills.

PowerShells has come up with an idea to make sure ninja turtles have the best electricity agreement, we are going to get hourly electricity prices and deals from all providers out there, and pick the best one. And this is how we are going to make it:

Portals

The customer will have access to a Power Apps Portal where they get an overview of their electricity agreement history and what agreement they are currently on at the moment.

They can see details about their current price; what are the electricity providers and suppliers paying for the electricity, what are they selling for and what are their earnings.

Customer Service

Customers can use the portal to send support requests and get access to knowledge articles. They submit support tickets as cases and can follow up their cases and communicate with customer service.

Progressive web app

The portal is enabled as a Progressive Web Apps and will be distributed as a native mobile app in Microsoft Windows Store and Google Pkat Android Store.

Customer service data registration

Our customer service employees will use a form or two (or more) to register various information about our customers and other information.
We’ll create an SPFx app (React) for this/these forms. The data from this/these form(s) will by some magic “flow” (pun intended) to Dataverse where it can be utilized by the various other parts of our system.

Power BI

Based on all the data generated from the API providing the current electricity spot price and the frequency switch of electricity providers and agreements we need some proper dashboards to display the data. We will make dashboards for the customer and the back office to track customer engagements.

Data and rates calculations

All available electricity providers and rates available for the customers (ninjas) will automatically be polled from APIs into Dataverse with power automate cloud flows. Advanced algorithms will calculate the best agreements available at an hourly rate, and automatically change the customer’s (ninja) agreement.

Overview

A canvas app will poll information from the Dataverse and embed Power BI visuals for a full overview of the customer base, prices, and providers.