Skip to content
Portalby Webisoft®Book a demo

Learn / Automate order entry from email

How to automate purchase order entry into SAP Business One

Connect your order mailbox and SAP Business One to Portal, then add a routing rule that creates an order draft. The AI reads the lines, matches them to items and prices from SAP Business One, and an approver sends the draft on as a Business One sales order.

01About

About SAP Business One.

SAP Business One is SAP's ERP for small and midsize companies, covering financials, sales, purchasing, inventory, production and CRM in one application. It runs on Microsoft SQL Server or SAP HANA, either on your own servers or hosted by an SAP partner, for example as SAP Business One Cloud.

Users are licensed by type, such as Professional, Limited (in a CRM, Financial or Logistic role), Starter Package, Mobile Application and Indirect Access users, each with different rights. Each company is its own database, and integrations reach it through the DI API, a COM interface for Windows, or the Service Layer, an OData web service built on the same DI core.

Portal by Webisoft is a B2B portal for SAP Business One: customer self-service and team apps on live SAP Business One data.

02The hard part

Why connecting to SAP Business One is hard.

In Business One an emailed purchase order still gets keyed into a Sales Order document line by line, matching item codes and the partner's price list.

Sessions instead of tokens

The Service Layer works with sessions: a login to one company database returns a B1SESSION cookie that every request must carry, plus a ROUTEID cookie that keeps requests on the same node behind its load balancer. An idle session times out after 30 minutes by default, and SAP calls login a heavy job in Business One, so an integration has to keep and renew its session rather than sign in per call.

Less than the DI API can do

Compared with the DI API, the Service Layer cannot run direct SQL record sets, has no transactions that span several requests, and does not see a new user-defined field, table or object until it is restarted. Queries return 20 records per page unless the client asks for a larger page.

API access is its own license type

SAP's terms for SAP Business One Cloud define an Indirect Access User as a user authorized to access Business One through its application programming interfaces only, and build those rights into Professional, Limited and Starter Package users. A separate indirect access instance covers connections used by non-employees, so the right license depends on who the integration serves.

Two databases, two dialects

Business One runs on SAP HANA or Microsoft SQL Server, and the Service Layer does not behave identically on both: SQL view exposure applies only to release 10.0 on SQL Server, and SQL written for one database does not necessarily run on the other, so custom queries often come in two versions.

03Options

Your options.

OptionFits whenWatch out for
Native SAP Business One add-onsYou need one narrow function and an add-on covers it.Each add-on is its own product to license, learn and upgrade.
Generic integration platformYou have someone in-house to build and maintain the flows.You still build the screens, the AI layer and the SAP Business One write rules yourself.
Custom codeThe need is unique and you have developers who know SAP Business One.Upgrades and staff changes put the integration at risk.
Portal by WebisoftYou want customers, your team and AI agents working on live SAP Business One data.It works on top of SAP Business One; it does not replace it.
04How Portal connects

How Portal reaches SAP Business One.

Portal connects to SAP Business One through the Service Layer, SAP's OData API, on SAP HANA or Microsoft SQL Server. Your administrator enters the Service Layer address, the company database and a Business One user for Portal; Portal logs in, keeps the session and its cookies, and logs in again once when the Service Layer drops an idle session. For a server inside your network, the On-site connector relay calls the Service Layer from inside and only makes outbound connections, so nothing is published to the internet.

Every document Portal creates carries a portal marker in its remarks, searched before each create, so a retry finds the first document instead of adding another. An accepted quote becomes a sales order whose lines are copied from the quotation, which closes the quotation in Business One. Portal payments are posted as incoming payments applied to the paid A/R invoices, and a frozen business partner is treated as on credit hold, or as inactive if you choose.

05Before you start

What you need.

06Steps

Step by step.

Your Portal team sets up the SAP Business One connection with you during onboarding, so the first step is done together. The rest is yours to change any time.

  1. Point Portal at the Service Layer

    Under Setup, ERP, ERP system, choose SAP Business One and enter the Service Layer address, such as https://yourserver:50000/b1s/v1, the company database (CompanyDB, for example SBODEMOUS) and the Business One user name and password Portal signs in with. Set the base price list, the G/L account that receives portal payments and how long portal quotes stay valid, then choose Test connection.

  2. Connect the orders mailbox

    In Email, Sources, choose Connect Gmail or Connect Microsoft 365, or create a forwarding address and forward your orders inbox to it.

  3. Create order drafts from purchase orders

    In Email, Routing rules, add a rule for the purchase order intent with the action Create an order draft. Lines are matched to SAP Business One items and priced from Business One price lists and special prices for business partners; anything unmatched is listed in the draft notes.

  4. Approve and send

    Drafts wait in the Review queue. An approver checks the lines and chooses Submit to ERP; the draft becomes a Business One sales order, and once SAP Business One confirms it the customer gets a reply with the order number.

07What syncs

What syncs with SAP Business One.

RecordReadWrite backNote
Business partners (customers)YesYesFrozen partners are on credit hold, or inactive if you choose
Contact persons and addressesYesNoBill-to and ship-to addresses
ItemsYesYes
Price lists and special pricesYesNoPeriod and volume discounts are not read
Stock by warehouseYesNoIn stock, committed and ordered
Sales quotationsYesYesAccepted quotes become an order copied from the quotation lines
Sales ordersYesYes
A/R invoicesYesYesCreated from their base order or delivery lines
Incoming paymentsYesYesApplied to the paid invoices; a surcharge stays on account
DeliveriesYesYesWith shipping type and tracking number
ReturnsYesYes
Purchase ordersYesYesNew orders, plus delivery dates and quantities
AttachmentsNoYes
08Next

What you can do next.

09FAQ

SAP Business One questions, answered.

What if the customer is on credit hold in SAP Business One?

The draft cannot be submitted while the customer is on hold, which Portal reads from the Business One business partner, where a frozen partner counts as credit hold (or inactive, if you choose).

Can it read our SAP Business One item numbers from a customer's part numbers?

Lines are matched to your catalog by the AI; anything it cannot match is listed in the draft so a person can pick the right item.

What stops a duplicate order if something is retried?

Every order carries a portal marker in the document remarks that Portal searches before every create, so a retry finds the first order instead of creating another.

10More guides

Keep going.

Sources