Skip to main content

 About Waqar Khan

Waqar leads software engineering at DataTools Pro, overseeing the platform, integrations, and APIs. With over 12 years of consulting experience and 100+ projects completed prior to joining full-time in 2023, he specializes in Salesforce, Snowflake, workflow automation, pipelines, and API integrations, turning complex business and technical requirements into scalable solutions. He currently leads R&D across agentic automation, headless Salesforce, and specialized migration services.

Understanding Common AI BI Challenges that Slow Adoption

AI BI Challenges - Illustration of two profiles facing each other with a central data exchange, labeled Revenue in Business and Revenue in Data/System, symbolizing data flow.

We have 3 years of success and failure delivering LLMs on the back of 20+ years of delivering analytics. Our team is very bullish on AI because it’s grounded on years of success, but that comes with real AI BI Challenges. Understanding your organization’s dynamics are important to avoid them.

AI BI Challenges - Illustration of two profiles facing each other with a central data exchange, labeled Revenue in Business and Revenue in Data/System, symbolizing data flow.

Enterprise dynamics that can impact your AI BI success

Uniqueness

LLMs are trained on a corpus of knowledge that is wide reaching. For example, an LLM understands all facets of a general retail store operation. However, it does not understand your inventory and supply chain management, and customer buying patterns. These are nuanced problems that have required some form of AI. Your business is unique… Maybe it’s part of your secret sauce to success or maybe your uniqueness is holding you back. Like the team members that manage your business, AI requires direction from anything that breaks for “norms.”

Ambiguity

Ambiguity causes human confusion requiring “alignment.” We call bad output from an LLM a hallucination which ambiguity can easily trigger. In the workplace, tribal knowledge typically reduces ambiguity and fills in gaps. To be in the business of controlling the quality of AI / BI is removing ambiguity from data driven decisions. A process that is well defined documented and followed is easy to explain to people and a system. The “gray” area or human reasoned connections are both an incredible use case for using AI reasoning models but a very painful way to experience AI aided decision support. Data influenced decisions should be clear and consistent to be trust worthy.

Business Semantics Disconnect

Two team members show up to a meeting with 2 versions of revenue… This problem is painful, but often overblown to sell software and services. We understanding how decisions happen, semantics break down, and how to design systems that surface these disconnects early and often. All paths lead back to “governance” of some form, but we believe governing your semantics is just as important as the data itself!

Inconsistency

Consistency over time wins. This is especially true when your enterprise does not operate at high data volumes. A process that is well defined, documented, and followed is easy to explain to people and to a system. The gray areas and human-reasoned connections are both a powerful use case for AI reasoning and a painful way to experience AI-aided decision support. Data-influenced decisions need to be clear and consistent to be trustworthy.

Want to avoid AI BI challenges?

The businesses that win are not the ones with the most data or the most tokens burned on AI services . They are the ones who understand how to focus their teams on the right problems, AI BI concepts, and make consistent improvement to effectively use data for continuous improvement. DataTools Pro is here to help!

Build with React in Salesforce : Compensation Management DataTools Conversion

Hand holding a smartphone showing charts, with Salesforce cloud logo and React logo in the background, symbolizing mobile analytics and development.

This month, I took on a new feature released by Salesforce for multi-platform support. The support for React in Salesforce and now headless for AI apps is very exciting news. Now, our modern agentic workflows can connect and speed up deployment inside of Salesforce. I wanted to see how fast I could deploy our compensation management DataTools inside of Salesforce. Within a couple of days of experimentation, we have a fully custom React application directly inside Salesforce Lightning Experience, connected to live Salesforce data.

Here’s what I built, how it was built and how it will shape the value engineering work I do for clients using Salesforce.

New React dev for an existing app: Commission Management

Months ago, we built our own Commission Management DataTools that runs natively inside Salesforce. It was an internal R&D project that I built after building a client MVP. Commission management is actually a data and analytics first initiative that is wrongly scoped and built. Most companies build compensation in Excel. Many companies have solved this problem and Salesforce acquired one of them called Spiff. The level of effort to build these solutions requires deep domain expertise, and we have it in house.

Our commission management app includes:

  • Payout List View: A clean table showing payout records with status badges, amounts, and one-click navigation
  • Payout Detail View: A detailed breakdown of each payout, including calculations, attainment, team metrics, and final payout amount
  • Payout Entry Form: A smart two-step form that loads the correct fields based on the selected compensation plan, then creates the record directly in Salesforce
  • Commission Reporting: Simple Salesforce reporting and dashboards for sales and finance

Rebuild in React

The question was could we vibe code the same solution in React and run it inside of Salesforce? After a short learning curve, the answer is yes!

Payout List page:

Payout Management dashboard for User User - Enterprise_PM_Comp showing overview and calculations sections.

The Technology Behind React in Salesforce: Salesforce UIBundle

This project was made possible by Salesforce UIBundle, a relatively new and still evolving feature that allows you to deploy a React app as a Salesforce metadata component. Instead of hosting the app on an external server, it lives inside the Salesforce org and is served directly through Salesforce Lightning Web Runtime.

The app was built with:

  • React and TypeScript
  • Vite for front-end builds
  • Tailwind CSS for styling
  • Salesforce @salesforce/sdk-data for working with live Salesforce data

The Data Layer: GraphQL for Reads, Apex REST for Writes

One of the most interesting parts of this project was designing the data layer for a React UIBundle app inside Salesforce.

For reading data, we used Salesforce’s UI API GraphQL endpoint, the same technology that powers much of Lightning Experience. That gave us a clean and efficient way to query payout records and related values.

For writing data, we discovered that the GraphQL mutation route had limitations when working with custom object fields. To solve that, we used authenticated calls to a lightweight Apex REST API. The Apex controller accepts writable fields dynamically, handles type coercion, and avoids hardcoded field mappings.

That combination turned out to be the most reliable and maintainable approach:

  • GraphQL for reads
  • Apex REST for writes

GraphQL query code example

graphql
query GetPayouts {
  uiapi {
    query {
      Sales_Payout__c(first: 50) {
        edges {
          node {
            Id
            Status__c { value }
            Final_Payout_Calc__c { value }
          }
        }
      }
    }
  }
}

A Plan-Driven Entry Form – Meta Data powered Apps

Our compensation payout entry forms are now fully meta-data plan-driven. This approach puts the power in business leader’s hands where changes can occur monthly.

Each compensation plan, such as Senior Sales Director, has its own data entry configuration stored in a custom Salesforce object called Payout_Plan_Field_Config__c.

When the user selects a plan and clicks Next, the app retrieves that configuration in real time and renders only the relevant fields for that plan. There is no hardcoding and no need to rebuild the app when plan requirements change.

The only remaining step for Salesforce admins is adding or remove fields for a plan directly in Salesforce, and the form updates automatically.

Payout_Plan_Field_Config__c records in Salesforce:

The Full Salesforce Metadata Stack

Behind the React UI, we still get to work with a strong Salesforce foundation. As an example, our commisison app still has:

  • Custom Object: with fields for payout data, calculations, and status tracking
  • Custom Object: for plan-driven field definitions
  • Custom Metadata Types: metadata records for plan and tier configuration
  • Apex Classes for calculations, entry handling, plan administration, and reporting support
  • Apex Trigger: to run automatic calculations on save
  • Lightning App: with dedicated tabs
  • Flex Pages and Layouts for native Lightning integration
  • Lightning Web Components Now we can design the best solution for the job to re-evaluate our lighting web components and pages for for payout, statements, and analytics.
  • Permission Set for secure field-level access across custom objects

Everything was built using Salesforce DX, managed in Git, and deployed using a scratch org workflow.

Why This Matters for Salesforce Teams

This project proves an important point: you do not need to leave Salesforce to deliver a modern, highly customised application experience.

For organisations that need:

  • A custom applications built directly on top of the Salesforce relational model.
  • A React-based UI with a modern user experience inside Lightning Experience
  • Full control over their data without external SaaS tools, sync issues, or extra licenses
  • A configurable system that admins can manage themselves
  • Agentic workflows tools, and automation is adaptable to Salesforce.

We can’t wait to see how this evolves and materializes with Salesforce own native builder / vibe coding capabilities vs Cursor and Claude code solutions I use today.

  • Commission tracking
  • Team and AI agent onboarding workflows
  • Custom approval interfaces
  • Advanced analytics exploration tools (not to be confused with dashboards / BI)
  • Client-facing internal tools
  • Salesforce-native operational apps

Want Something like this in Your Salesforce Org?

If you are using Salesforce and have been told, “That is not possible in Lightning,” or “You need a third-party tool for that,” it may be time for a different conversation.

At DataTools Pro, we specialise in building advanced Salesforce solutions that stay maintainable, secure, and fully aligned with your existing Salesforce investment.