[{"data":1,"prerenderedAt":731},["ShallowReactive",2],{"page":3,"breadcrumb-title:/blogs/ai-assistant-erp-case-study/":5},{"id":4,"title":5,"body":6,"description":711,"extension":712,"meta":713,"navigation":718,"ogImage":719,"path":720,"publish_at":721,"relate_key":722,"seo":728,"show_on":719,"stem":729,"__hash__":730},"blogs/blogs/50.ai-assistant-erp-case-study.md","\"What's Our Stock Level?\" Putting an AI Assistant Inside an ERP",{"type":7,"value":8,"toc":697},"minimark",[9,14,18,97,101,104,138,142,145,151,157,164,167,171,174,238,241,245,248,368,371,374,378,381,386,407,412,494,497,501,504,524,527,530,536,546,550,600,604,607,639,643,675],[10,11,13],"h2",{"id":12},"at-a-glance","At a glance",[15,16,17],"p",{},"Everyone in the business had questions the ERP could answer, but only a few people knew how to get the answers out of it. We added an AI assistant to the ERP so that anyone can ask about stock, sales, purchasing or customers in plain English and get an answer from live data in seconds. Each answer shows where its numbers came from, respects that person's access, and can turn into an action, such as a draft purchase order, when it needs one.",[19,20,21,32],"table",{},[22,23,24],"thead",{},[25,26,27,30],"tr",{},[28,29],"th",{},[28,31],{},[33,34,35,47,57,67,77,87],"tbody",{},[25,36,37,44],{},[38,39,40],"td",{},[41,42,43],"strong",{},"Client",[38,45,46],{},"A wholesale distributor with two warehouses, a sales team on the road and a trade counter",[25,48,49,54],{},[38,50,51],{},[41,52,53],{},"Platform",[38,55,56],{},"A custom ERP covering inventory, sales orders, purchasing and customers, with accounts in Xero",[25,58,59,64],{},[38,60,61],{},[41,62,63],{},"Starting point",[38,65,66],{},"Answers depended on a few people who knew which report to run, plus spreadsheets exported every Monday",[25,68,69,74],{},[38,70,71],{},[41,72,73],{},"Goal",[38,75,76],{},"Anyone can get a trustworthy answer from live data, within the limits of their role",[25,78,79,84],{},[38,80,81],{},[41,82,83],{},"Approach",[38,85,86],{},"An AI assistant using approved business measures, a read-only copy of the data, and role-based access on every question",[25,88,89,94],{},[38,90,91],{},[41,92,93],{},"Delivery",[38,95,96],{},"Discovery, a read-only pilot with the operations team, then rollout by role and a small set of actions",[10,98,100],{"id":99},"the-challenge","The challenge",[15,102,103],{},"The ERP held everything the business needed to know. Getting it out was the problem.",[105,106,107,114,120,126,132],"ul",{},[108,109,110,113],"li",{},[41,111,112],{},"Reports for every question, and none for the next one."," Over the years the ERP had collected dozens of reports. Each answered one question well. Anything slightly different meant an export to Excel and an afternoon of filtering.",[108,115,116,119],{},[41,117,118],{},"A few people as the bottleneck."," The operations manager and one person in finance knew which report to run and how to read it. Everyone else asked them, by phone, email or a tap on the shoulder.",[108,121,122,125],{},[41,123,124],{},"Sales reps working blind."," Reps on the road would ring the warehouse to ask whether a product was in stock before promising a customer a delivery date.",[108,127,128,131],{},[41,129,130],{},"Different numbers for the same question."," \"Sales last month\" meant one thing in finance (invoiced, excluding GST), another to the sales team (orders taken) and a third in the Monday spreadsheet. Meetings started with arguments about whose figure was right.",[108,133,134,137],{},[41,135,136],{},"Hard requirements:"," answers must come from the real data and say so, staff must only see what their role allows (margins and costs especially), and nothing in the ERP can change without a person approving it.",[10,139,141],{"id":140},"our-approach","Our approach",[15,143,144],{},"Two decisions shaped everything else.",[15,146,147,150],{},[41,148,149],{},"First, agree what the numbers mean before letting AI near them."," We worked with finance and operations to define the business's measures once: available stock, committed stock, sales (invoiced, excluding GST), gross margin, days of cover, overdue purchase orders and so on. Each measure became a tested query. The assistant answers with those measures. It doesn't invent its own way of calculating them.",[15,152,153,156],{},[41,154,155],{},"Second, answer from a read-only copy, as the person asking."," Questions run against a read-only reporting copy of the ERP database, refreshed every few minutes, through the same role permissions the ERP already uses. The assistant can't write to the database, and a warehouse supervisor asking about margins gets the same answer the ERP would give them: that's not something their role can see.",[15,158,159],{},[160,161],"img",{"alt":162,"src":163},"How the ERP assistant answers a question: a staff member asks in plain English, the AI picks an approved business measure, the query runs on a read-only copy of the ERP with that person's permissions, and the answer comes back with its source and time","/images/blogs/ai-erp-assistant-how-it-works.svg",[15,165,166],{},"The AI's job is the language: understanding what someone is asking, picking the right measures and filters, and explaining the result clearly. The numbers come from the ERP. The rules about who can see what come from the ERP. Every question, query and answer is logged.",[10,168,170],{"id":169},"phase-1-discovery-and-the-business-glossary","Phase 1: Discovery and the business glossary",[15,172,173],{},"We spent the first two weeks collecting the questions people actually asked. We went through the operations manager's inbox, sat with the trade counter, rode along with a sales rep, and asked every team for the last ten questions they'd needed answered. Most of them fell into a few groups:",[19,175,176,186],{},[22,177,178],{},[25,179,180,183],{},[28,181,182],{},"Area",[28,184,185],{},"Typical questions",[33,187,188,198,208,218,228],{},[25,189,190,195],{},[38,191,192],{},[41,193,194],{},"Stock",[38,196,197],{},"How many do we have? Which warehouse? What's already committed to orders? When's the next delivery in?",[25,199,200,205],{},[38,201,202],{},[41,203,204],{},"Sales",[38,206,207],{},"How did last month compare to the same month last year? Who are the top customers for this range? What's this customer stopped buying?",[25,209,210,215],{},[38,211,212],{},[41,213,214],{},"Purchasing",[38,216,217],{},"What's running low? Which purchase orders are overdue? How reliable is this supplier on lead times?",[25,219,220,225],{},[38,221,222],{},[41,223,224],{},"Customers",[38,226,227],{},"What's this customer's account balance? When did they last order? What's their usual order?",[25,229,230,235],{},[38,231,232],{},[41,233,234],{},"Margin",[38,236,237],{},"Which products are we selling below target margin? How has margin moved since the price rise? (Finance and management only.)",[15,239,240],{},"From those questions we built the business glossary: each measure, its exact definition, which data it uses, and which roles can see it. That glossary turned out to be valuable well beyond the assistant. For the first time, finance and sales agreed in writing what \"sales last month\" means.",[10,242,244],{"id":243},"phase-2-turning-the-glossary-into-tools","Phase 2: Turning the glossary into tools",[15,246,247],{},"Each group of questions became a small set of tools. Each tool runs a tested query for an approved measure, with filters the AI fills in from the question, such as product, warehouse, customer, supplier or date range.",[19,249,250,263],{},[22,251,252],{},[25,253,254,257,260],{},[28,255,256],{},"Tool",[28,258,259],{},"What it answers",[28,261,262],{},"Who can use it",[33,264,265,279,292,305,318,330,343,355],{},[25,266,267,273,276],{},[38,268,269],{},[270,271,272],"code",{},"stock_position",[38,274,275],{},"On hand, committed and available stock by product and warehouse, with the next inbound delivery",[38,277,278],{},"Everyone",[25,280,281,286,289],{},[38,282,283],{},[270,284,285],{},"sales_summary",[38,287,288],{},"Invoiced sales by period, product, range, rep or customer, compared to a prior period",[38,290,291],{},"Sales, management, finance",[25,293,294,299,302],{},[38,295,296],{},[270,297,298],{},"customer_overview",[38,300,301],{},"Balance, last order, usual products, and anything they've stopped buying",[38,303,304],{},"Sales, finance",[25,306,307,312,315],{},[38,308,309],{},[270,310,311],{},"reorder_check",[38,313,314],{},"Products below reorder point, days of cover, open purchase orders",[38,316,317],{},"Purchasing, operations",[25,319,320,325,328],{},[38,321,322],{},[270,323,324],{},"supplier_performance",[38,326,327],{},"Average and recent lead times, late and part deliveries",[38,329,317],{},[25,331,332,337,340],{},[38,333,334],{},[270,335,336],{},"margin_analysis",[38,338,339],{},"Gross margin by product, range or customer, against target",[38,341,342],{},"Finance, management",[25,344,345,350,353],{},[38,346,347],{},[270,348,349],{},"search_procedures",[38,351,352],{},"Answers from the business's own procedures, such as returns and credit holds",[38,354,278],{},[25,356,357,362,365],{},[38,358,359],{},[270,360,361],{},"draft_purchase_order",[38,363,364],{},"Creates a draft purchase order for a person to review in the ERP",[38,366,367],{},"Purchasing, after confirmation",[15,369,370],{},"We deliberately didn't let the AI write free-form database queries against the ERP. Approved measures are slower to add than letting the model improvise, but every answer can be traced to a definition finance has signed off, and the same question gets the same number every time.",[15,372,373],{},"When someone asks something the tools can't answer, the assistant says so plainly and logs the question. That log became the to-do list for new measures.",[10,375,377],{"id":376},"phase-3-read-only-pilot-with-operations","Phase 3: Read-only pilot with operations",[15,379,380],{},"The pilot went to the operations and purchasing team first. They knew the data best, so they'd spot a wrong answer quickly, and they were the people being interrupted most.",[15,382,383],{},[41,384,385],{},"Example: a stock question",[387,388,389,395,401],"blockquote",{},[15,390,391,394],{},[41,392,393],{},"Sales rep:"," Have we got the 20 L degreaser in stock? Customer wants 40 by Thursday.",[15,396,397,400],{},[41,398,399],{},"Assistant:"," Yes. There are 64 available across both warehouses: 52 at Wingfield and 12 at Lonsdale (on hand 71, with 7 committed to open orders). Wingfield can cover all 40 for a Thursday delivery.",[15,402,403],{},[404,405,406],"em",{},"Stock as at 10:42 am. Source: stock position, all warehouses.",[15,408,409],{},[41,410,411],{},"Example: a question that needs more than one measure",[387,413,414,420,425,486,489],{},[15,415,416,419],{},[41,417,418],{},"Operations manager:"," What's likely to run out before the end of the month?",[15,421,422,424],{},[41,423,399],{}," Six products are forecast to run out before 30 November at the current sales rate. The three most urgent:",[19,426,427,443],{},[22,428,429],{},[25,430,431,434,437,440],{},[28,432,433],{},"Product",[28,435,436],{},"Available",[28,438,439],{},"Days of cover",[28,441,442],{},"Next delivery",[33,444,445,459,473],{},[25,446,447,450,453,456],{},[38,448,449],{},"Nitrile gloves L (box 100)",[38,451,452],{},"38",[38,454,455],{},"4",[38,457,458],{},"None ordered",[25,460,461,464,467,470],{},[38,462,463],{},"Paper towel roll, 6 pack",[38,465,466],{},"112",[38,468,469],{},"7",[38,471,472],{},"PO 5521, due 2 Dec",[25,474,475,478,481,484],{},[38,476,477],{},"20 L floor cleaner",[38,479,480],{},"21",[38,482,483],{},"9",[38,485,458],{},[15,487,488],{},"Three of the six have no purchase order in progress. Would you like me to check supplier lead times for those three?",[15,490,491],{},[404,492,493],{},"Based on the last 8 weeks of invoiced sales. Stock as at 10:45 am.",[15,495,496],{},"Each answer shows the time the data is from and which measures it used, so anyone can check it in the ERP. During the pilot we kept a test set of real questions with answers checked by hand, re-ran it after every change, and reviewed the question log daily for anything the assistant got wrong or couldn't answer.",[10,498,500],{"id":499},"phase-4-rolling-out-by-role-then-adding-actions","Phase 4: Rolling out by role, then adding actions",[15,502,503],{},"Once operations trusted it, the assistant went to the other teams one at a time, each with its own tools and permissions.",[105,505,506,512,518],{},[108,507,508,511],{},[41,509,510],{},"Sales reps"," got stock, customer overviews and sales history on their phones, so they stopped ringing the warehouse before promising a delivery date.",[108,513,514,517],{},[41,515,516],{},"The trade counter"," got stock and procedures, so staff could answer customers on the spot.",[108,519,520,523],{},[41,521,522],{},"Finance and management"," got margin analysis and period comparisons. Questions that used to mean a spreadsheet became a sentence.",[15,525,526],{},"The access rules carried through automatically. When a sales rep asked about margin, the assistant replied that margin isn't available for their role, because the ERP said so, not because the AI decided it.",[15,528,529],{},"Only then did we add actions, starting with the one purchasing asked for most.",[15,531,532],{},[160,533],{"alt":534,"src":535},"Example conversation in the ERP: a purchasing officer asks what needs reordering from a supplier, the assistant shows a table with stock and suggested quantities, and offers to create a draft purchase order that the officer reviews before anything is sent","/images/blogs/ai-erp-assistant-conversation.svg",[15,537,538,541,542,545],{},[404,539,540],{},"An illustration with sample data."," The assistant suggests quantities from sales rate, lead time and minimum order quantities, and creates a ",[41,543,544],{},"draft"," purchase order only after the purchasing officer clicks Create. The draft opens in the ERP's normal purchase order screen, where it's reviewed, edited and approved exactly as before. The assistant never sends anything to a supplier.",[10,547,549],{"id":548},"safeguards","Safeguards",[105,551,552,558,564,570,576,582,588,594],{},[108,553,554,557],{},[41,555,556],{},"Approved measures, not improvised maths."," Every number comes from a definition the business signed off.",[108,559,560,563],{},[41,561,562],{},"Read-only by default."," Questions run against a read-only copy. The only write action creates a draft, after a click.",[108,565,566,569],{},[41,567,568],{},"The ERP decides access."," Role permissions are applied to every query, so the assistant can't widen anyone's view of costs, margins or customer data.",[108,571,572,575],{},[41,573,574],{},"Every answer shows its source and time."," Anyone can check a figure in the ERP, and stale data is obvious.",[108,577,578,581],{},[41,579,580],{},"\"I don't know\" is an acceptable answer."," If no measure fits the question, the assistant says so instead of guessing, and the question is logged for review.",[108,583,584,587],{},[41,585,586],{},"Content treated as data."," Text in product descriptions, notes or documents is read, never obeyed.",[108,589,590,593],{},[41,591,592],{},"Data handling agreed up front."," We agree which data the assistant uses and where it's processed, using business-grade AI services that don't train on the business's data.",[108,595,596,599],{},[41,597,598],{},"Full audit trail and a test set."," Every question, query and answer is logged, and the test set runs before every release.",[10,601,603],{"id":602},"what-we-measure","What we measure",[15,605,606],{},"As with every assistant we build, we agree the measures before the pilot and report from the logs:",[105,608,609,615,621,627,633],{},[108,610,611,614],{},[41,612,613],{},"Answered questions:"," the share answered from approved measures, without a \"can't answer\"",[108,616,617,620],{},[41,618,619],{},"Accuracy:"," results on the hand-checked test set, tracked across every release",[108,622,623,626],{},[41,624,625],{},"Unanswered questions:"," what people asked that no measure covers yet, which becomes the backlog",[108,628,629,632],{},[41,630,631],{},"Adoption by role:"," who's using it, for what, and which teams still rely on exports",[108,634,635,638],{},[41,636,637],{},"Actions:"," draft purchase orders created, and how often they're approved without major edits",[10,640,642],{"id":641},"lessons","Lessons",[105,644,645,651,657,663,669],{},[108,646,647,650],{},[41,648,649],{},"Define the numbers before the AI."," The glossary was the most valuable part of the project. An AI that answers fast from inconsistent definitions just spreads the arguments further.",[108,652,653,656],{},[41,654,655],{},"Approved measures beat clever queries."," Letting the model write its own queries is quicker to demo, but harder to trust. Tested measures give the same answer every time.",[108,658,659,662],{},[41,660,661],{},"Show the source and the time."," People trusted the answers once they could see where each number came from and how fresh it was.",[108,664,665,668],{},[41,666,667],{},"Start with the people who know the data."," Operations caught the edge cases in days, which made rollout to everyone else straightforward.",[108,670,671,674],{},[41,672,673],{},"Drafts, not decisions."," Letting the assistant prepare work for a person to approve gives most of the time saving with almost none of the risk.",[15,676,677,680,681,686,687,691,692,696],{},[41,678,679],{},"Thinking about this for your ERP?"," It works with custom ERPs and with off-the-shelf systems that have a database or API we can read from. See ",[682,683,685],"a",{"href":684},"/custom-erp-development/","custom ERP development"," and ",[682,688,690],{"href":689},"/ai-solutions/","AI solutions",", or read how we built a ",[682,693,695],{"href":694},"/blogs/ai-assistant-web-application-case-study/","customer-facing assistant that takes actions in a web application",".",{"title":698,"searchDepth":699,"depth":699,"links":700},"",2,[701,702,703,704,705,706,707,708,709,710],{"id":12,"depth":699,"text":13},{"id":99,"depth":699,"text":100},{"id":140,"depth":699,"text":141},{"id":169,"depth":699,"text":170},{"id":243,"depth":699,"text":244},{"id":376,"depth":699,"text":377},{"id":499,"depth":699,"text":500},{"id":548,"depth":699,"text":549},{"id":602,"depth":699,"text":603},{"id":641,"depth":699,"text":642},"Case study: how we built an AI assistant into a wholesale distributor's ERP so staff can ask about stock, sales, purchasing and customers in plain English, with answers from live business data.","md",{"slug":714,"image":715,"alt":716,"isHowTo":717},"ai-assistant-erp-case-study","/images/blogs/ai-erp-assistant-cover.png","An AI assistant inside an ERP answering a question about stock levels",false,true,null,"/blogs/ai-assistant-erp-case-study","2026-11-18T10:00:00.000Z",[723,724,725,726,727],"ai","ai-technology","custom-software","automation","erp",{"title":5,"description":711},"blogs/50.ai-assistant-erp-case-study","nllifz4MfnPqa6b09QqUGZkeyk567hccKsN4iD4ujSw",1795009907877]