Oneflow Sponsor: How Hogwarts Used Modern E-Signature Technology to Transform the Triwizard Tournament Contract

The Triwizard Tournament is a cornerstone of magical tradition, uniting wizards from across schools to test their courage, skill, and determination. But behind the thrill of dragons and enchanted mazes lies a less glamorous necessity: the contract.

Historically, Triwizard contracts were crafted on enchanted parchments, sealed with wax, and signed in person using magic quills. While effective, this process was rigid, time-consuming, and lacked the flexibility to address modern challenges, such as accommodating remote students or managing last-minute revisions.

This year, Hogwarts took a progressive step by using a modern e-signature solution to create and manage the Triwizard Tournament contracts. Here’s how it brought magic and efficiency together.

The traditional process for handling contracts came with a few inefficiencies:

  1. No Easy Revisions: Any clarification or adjustment required creating an entirely new document, leading to delays.
  2. Limited Accessibility: Students from Beauxbatons and Durmstrang needed to be physically present to review and sign contracts.
  3. Time-Intensive Process: The Goblet of Fire’s enchanted signing process, while impressive, wasn’t built for speed or collaboration.

Hogwarts adopted a modern e-signature platform: ONEFLOW, to streamline the process of creating, managing, and signing tournament contracts. While we didn’t integrate APIs or build custom features, the ready-to-use solution provided all the tools needed to simplify contract management.

Here’s how it worked:

1. Creating the Contract

Using the platform, Hogwarts staff easily crafted a professional, clear, and detailed contract. The solution’s user-friendly interface allowed them to include all necessary clauses and conditions while ensuring the document remained easy to understand.

2. Sharing with Students

The platform made it simple to share the contract with students digitally. No more waiting in line at the Goblet of Fire—students could access the contract on their enchanted devices from anywhere, be it a Hogwarts dormitory or a carriage at Beauxbatons.

3. E-Signing the Agreement

Once the students reviewed the document, they could sign it seamlessly with a digital signature. The e-signature solution ensured the signatures were secure, authenticated, and just as magically binding as the Goblet of Fire’s original enchantments.

4. Automated Document Management

The platform’s features helped Hogwarts staff keep track of signed agreements, send reminders, and store all documents in an organized, secure manner.

Client Side (Magic) Salsa

Badget: Client Side Salsa

Here in the Golden Snitches we love PCFs! We have one of them more centered on the frontend side, consisting on a flying golden snitch, of course, and another one heavier on the backend and operations side which loads a map and a route to the student’s next class!

Here can be both seen in action inside a Canvas App:

And here we have one of the elements written in React to see some code in action:

We have also made our code public here.

Happy catching!

To client or… to server?

The hard choice we all face at least once a day. Any frontend dev will tell you.. wait they’ll just not tell you, they’ll just do a array.filter().filter().filter().map().map().reverse(). And like any backend dev will tell you.. ‘Why do they even need that?’.

The problem with sorting lists and transforming objects on the client is that your client has to do the work themselves. It is their computer that has to compute all your lousy n^5 algorithms. This might not be a problem on your dev server running 64 gigs of RAM, a brand new RTX 4090 and your 18 CPU-cores. But anyone with a parent that holds upwards of 50 tabs open at a time knows computers run slow. Even relatively new ones. Moving code execution to the server you could provision your own machines to do all that work your data model forced you to do. It’s not even your fault, it’s the product people. Why don’t they just know what the solution will be a couple years later? Pff..

We use Electron as a Javascript framework to create good-looking user interfaces. It runs as a desktopp app, which is exactly what we need. We don’t want an open browser in our MagicMirror. Since our solution lives 100% server-side, in the sense that it won’t run on a customers device, we still need to make use of the Client-Server architecture. We need to keep our asynchronous logic seperated from the frontend due to the architecture imposed on us by choosing to work with something open-source. Now, to stream videos, make API calls and the likes, we need to do this… vanilla! (yeah I’m talking vanilla javascript man it ain’t easy). So how can we make it easier for our selves? Well, we can leverage the websocket-connection between the somewhat-empty functionality of the DOM and the more powerful server side that can use node modules. Because our frontend and backend are sat up with a web socket we can transmit events with payloads in order to do compute and return the computed.

Our frontend can send events to our backend:

Our backend receives this message:

And do the necessary compute and return a new event:

Which our client can pick back up and do logic based off of:

Notice the updateDom function, which runs our conditional getDom function that in effect updates the document.

Hipster

Power Automate is a trendy and relevant technology in the business world, especially for organizations aiming to streamline workflows and automate repetitive tasks. While it might not have the “hip” factor of cutting-edge AI like generative models or the latest blockchain developments, it holds a solid position as a practical, widely-used tool.

Microsoft Entra ID Security Groups
To simplify the governance of our users we have created teams of type Microsoft Entra ID security groups. We created a security group in Entra ID where we add the users we want to give access to the environment.

We then created a team of type Microsoft Entra ID Security Group in Power Platform where we assigned the Entra Group to the team. We then assigned the team the desired security roles:

We now only have to add users to the Group in Entra ID to give access to the environment. apps, automation and assign the users security roles.

Power automate – Force Sync users from Entra ID Groups
Now that we have automated and gotten more control of the governance of the users, we need to force sync the users.

The users will not appear in Dataverse unless they have logged into the environment. But building a power automate flow we can solve this issue:

The flow will be triggered once a day and then it will get the members of the Entra ID group. The flow then uses the force sync action to sync the users.

Governing the need relationship between data when users are added to the Entra ID Group

Need:
We needed to establish a connection between the logged-in user and the contact table. This way, we could retrieve the logged-in user’s Golden Snitch level and use it in the PCF, as well as access house names and house points for the app.

Solution:
We created a Power automate Flow that would get triggered when a user is added to the Entra ID group.


The flow then gets the user id in Entra ID:

We then list users and contacts with the matching email from Entra ID:

Then the flow uses the get row action to get the system user from the list row action. And a get row action to get the contact from the list row action:

The flow then updates the contact record and the lookup to the system user:


Results of adding the user to a Entra ID group:

Oneflow Sponsor Badge

🪄 From Parchment Chaos to Magical Efficiency

Gone are the days when owls cluttered the Great Hall delivering admission contracts! We’ve enchanted the whole process using Power Automate (think modern-day Charm work) and OneFlow (a spell so powerful, even Hermione would approve).

Our magical workflow:
• Auto-dispatches contracts faster than a Nimbus 2000
• Tracks signatures with the precision of the Marauder’s Map
• Sends confirmation owls (emails) that would make Hedwig proud

Now Muggle parents can sign from their “mobile devices” (fascinating contraptions), while Professor McGonagall tracks everything from her enchanted dashboard. The whole system runs smoother than a well-brewed Felix Felicis!

P.S. – The Weasley twins tried to hack it. They failed. That’s how secure it is! 🔒

The Digital Scroll Interface – Where Muggle Tech Meets Magic

Dash It Out – Crafting Enchanting Dashboards

🏅 Dash It Out Badge – Crafting Enchanting Dashboards 📊✨

Welcome to the magical world of data visualization! We’ve summoned the powers of data and design to create a visually stunning dashboard integrated seamlessly into our Model-Driven App and Power Pages. This dashboard is not just a feast for the eyes but also a vital tool for tracking the Dark Ledger’s performance metrics and ensuring operational excellence.


Dashboard Highlights ✨📈

Our dashboard is designed to provide business value while capturing the mystical essence of the Dark Ledger. Here’s how we’ve structured it:

1. Leaderboard – The Hall of Infamy 🥇

  • A dynamic ranked list showcasing the top villains based on completed orders.
  • Metrics:
    • Villain Name 🧙‍♂️
    • Number of Completed Orders ✔️
    • Success Rate (%) 📈
  • Purpose: Encourages competition among villains while highlighting high performers.

2. Success Rate – The Measure of Mastery 📊

  • A sleek gauge graph visualizing the average success rate across all villains.
  • Business Value: Offers insight into operational efficiency and highlights areas for improvement.

3. Order Distribution – Workload Balance 🥧

  • An interactive pie chart showing the proportion of orders assigned to each villain.
  • Purpose: Ensures fair workload distribution and identifies underutilized or overburdened villains.

4. Highest Paid Villain – Who’s Earning the Most Gold? 🤑

  • A compelling bar chart that highlights the top-earning villain based on revenue from completed orders.
  • Metrics:
    • Villain Name
    • Revenue Generated
  • Business Value: Identifies revenue drivers and fosters friendly rivalry among villains.

DAX Magic 🪄📋

Behind the scenes, we’ve worked our DAX wizardry to create calculated measures that drive these insights. From aggregating revenue to calculating success rates and ranks, our formulas ensure that every metric is accurate and meaningful.


Why It’s Magical 🌟

  • Integrated Design: The dashboard is seamlessly embedded within both our Model-Driven App and Power Pages, making it accessible to all Dark Ledger users.
  • Actionable Insights: These visuals empower administrators to make informed decisions, optimize performance, and celebrate top performers.
  • User-Friendly: With intuitive graphs and clear KPIs, even the darkest wizards can navigate the dashboard with ease.

The Magic of Collaboration

We’ve all experienced the magic of collaboration through Teams, and it is time that Hogwarts’ professors and students gets on the wagon.

When a professor logs in to our model driven app for student management, he will easily see which students have enrolled to his subjects. Instead of doing the time consuming job of manually creating a team in Teams and adding all enrolled student as team members, he clicks one button:

Create team? Check ✅

This triggers a cloud flow connected to Teams:

And in a few seconds, we are plugged and ready to play in Teams:

Team is created with a greeting from prof.Dumbledore himself. 🧙🏻‍♂️

Giving businesses a (Power) platform

Since many of the business owners of Diagon Alley spend most of the days on their feet in the store, they require a working solution that is easy to use and accessible wherever they might be. Because of this, we have decided to give them different possible solution within the Power Platform. Power Page for customer interaction, Power Automate to help reducing time demanding tasks and a data driven Power App that fit perfectly on a small Teams application on a store-owners cellphone.

Automating the office work

The daily-to-day operations of any business is to make sure there always is enough of their products, and making sure they always are stocked. To help the owners keep the supplies under control, we developed an Power Automate flow that would help them generate an Supplier Agreement contract in SharePoint.

The initial thought was to create a content type on a document library that would inherit metadata properties from the SharePoint columns and automatically fill inn the SharePoint property fields and thereby create a valid contract.

Unfortunately, this require that we edit the template locally, but we are working on computers with a safety policy that doesn’t allow us to connect to this fields when they are in another tenant. Still, we found a solution by downloading an empty document from the library, populate the fields quick parts connected to the document properties and re-upload this to the library. This allowed us to generate the agreement anyway, by using a Power Automate flow that populated the documents quick part fields.

Oh my search!

I remember learning about Elasticsearch for the first time. I still don’t know it.

But I do know how to make a algorithm. And I do know how to use OpenAI. I’ve made embeddings before, but never did I think to try and find an animal based on your own photo.

In our MagicMirror you can send your son or daughter when they start Hogwarts. Not sure which school animal they want to keep? No problem! We’ve got you covered. Evaluating you we can find the animal that will suit you best. But if you’re not happy, no worries! Our algorithm isn’t 100% deterministic, so let it do a second rating and see if you get the same or again or if you indeed should have been with another animal.

This is the part of our solution I am talking about right now. It is the part where you step into the mirror, some code is ran – and voilà – you have found your companion for the coming years.

What a way to search huh? Using your own image?

Where do we find the animals to pair you with?

Naturally, our solution can’t know of real(magical)-life animals. It can only know what we tell it exists. Therefore we have integrated with a database from https://harrypotter.fandom.com. It finds the animals, and we pair that data up with animal-illustrations coming from a wide range of websites (gifs). This way you can even see your own little one moving around the screen there with you.