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.

Snowflake CoWork: Building Your First AI Business Agent Prototype

Infographic of Snowflake CoWork: two people with laptops around a central circle showing the Snowflake logo and 'CoWork', with icons for Edit, Chat, and Share above it.

Artificial Intelligence advancements are moving very fast for analytics builders and information consumers. Traditionally, business users depended on analysts and data teams to answer questions buried within complex databases. With Snowflake CoWork, organizations have a new path to create AI-powered agents that understand natural language and provide answers directly from enterprise data. Layering LLMs on top of data directly presents a host of challenges that Snowflake has approached throughtfully.

In this article, I’ll walk through my experience creating my first Snowflake CoWork agent using Snowflake CoWork and demonstrate how quickly you can build an AI assistant on top of your Snowflake data.

What is Snowflake CoWork?

Snowflake CoWork is an AI workspace that allows users to:

  • Chat with enterprise data using natural language
  • Connect structured and unstructured data sources
  • Build specialized AI agents
  • Generate insights without writing SQL
  • Enable business users to self-serve analytics

Instead of asking a data analyst:

“Can you tell me why sales increased in July?”

You can simply ask your AI agent directly.

Why Snowflake CoWork Matters

Many organizations struggle with:

  • Data scattered across multiple systems
  • Long wait times for analytics requests
  • Non-technical users unable to query data
  • Knowledge trapped inside reports and dashboards

Snowflake CoWork bridges this gap by allowing AI agents to understand business context and retrieve answers from trusted enterprise data sources.

Setting Up the Environment

To get started, I followed Snowflake’s official Snowflake Intelligence quickstart guide.

The setup script automatically creates:

  • Database and schemas
  • Sample sales data
  • Marketing campaign data
  • Product catalog information
  • Social media metrics
  • Semantic models for business understanding

The result is a fully functional AI-ready environment.

Creating My First Agent

After completing the setup, I created a simple agent named Sales_AI. This agent was connected to a semantic model called:

SALES_AND_MARKETING_DATA

This semantic model allows the AI agent understand business concepts such as:

  • Products
  • Revenue
  • Units Sold
  • Marketing Campaigns
  • Social Media Activity

This blended data pulls data from different sources with different grains. This is where data stewardship, subject matter expertise matter the most.

Instead of thinking in tables and columns, the agent understands business terminology. In this specific case, I had known data, a clear data dictionary, and established semantics from years of building similar reports. We have learned that AI produced semantics can be generic.

The Snowflake CoWork Interface

Here’s the agent running inside Snowflake CoWork:

In my environment, I created the Sales_AI agent and started interacting with it using natural language questions. The interface provides:

  • Chat-based interaction
  • Agent details panel
  • Connected data objects
  • Context review
  • Retrieval transparency

One feature I particularly liked is that Snowflake shows what context the agent reviewed before generating an answer. This execution plan provides guidance and explainaiblity and signals for improvement. I am working on processes that help me automate this process.

Asking Business Questions

Once the agent was created, I started asking business questions.

Example:

Why did sales of Fitness Wear grow so much in July?

The agent automatically:

  1. Interprets the question
  2. Identifies relevant datasets
  3. Generates the required SQL
  4. Retrieves the data
  5. Produces a business-friendly explanation

This removes new analysts to figure out where and how to answer basic questions. For self service, getting these agents to production requires a much deeper level of validation, refinement team readiness.

Understanding Agent Context

During testing, I asked:

What issues are reported with jackets recently in customer support tickets?

The response revealed something important. The agent correctly explained that its current semantic model only included:

  • Marketing campaign metrics
  • Product catalog
  • Sales transactions
  • Social media activity

It did not have access to customer support ticket data. This demonstrates a key strength of Snowflake CoWork. The AI experience will not simply hallucinate answers. Instead, it understands its available data sources and explains its limitations when the requested information is unavailable.

Structured Data vs Unstructured Data

Snowflake CoWork becomes even more powerful when combining:

Structured Data

Examples:

  • Salesforce opportunities
  • Revenue
  • Campaign performance
  • Product sales

Unstructured Data

Examples:

  • Support tickets
  • Emails
  • Meeting transcripts
  • Knowledge base articles
  • Customer feedback

By combining both, an organization can ask questions such as:

Why are sales declining for Product A?

The AI can correlate:

  • Revenue trends
  • Marketing performance
  • Customer complaints
  • Support tickets
  • Social media sentiment

All within a single conversation.

Real-World Use Cases

Sales Analytics

Ask:

Which region generated the highest revenue last quarter and how are we pacing this quarter?

Marketing Performance

Ask:

Which campaign produced the best lead to revenue conversion rate?

Customer Support

Ask:

What are the most common complaints this month?

Key Takeaways

After building my first Snowflake CoWork agent, here are my biggest observations:

Extremely Fast Setup

The quickstart guide gets you running within minutes.

Business-Friendly Experience

Users interact through conversation rather than SQL.

Transparency

The platform clearly shows what data sources were used.

Strong Foundation for Enterprise AI

By combining semantic models, Cortex Analyst, Cortex Search, and Snowflake Intelligence, organizations can create powerful AI assistants on top of governed enterprise data.

Final Thoughts

Rather than navigating dashboards, reports, and database schemas, users can simply ask questions and receive answers grounded in enterprise data. Deploying agents has already reduced dashboard requests.

My first experience building the Sales_AI agent showed how quickly we can assemble raw data to AI-powered business insights.

As Snowflake continues investing in semantic models management, Cortex Analyst, Cortex Search, and Intelligence Agents, the future of enterprise analytics is becoming increasingly conversational and approachable for non-BI / analytics professionals to build.

If you’re already using Snowflake, I highly recommend spending an hour with the Snowflake Intelligence quickstart. It’s one of the fastest ways to understand where AI-powered analytics is heading. For more learning how to move from testing to production, check out some of the real-world production learnings deploying Snowflake Agents.

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.