Cloodot

ERPNext

Let your AI agent answer customers about invoices, orders, deliveries, quotations and stock from ERPNext, and file opportunities and draft quotations from your procedures.

The ERPNext skill set connects your AI agent to your ERPNext site. Customers can ask what they owe, where their order is, whether a quote is still valid or whether something is in stock, and get the answer from your live books. Your procedures can also turn a qualified chat into a sales opportunity or a draft quotation for your team.

It works with ERPNext v13, v14, v15 and v16, on Frappe Cloud or self-hosted.

What it does

Answers customers

The agent can use these on any turn, whenever a customer asks.

SkillWhat the customer gets
Check InvoicesTheir outstanding balance and how many invoices are overdue, then their latest invoices: total, amount still due and due date. They can ask about one invoice by number, or only what's unpaid.
Check Order StatusTheir open sales orders: status, how much has been delivered, the expected delivery date, and each shipment with its carrier and tracking number. Works with your order number or the customer's own PO number.
Check QuotationQuotations you've sent them: status, total and how long it's valid. Includes quotations sent to them while they were still a lead.
Check StockWhether a product they name is in stock (on hand, less what's reserved for other orders) and its list price. If they ask for a quantity, whether you can supply that many.
Raise Support TicketOpens a ticket (an ERPNext Issue) for a problem the agent can't fix in chat, such as a damaged delivery or a billing dispute, and gives them the ticket number.

Runs only inside your procedures

These two add to your sales pipeline, so the agent can't call them on its own. They run only at the step of a procedure where you place them. See Use the procedure-only skills.

SkillWhat it files
Create OpportunityA sales Opportunity, on the customer's account if they have one, or on a Lead it creates for them. What they told the agent goes on the opportunity's timeline.
Draft QuotationA draft Quotation for the products and quantities the customer confirmed, priced from your selling price list. It is never submitted or sent. Your team reviews it, adds taxes and terms, and sends it.

Who can see what

Invoices, orders and quotations are private, so the agent only shows them to the customer the channel proves:

  • On WhatsApp and SMS: the number the customer is messaging from.
  • On email: the address the email came from.

That number or address has to be on the customer's record in ERPNext: on one of their Contacts, or on the Customer (or Lead) itself. Numbers are matched however they were typed, so +1 503-555-0142 and (503) 555-0142 are the same customer.

On webchat, Instagram and Messenger, anyone can type any email or number, so the agent won't look up invoices, orders or quotations there. It offers to have your team follow up instead. Check Stock and Raise Support Ticket work on every channel, because they don't reveal anything private.

The agent never shows drafts or cancelled documents. Giving an invoice or order number only narrows the answer to that document, and only if it's on the customer's own account. Knowing someone else's invoice number gets you nothing.

Before you start

You need an ERPNext user for the agent to act as, with API keys. We recommend a dedicated user, such as cloodot@northbeamsupply.com, so its activity is easy to spot in ERPNext.

That user needs these permissions:

AccessDocument types
ReadCustomer, Contact, Lead, Sales Invoice, Sales Order, Delivery Note, Quotation, Item, Item Price, Bin
CreateLead, Opportunity, Quotation, Issue

The standard Sales User, Accounts User, Stock User and Support Team roles cover these between them. Leave out the create permissions if you won't use the procedure-only skills or support tickets.

1. Generate API keys

In ERPNext, open the user (Settings → Users), go to Settings → API Access, and click Generate Keys. Copy the API Key and API Secret. The secret is shown only once.

2. Install the skill set

In Cloodot, go to Intelligence → Skill Sets, open the Explore tab, find ERPNext and click Install.

3. Fill in the settings

Paste your site URL, API key and API secret. The other settings are optional; see Settings.

4. Turn it on for your agent

Go to Intelligence → Agent, select your AI Persona, open Skills, and enable ERPNext. Test it in the playground, then deploy.

Settings

SettingRequiredWhat it does
ERPNext Site URLYesYour site's address, e.g. https://northbeam.erpnext.com. Must be HTTPS. You can paste any page's address; only the site part is used.
API Key / API SecretYesFrom step 1.
CompanyNoThe company opportunities and quotations are filed under, named exactly as in ERPNext. Leave blank to use the API user's default company. If you run several companies, set this.
Selling Price ListNoWhere Check Stock and Draft Quotation take prices from, e.g. Standard Selling. Leave blank to use the default in Selling Settings.
Stock WarehousesNoThe warehouses Check Stock counts, comma-separated, e.g. Stores - NBS, Portland - NBS. Leave blank to count every warehouse. Leave out warehouses you don't sell from, such as returns or work-in-progress.
Show exact stock quantitiesNoOff by default: customers hear in stock, running low (5 or fewer) or out of stock, plus whether the quantity they asked for can be supplied. Turn it on to tell them the exact number available.
Lead SourceNoA source recorded on leads and opportunities created from chat, e.g. WhatsApp, so you can report on them. On v13–v15 it's a Lead Source; on v16 a UTM Source. It must already exist in ERPNext; a name that doesn't is skipped.
Support Ticket TypeNoAn Issue Type set on tickets raised from chat. It must already exist in ERPNext.

Use the procedure-only skills

Create Opportunity and Draft Quotation won't run until a procedure names them. That's deliberate: whether a conversation has earned a place in your pipeline is your call, written once, not the agent's guess every time someone mentions a budget.

Add them in a procedure as a Skill entry (type @), after the checks you want. For example, a procedure for "A business customer wants a quote for office furniture":

  1. Ask what they need and how many of each.
  2. Ask for their company name and the email the quote should go to.
  3. Decision: If they want more than 10 seats, then run @Create Opportunity with a short title and a summary of what they asked for.
  4. Run @Draft Quotation with the products and quantities they confirmed.
  5. Tell them the team will review the quote and send it over today.

Both skills are safe to run again. If the customer already has an open opportunity, they get that one back with the new notes added, rather than a duplicate. If a draft quotation was made for them in the last 24 hours, they get that draft rather than a second one.

Draft Quotation never takes a price from the conversation: the agent passes product names and quantities, and prices come from your price list. If a product name matches more than one item, the agent asks the customer which one they meant. If an item has no price on the price list, nothing is drafted and the agent tells the customer your team will prepare the quote, so the gap gets fixed rather than a line going missing.

What the agent won't do

  • Change, cancel or discount an invoice, order or quotation
  • Record a payment, or promise a refund, replacement or delivery date that isn't in ERPNext
  • Submit or email a quotation
  • Show a customer anything that belongs to another customer

When a customer asks for one of these, the agent says your team will take it from here. Use Raise Support Ticket, or a procedure with a handover, to make sure someone does.

Troubleshooting

"I can't find an account for this number or email"

The number or email the customer is writing from isn't on their record in ERPNext. Add it to one of their Contacts (phone numbers or email addresses table) or to the Customer itself. The number needs at least the last nine digits right; the country code and formatting don't matter.

On v16, also check the phone and email fields aren't masked for the API user. A masked number can't be matched.

The agent says something isn't working on its side

ERPNext refused the request. The usual causes:

  • The API key or secret is wrong, or was regenerated. Generating new keys revokes the old ones, so paste the new pair into the skill set settings.
  • The API user is missing a permission from the table above.
  • The site URL is wrong, or isn't HTTPS.

An opportunity or quotation wasn't created

ERPNext ran its own checks and refused the document. The agent's reply in the playground includes ERPNext's message. Common causes:

  • No default Company: set Company in the skill set settings.
  • A mandatory custom field on Lead, Opportunity or Quotation. Give it a default value, or make it optional.

Stock looks wrong

Check Stock counts stock on hand minus what's reserved for other customers' sales orders. If a warehouse shouldn't count, list only the ones you sell from in Stock Warehouses.

On this page