Zum Inhalt

Process Description

These Shop Connector Process Descriptions refer to the WebConnector Base App for Microsoft Dynamics 365 Business Central. They provide an overview of usage and process capabilities of the WebConnector.

Introduction

WebConnector has two main components to connect webshops:

  • A passive SOAP API that allows to synchronize master data, create orders and customer or query historical data for example.
  • An active interface, with which webshops can be queried and synchronized from Business Central.

Both ways can use the Incoming Sales Documents, an intermediate structure from which the actual sales documents or accounts receivable are created. The Incoming Sales Documents are particularly suitable to store data temporarily and to process it asynchronously. On the one hand, this shifts load from Business Central, and on the other hand, the incoming data can be checked automatically first.

Query Master Data

General master data is provided by the Outbound Master Data Web Service. This web service contains defined system and ERP master information active at the time.

When communicating between Business Central and the Web Service consumer (web store), it is necessary that the same identifying codes are used for various master data. For example, so that the country code can be correctly interpreted by Business Central when an order is created, a country code that is valid in Business Central must be transferred from the store when the corresponding web service is called up. Which codes are created and valid in Business Central in each case can be queried using the "OutboundMasterData" web service. These should be regularly synchronized with the store system.

Currently, the following master data is provided:

  • Language codes
  • Currency codes
  • Country codes
  • Shipping terms
  • Item units
  • payment methods
  • Shipping Agent codes
  • Shipping Agent transport codes
  • Salutation Codes codes
  • Customer templates codes
  • responsibility center codes

Query of article master data

Item master data can be obtained through various services.

  • CRUD Services
    • Item
    • Item Variant
    • Item Vendor
    • Item Cross-Selling
  • Advanced Services
    • Item Transfer (exports a large amount of items and related information, such as variants, vendors and prices)
    • Item Availability
    • Item Sales Price

Sales price query

Individual sales prices can be calculated using the InboundCalcOrder service. The speed of the calculation depends on the business logic in Business Central.

Shopping cart value

The InboundCalcOrder service is also used to calculate the shopping cart/shopping cart value.

A common application example is the following: A store customer successively compiles his individual shopping cart. Each time the shopping cart is changed, the shopping cart can be recalculated using this Web service. In this way, the store always has the latest information about the value of the shopping cart (order total), etc. It is also possible to take into account coupons, discounts and freight costs. The shopping cart calculation must always provide the same values as the real order in Business Central. This ensures that the store customer is shown the correct amount to be paid at the end of the order process.

In Business Central, contacts are initially only people or companies with whom communication takes place. Contacts are used, for example, to carry out marketing activities or to exchange offers. If a contact then actually wants to enter into a business relationship with the company, it is necessary to create a customer from the contact. This customer then contains further information, in particular the posting to the correct accounts in the financial accounting. Information such as discounts, individual prices, etc. is also attached to the customer. Therefore, in this web service, a customer is required for the calculation at this point. However, if there is no customer at the time of the request (request from the store without "Customer No."), then Business Central must take care of the processing. For this purpose, the "Sell-to Customer Template Code" can then be used, i.e. a template that describes how the customer should be created based on the contact.

If the customer template code is not known at this point or is not submitted, Business Central must take care of this internally. If deliberately requested with a template code, then this will be used. Otherwise, default values derived from the customer's country code are used. If a request is also made without a country code, then the country code from the general NAV/Business Central company data setup is used and the corresponding customer template from the country/region table is used on the basis of this.

Query of inventories

To determine item inventories, the OutboundItemAvailability service is used

Query of customer master data

Service to query one or more shipping addresses for a specific customer: CustShipToAddress

The CustomerService service is used to retrieve and modify customer information.

Retrieve contact master data

To retrieve and modify contact information, the two services ContactService and InboundCreateContact are used.

Transferring orders

Orders are created using the InboundCreateOrder and InboundCreateInbOrder service in Business Central. While the first service InboundCreateOrder allows direct placing of orders into the Sales Header table, InboundCreateInbOrder first collects orders into buffer tables and releases them at a later time, after a check.

Queries of order history

  • Sales orders can be queried with the OutboundSalesOrder service,
  • Sales invoices with the OutboundSalesInvoice,
  • sales deliveries with the OutboundSalesShipment and
  • sales credit memos with the OutboundSalesCreditMemo.

Furthermore there is the OutboundSalesArchive.

Quote query

The InboundCreateQuote service can be used to create quotes from the store in Business Central.

General query of changes

Relevant changes for the Web Services are logged in the Web Changes WS table and can be specifically queried using the OutboundWebChanges service.

For example, when a new item is created, a corresponding record is created that logs the action. The service can then be used to query which changes relevant to the store have been made. These changes can then be queried specifically by the store. A sequential number is stored in the EntryNo field, which can be used by the store to query only new changes. The TableID column indicates which table the change affects - for example, TableID 27 is the indicator for changes to the item table.

If an article or article variant is deleted, this process is logged in the same way.

Example of use

In the store, the item descriptions from Business Central are used for display. If the item description changes in Business Central, this change is logged accordingly. The store can now periodically query via the OutboundWebChanges service which articles were last changed. As a result, the WebService delivers the changed article numbers. Based on the list of article numbers received, the store could now specifically query the relevant articles again and update them in the store.