Skip to main content
The ERP info data interface retrieves data directly from the merchant’s merchandise management system and displays it in the shop. Two use cases are the focus: the logged-in buyer sees their own orders, and every visitor can query the stock level of a product. The display takes place in module templates that are pulled into a master template via WS-ExternInclude. Which file handles which task is defined in the wws-online-interface.config configuration in the Templates section. The tags on this page apply exclusively in these module templates. Guide: Using the ERP info data interface · Reference: wws-online-interface.config configuration
The interface was developed for the V4 merchandise management system from D&G and can only be used with it. It must also be activated by WEBSALE AG.
Buyer-related queries require that the buyer is logged in and has a customer number, and that this customer number cannot be edited in the shop. Otherwise, anyone could view other customers’ orders.

The six templates

The “Templates” column in the tables on this page names the templates in which a tag is evaluated. “all” means that it applies everywhere.
Always wrap the interface call in WS-OnlineERPLink or WS-OnlineERPStockLevelLink. The wrapper only takes effect if the interface is available at all, and otherwise keeps the block out of the page.
Additionally place the stock level call in a {!ST-Robot} wrapper. Without it, every search engine crawler sends a request to the merchandise management system on every product view.
Reference: WS-OnlineERPLink · Reference: WS-OnlineERPStockLevelLink · Reference: WS-ExternInclude()

The field names from the configuration

Which data fields the merchandise management system supplies differs from shop to shop. That is why the fields do not have descriptive tag names, but numbers: H1 to H1000 for the header data of an order and P1 to P1000 for the position data. You define what each number stands for in wws-online-interface.config in the HeadData and PositionData sections.
This way, you do not write the column headings of a table into the template, but retrieve them from the configuration. If the merchandise management system later changes the meaning of a field, a change in the configuration is sufficient.
Two numbers are fixed: H1 is always the customer number, P1 is always the quantity. All other numbers can be assigned freely and must be coordinated with the merchandise management system.

The order list

ERP-HeadData is at the same time the number of orders found, the check for hits, and the loop over them.
The order type comes from the merchandise management system as a number. You define the readable text for it in wws-online-interface.config in the Types section. If an entry is missing there, ERP-HeadData_Type_Txt remains empty. The wrapper in the example catches this and then at least shows the number.
ERP-HeadData_Download and ERP-LinkDownload are two names for the same tag. Use one of them consistently within a template.
As a single tag outside the loop, ERP-HeadData outputs the number of hits; inside the loop, everything refers to the order currently being iterated. The number of hits therefore belongs before the loop, not inside it.

The positions of an order

The position loop runs inside the order loop and always refers to the current order. The same nesting works in the list template and in the detail template, so you can copy the block from one to the other.

Filter and time period

The overview list can be restricted by the number of entries, a time period and an alternative time period. The interface provides all the selection lists required for this ready-made.
ERP-MaxEntries_select, ERP-AlternativeDate_select and ERP-Search_Type_select only take effect as a wrapper if at least two entries are configured. With only one option, a list makes no sense, and the label next to it disappears along with it.
The month names and the texts of the predefined time periods are located in wws-online-interface.config in the PeriodSelection section. There, you also use ShowYearsAgo to define how far back the year list goes.
If only a single year is available for selection, ERP-DateFrom_year_select and ERP-DateUntil_year_select output a hidden field instead of a list. The form continues to work as a result, but the layout lacks a visible element at this point.
The selection lists bring their own field name. Do not place your own select element or your own name around them.
ERP-Search_value outputs the search term unchanged, exactly as the visitor typed it. In the value attribute of an input field, the prefix ENCHTML- is therefore mandatory. Without this prefix, foreign HTML code can be injected into the page via the search field.
As a wrapper without a parameter, ERP-Search_Type applies exactly when filtering by a type takes place at all. The value 0 means “no filter”.
The comparison in ERP-Search_Type(Wert) is numeric. A non-numeric parameter becomes 0 and thus matches the unfiltered state.

Orders not yet transferred

Time passes between the order in the shop and its transfer to the merchandise management system. During this gap, the merchandise management system does not yet know the order, but the shop does. The separate PendingEntries template closes this gap.
ERP-LastShopOrderNumber is the boundary between the two worlds: everything up to this order number is in the order list, everything above it is in this list. Pointing this out saves inquiries from buyers who miss their most recent order in the overview.

The stock level

ERP-RequestSent separates two states that otherwise look the same in the template: no request has been made yet because the visitor first has to select a branch, or a request was made and the answer is zero. Without this wrapper, the page incorrectly reports in the first case that the product is out of stock.
The stock level is the only query that works without a logged-in buyer. That is exactly why it needs the {!ST-Robot} wrapper around the module call. Without it, every crawler run generates as many requests to the merchandise management system as the shop has products.

General requests

In addition to orders and stock levels, the interface can supply any other data records. The CommonRequest template displays them.
A general data record has a name and any number of values. That is why two loops are nested here: the outer one over the data records, the inner one over their values.
ERP-CommonName() expects the technical name as a fixed parameter. You therefore build the heading for each data record using a wrapper with ERP-CommonData_Name(…), as in the example. If you do not know the names, simply output ~ERP-CommonData_Name~ instead.
ERP-CommonName() accepts a second parameter. {ERP-CommonName(bestand,verfuegbar)} then only applies if the configured description for bestand equals verfuegbar. This notation is not included in the old documentation.
If the technical name passed is not configured at all, ERP-CommonName() outputs an empty string instead of drawing attention to itself. A missing heading is therefore an indication of a typo in the name.
ERP-Type_Selected(Wert) compares numerically. The parameter must be a number, not text.

Errors and messages

ERP-InternalErrorMessage belongs exclusively in an HTML comment. The text is intended for troubleshooting and must not appear to a buyer in plain text. You read it via the browser’s source code view.
ERP-UserDependentRequest distinguishes buyer-related queries from the stock level query. In the shared error template, you can use it to show the logged-in buyer a different text than the anonymous visitor.
The message from the merchandise management system is third-party text from a system whose wording you have no influence on. Check whether you really want to show it to the buyer, or whether a sentence of your own provides better information.

The Type column

The “Type” column in the tables on this page has four digits. Each digit stands for a type of use; 1 means permitted, 0 means not permitted. A tag with 1111 can therefore be used in all four forms, a tag with 0110 only as a positive and negative wrapper.
  • Guide: Using the ERP info data interface
  • Guide: Using external includes
  • Reference: wws-online-interface.config configuration
  • Reference: WS-OnlineERPLink
  • Reference: WS-OnlineERPStockLevelLink