B2B Marketplace is an optional module for Customer Portal that adds robust collections management, configurable web templates, and advanced shipping configuration. B2B customers can view product collections via search or curated menus, allowing them to easily create orders.

Architecture Overview

B2B Marketplace is installed as part of Customer Portal. A Dedicated SaaS hosted web server is required for the B2B Marketplace module.
B2B Marketplace is installed as part of Customer Portal. A Dedicated SaaS hosted web server is required for the B2B Marketplace module.

Because B2B Marketplace builds on Customer Portal, B2B users still have access to base Customer Portal features such as paying bills, managing service calls and viewing open invoices. Note that B2B Marketplace requires a Dedicated Software as a Service (SaaS) hosted web server.

Installing B2B Marketplace Search Indexer Service

Overview

The B2B Marketplace module for Customer Portal provides a high-performance, dedicated B2B product search service that allows for fast access to B1 data without having to reach out directly, in real-time, to SAP Business One. This results in a much faster end-user experience and greatly reduces the load that the B2B Marketplace module places on the core SAP Business One system. To support this robust search service and other supporting B2B assets, a Dedicated SaaS hosted web server is required.

This component is typically installed directly the Dedicated SaaS hosted web server running Customer Portal. It runs as a Windows Service with each Customer Portal installation needing its own dedicated instance. It provides an HTTP-based REST API which the Customer Portal web calls directly to retrieve relevant product information.

The IPs and ports that the service listens on are configured as command-line arguments on the service. In shared hosting environments care must be taken to ensure these services don’t conflict with each other, as there are multiple Customer Portals deployed on the same SaaS hosted web server.

The following Best Practices have been established to help with ease of maintainability.

  • Allocate a block of high ports to the B2B Marketplace Search Indexer Service. Each website needs its own Search Indexer Service, so a range of ports is recommended to handle large-scale deployments (for example: ports 5000-5100).
  • Create a central document identifying the IP and port for each Portal website. To determine which IP and Port a particular service is listening on, look at the command line parameters for the configured Windows Service.
  • Lock any Search Indexer Service IP/port pairs behind a firewall for the general internet. The end-user’s browser never actually talks directly to the Product Search API, so locking this behind a firewall for the general internet will improve security.
  • Enable access to the Search Indexer Service IP/port from SAP Business One. InterConnect Manager Add-On for SAP Business One requires direct access to the SaaS hosted web server’s Search Indexer Service via its assigned IP and port. This is required for the add-on to be able to manage the web product catalog and other general B2B web settings.

Installation Instructions

  1. On the Dedicated SaaS hosted web server, unzip the B2B Marketplace Search Index Service to the desired location. The recommended location is a subdirectory named B1SearchEngine-{CustName}_{Prod|Test} in the directory C:/Program Files (x86)/zedIT/, but another directory may be used to host the Windows Services. For example: C:/Program Files (x86)/zedIT/B1SearchEngine-Acme_Prod For installations on a shared hosting server with multiple B2B installs, it is even more important to distinguish the installations by customer and role and to group search engine installations together (e.g. C:/Program Files (x86)/zedIT/B2BSearchEngines/).
  2. Run the install script. In the Search Index Service directory there is a scripts folder which contains batch files for installing and uninstalling the B1SearchEngine-XXX Windows service. Run the Install.bat file as administrator. It will prompt for:
    • The Windows Service Name Suffix - This will be appended to the “B1SearchEngine-“ to define the name for the service. This name must be unique on the server. It is recommended that a convention of {CustomerName}_{Role} be used.

      e.g. The production company for Acme will result in a service name of B1SearchEngine-Acme_Prod.

    • The URLs to be hosted by the service. This will allow InterConnect Manager Add-On to access the service during configuration. It doesn’t need to be accessible via the public internet but must be accessible from SAP Business One where InterConnect Manager Add-On will be used.

  3. Configure application settings by opening the Search Index Service’s appsettings.json file. Modify the following settings:

    "B1Enabler": {
      "EnablerUserName": "",
      "EnablerPassword": "",
      "EnablerHost": ""
    },
    

    EnablerHost is the full URL and profile path for the target profile. For example: http://www.acme.com:4033/prod. This would result in something like:

    "B1Enabler": {
      "EnablerUserName": "admin",
      "EnablerPassword": "thePassword",
      "EnablerHost": "http://www.acme.com:4033/prod"
    },
    
  4. Once installed, the B2B Marketplace Search Indexer Service will run in the background, allowing for configuration of products and collections within SAP Business One.

This search index may be started/stopped using Windows Services Manager, installed with all versions of Microsoft Windows Server.

  1. An administrator may optionally access the search index via the web by accessing the index.html landing page. For example, if the search index is on http://192.168.0.1:5000 then the admin landing page is found http://192.168.0.1:5000/index.html. A summary of manual admin functions is available from this page, and are outlined below:
    • Get an item: /api/items/ITEMCODE for example: http://192.168.0.1:5000/api/items/IPAD. Gets the item details for the specified item.
    • Search for items: /api/items?search&query=QUERY* for example: http://192.168.0.1:5000/api/items?search&query=ItemName:ipad*
    • Update an item: /api/items/ITEMCODE/rebuild for example: http://192.168.0.1:5000/api/items/IPAD/rebuild. Rebuilds the specific item.
    • Update index: /api/items/update for example: http://192.168.0.1:5000/api/items/update. Rebuilds items which have been edited since the last index update.
    • Rebuild index: /api/items/rebuild for example: http://192.168.0.1:5000/api/items/rebuild. Rebuilds everything in the catalog.
    • , such as rebuilding the index or individual item, which is needed after a DTW data import.

Basic Configuration

Basic configuration must be applied first before any other configuration can proceed.

Basic Configuration for InterConnect Manager Add-On

InterConnect Manager Add-On must be configured to point to the Customer Portal and B2B Marketplace Search Engine Service. This allows for advanced configuration within SAP Business One, such as collections, products and menus.

  1. In SAP Business One, go to InterConnect Manager AddOn > Administration > Customer Portal Config to open Customer Portal configuration settings.
  2. In the General tab:
    • Set Customer Portal Web Address to point to the installed Customer Portal website.
    • Set Search Engine Service Address to point to the address configured during installation.

UDO Registration for B2B Marketplace

Several B2B Marketplace User Defined Objects (UDOs) must be manually registered prior to configuration of web products, collections or other features specific to B2B Marketplace.

Register B2B Marketplace User-Defined Objects (UDOs)

B2B Marketplace for Customer Portal uses SAP Business One User Defined Objects (UDOs), to manage the core Collection, Expense (Shipping Rate), Storefront and Web Product data records. Manual installation of these UDOs is required (as outlined below). This is due to current limitations in our meta-data installation code for UDOs in B1 9.2. A future release may address this by automatically creating UDOs during license assignment.

UDOs are built upon User Defined Tables (UDTs) and User Defined Fields (UDFs) added to those UDTs. The UDTs and UDFs required for B2B Marketplace are installed in B1 as part of the metadata install that occurs when the Customer Portal and Order Pad licenses are assigned. The final step to complete the UDO registration must be completed in SAP Business One using the User Defined Object Registration Wizard.

See SAP’s online documentation for details from SAP on how to register UDOs in Business One. Our walk-through below shows how to set up the B2B Marketplace User UDOs required for B2B Marketplace functionality.

For the B2B Marketplace functionality the key UDO requirement is that the UDOs be registered with the right names and with the child tables linked to the correct header tables. The additional settings for the Find form and Edit form are helpful for viewing UDOs in B1 but not related to their access through the B1WebAPI.

UDO Registration Walkthrough

The required UDOs with their respective child tables are:

  • Collections (ZEDS_PORCOLL)
  • Expense Rates (ZEDS_ADDEXPRATEDTL)
  • Store Fronts (ZEDS_WEBSTORE)
  • Web Items (ZEDS_WEBITEMS)

Collections (ZEDS_PORCOLL)

  • UniqueID & Name = ZEDS_PORCOLL
  • Type = Master Data
  • Document Table = ZEDS_PORCOLL
  • Rows Table = ZEDS_PORCOLDET (Portal Collection Details)
  • Rows Table = ZEDS_PORCOLFILT (Portal Collection Filters)
  • Rows Table = ZEDS_PORCOLPROD (Portal Collection Products)
  • Rows Table = ZEDS_PORCOLSTORE (Portal Collection Store Fronts)

The following screen shows show the recommended settings to use when registering the Collections UDO in B1. The key requirement for system compatibility is that the Name of the UDO match the ZEDS_PORCOLL name from the screen shots.

Only one of the following child tables may be configured. It doesn’t matter which one.

Expense Rates (ZEDS_ADDEXPRATEDTL)

  • UniqueID & Name = ZEDS_ADDEXPRATE
  • Type = Master Data
  • Document Table = ZEDS_ADDEXPRATE
  • Rows Table = ZEDS_ADDEXPRATEDTL (Expense Rate Detail)

The following screen shows show the recommended settings to use when registering the Expense Rates UDO in B1. The key requirement for system compatibility is that the Name of the UDO match the ZEDS_ADDEXPRATE name from the screen shots.

Storefronts (ZEDS_WEBSTORE)

  • UniqueID & Name = ZEDS_WEBSTORE
  • Type = Master Data
  • Document Table = ZEDS_WEBSTORE
  • Rows Table = ZEDS_WEBSTOREPFLTR (Portal Store Front Prod Filter)
  • Rows Table = ZEDS_WEBSTORETEMPLT (Portal Store Front Prod Template)
  • Rows Table = ZEDS_WEBSTORELABELS (Web Store Labels)

The following screen shows show the recommended settings to use when registering the Storefront UDO in B1. The key requirement for system compatibility is that the Name of the UDO match the ZEDS_WEBSTORE name from the screen shots.

Only one of the following child tables may be configured. It doesn’t matter which one.

Web Items (ZEDS_WEBITEMS)

  • UniqueID & Name = ZEDS_WEBITEMS
  • Type = Master Data
  • Document Table = ZEDS_WEBITEMS
  • Rows Table = ZEDS_WEBITEMDETAILS (Web Item Details CP B2B)
  • Rows Table = ZEDS_WEBITEMTAGS (Web Item Tags)
  • Rows Table = ZEDS_WEBITEMVARS (Web Item Variants)

The following screen shows show the recommended settings to use when registering the Web Items UDO in B1. The key requirement for system compatibility is that the Name of the UDO match the ZEDS_WEBITEMS name from the screen shots.

Only one of the following child tables may be configured. It doesn’t matter which one.

Web Configuration for Customer Portal webs

The web config file for Customer Portal must be updated to point to the installed Search Engine Service. This will allow the Customer Portal website to display B2B content configured within SAP Business One.

  1. On the SaaS hosted web server, use Windows File Explorer to navigate to the Customer Portal web files. By default, this is C:/inetpub/wwwroot/zed Customer Portal/
  2. Edit the web.config file by changing the property SearchServiceUrl to point to the installed Search Engine Service’s api (for example, a service installed on 192.168.0.1:5000 would be configured to point to http://192.168.0.1:5000/api

    <add key="SearchServiceUrl" value="http://192.168.0.1:5000/api" />
    

What’s Next?

Visit the B2B Marketplace Administrator’s Guide for a walkthrough of advanced configuration and typical admin tasks.