Friday, April 26, 2024
HomeMicrosoft 365"Create a Real-Time Stock Price Tracker with Viva Connections: Part 1 -...

“Create a Real-Time Stock Price Tracker with Viva Connections: Part 1 – Setting Up the Backend”

Build a Viva Connections Card to Display Stock Prices – Part 1: The Backend
Introduction
Viva Connections is Microsoft’s digital workplace solution that enables employees to stay connected, informed, and productive. One way to get employees engaged and informed is to provide them with insights into their company’s performance. In this article, we will walk through how to create a Viva Connections card that displays stock prices.

Overview
We will start by creating a backend service that retrieves stock prices from a financial API. We will then create a Viva Connections card that displays the stock prices in the user’s Viva Connections dashboard.

Prerequisites
Before we get started, there are a few prerequisites that must be met in order for this tutorial to work.

* You must have a Microsoft 365 tenant with Viva Connections enabled.
* You must have an API key from a financial API.
* You must have a basic understanding of Azure App Service, Azure Functions, and Viva Connections cards.

Creating the Backend Service
The first step is to create a backend service that will be used to retrieve the stock prices. For this tutorial, we will be using an Azure Function to create the backend service.

Step 1: Creating the Azure Function
The first step is to create an Azure Function in the Azure Portal. To do this, navigate to the Azure Portal and select “Create a resource”. Then search for “Function App” and select the “Function App” option.

Step 2: Configuring the Function App
Once you have created the Function App, you need to configure the settings. The most important settings to configure are the Service Plan, the Storage Account, and the Operating System.

For the Service Plan, select the “Consumption Plan” option. This will allow the Function App to scale with demand.

For the Storage Account, select the “Create new” option. This will create a new storage account for the Function App.

For the Operating System, select the “Windows” option.

Step 3: Creating the Function
Once the Function App is configured, you need to create a new Function. To do this, select the “Functions” option in the left-hand navigation. Then select the “+” icon to create a new Function.

Step 4: Configuring the Function
Once you have created the Function, you need to configure the settings. The most important settings to configure are the Function Name, the Language, and the API Key.

For the Function Name, enter a descriptive name that will be used to identify the Function.

For the Language, select the “C#” option.

For the API Key, enter the API key that you obtained from the financial API.

Step 5: Writing the Code
Once the Function is configured, you need to write the code for the Function. The code for the Function will use the API key to query the financial API and retrieve the stock prices.

Step 6: Testing the Function
Once you have written the code for the Function, you can test it to ensure that it is working correctly. To do this, select the “Test” option in the left-hand navigation. Then enter the required parameters and select the “Run” button to execute the Function.

Step 7: Deploying the Function
Once the Function is tested and working correctly, you can deploy it to the Function App. To do this, select the “Deploy” option in the left-hand navigation. Then select the “Deploy to Function App” button to deploy the Function to the Function App.

Conclusion
In this article, we have walked through how to create a Viva Connections card that displays stock prices. We started by creating a backend service using an Azure Function. Then we created a Viva Connections card that displays the stock prices in the user’s Viva Connections dashboard.

Using the steps outlined in this article, you can easily create a Viva Connections card that displays stock prices. This can be a great way to provide employees with insights into their company’s performance.

Resources
* Azure Functions Documentation [https://docs.microsoft.com/en-us/azure/azure-functions/]
* Viva Connections Documentation [https://docs.microsoft.com/en-us/connectors/viva-connections/]
* Build a Viva Connections Card to Display Stock Prices – Part 1: The Backend [https://techcommunity.microsoft.com/t5/modern-work-app-consult-blog/build-a-viva-connections-card-to-display-stock-prices-part-1-the/ba-p/3773345]
References:
Build a Viva Connections card to display stock prices – Part 1: the backend
.

1. Viva Connections
2. Stock Prices
3. Building a V

Most Popular