Implementing Workflows for SAP Business One

SAP Business One is supported by two ERP Connectors for Saltbox, one for Hana and one for SQL Server.

SAP Business One Connector for Hana (via Service Layer)

Metadata for SAP Business One integrations on Hana are installed via Service Layer. Metadata includes supporting queries, fields and tables that support integrations between SAP Business One and other systems.

Speak with your implementation consultant for access to the metadata installation pack for Hana.

SAP Business One Connector for SQL Server

Metadata for SAP Business One integrations on SQL are installed via InterConnect Server Tools. Metadata includes supporting queries, fields and tables that support integrations between SAP Business One and other systems.

Speak with your implementation consultant for access to the metadata installation pack for SQL.

Golden Workflows

Golden Workflows are provided out-of-the-box and support specific business scenarios. Examples include:

  • Integrating a web store with an ERP System (Shopify, Magento, WooCommerce, etc.)
  • Integrating warehouse management with an ERP System (Amazon, ShipStation, Pharos, etc.)
  • Integrating support systems together or with an ERP System (Zendesk, HubSpot, Salesforce, etc.)
  • much more!

This implementation guide outlines the details necessary for installing and configuring golden workflows (outlined below) SAP Business One. For other implementation guides, see Golden Workflow Install Guide.

For general Golden Workflow documentation, see Connector Golden Workflows.

This ERP System integrates with a number of Cloud Connectors. In addition to standard SAP Business One Connector metadata, connector-focused fields may be required to support a given Cloud Connector. Refer to each Connector’s installation instructions to confirm details.

Saltbox Metadata

Technical information is provided in this section. Installation instructions are found at the bottom of this page in the Hana Metadata Installation section or SQL Server Metadata Installation section, depending on which version of SAP Business One is installed.

User-Defined Tables

SALTBOX_MESSAGES

User-Defined Fields

UDFs are installed on the SALTBOX_MESSAGES table. Refer to the Cloud Connectors of your choice for other User-Defined Fields (UDFs) required by those connectors.

Queries

Query Category: B1WebAPI_saltbox

Query Name Purpose
GetWorkflowMessages Used by Workflow Triggers to fetch available messages.
UpdateMessageState Used by Saltbox to updated processed messages.

Stored Procedures

Updates are required to the B1 Stored Procedure SBO_SP_POSTTRANSACTIONNOTICE. Speak with your implementation consultant for more details.

HubSpot Connector Metadata

The following metadata is required to support HubSpot integrations with SAP Business One, including Golden Workflows.

Technical information is provided in this section. Installation instructions are found at the bottom of this page in the Hana Metadata Installation section or SQL Server Metadata Installation section, depending on which version of SAP Business One is installed.

User-Defined Tables

(none)

User-Defined Fields

UDF Object Description
V33SB_EXTERNALBPID or V33SB_EXTBPID (depending on version) Business Partners Customer ID for external system (i.e. HubSpot).
V33SB_EXTERNALCONTACTID or V33SB_EXTCONTACTID (depending on version) Business Partner Contacts Contact ID for external system (i.e. HubSpot).
V33SB_EXTERNALORDERID or V33SB_EXTORDERID (depending on version) Documents Order ID for external system (i.e. HubSpot).
V33SB_EXTERNALQUOTEID or V33SB_EXTQUOTEID (depending on version) Documents Quote ID for external system (i.e. HubSpot).
V33SB_EXTERNALORDERSRC Documents Source of the order (e.g. HubSpot).
V33SB_EXTERNALLINEID Document Lines Line ID for external system (i.e. HubSpot).

Queries

Query Category: B1WebAPI_HubSpot

Query Name Purpose
GetContactInternalCode Get the contact code for the indicated contact Name and CardCode
GetExtCompanyId Get the external company ID of the indicated Customer CardCode.

Stored Procedures

(none)

Magento Connector Metadata

The following metadata is required to support Magento integrations with SAP Business One, including Golden Workflows.

Technical information is provided in this section. Installation instructions are found at the bottom of this page in the Hana Metadata Installation section or SQL Server Metadata Installation section, depending on which version of SAP Business One is installed.

User-Defined Tables

(none)

User-Defined Fields

UDF Object Description
V33SB_EXTBPID Business Partners Magento Customer Id
V33SB_EXTENTITYID Documents Magento Entity Id
V33SB_EXTORDERID Documents Magento Order Id
V33SB_EXTSHIPMENTID Documents Magento Shipment Id
V33SB_TRACKINGSENT Documents Tracking Number Sent (Y/N flag)
V33SB_EXTLINEID Document Lines Magento Order Item Id
V33SB_EXTITEMID Item Master Data Magento Item Id
V33SB_EXTSTOCKID Item Master Data Magento Stock Id
V33SB_EXTPRODID Item Master Data Magento Product Id
V33SB_EXTLASTCT Item Warehouse (Inventory in a Warehouse) Magento Last Inventory Count
V33SB_EXTWHS Warehouse Magento Warehouse (Y/N flag)

Queries

Query Category: B1WebAPI_Magento

Query Name Purpose
GetBPCardCodeByExtId Fetch the Business Partner Card Code that has the given Magento Account Id.
GetBPCardCodeByEmail Fetch the Business Partner Card Code that has the given email address.
GetDownPaymentDocEntry Fetch the B1 Down Payment Invoice DocEntry associated with the given Magento Order Id.
GetExpenseCode Fetch the B1 Expense Code for the indicated B1 Expense Name.
GetInventoryStockInfo Fetch B1 inventory data for items whose inventory is tracked in Magento.
GetOrderDocEntryByExtId Fetch the B1 Order DocEntry associated with the given Magento Order Id.
GetOrderLine Fetch the B1 Order Line Number for the indicated Magento Order Id and Magento Order Line Id.

Stored Procedures

Magento requires updates to the B1 Stored Procedure SBO_SP_POSTTRANSACTIONNOTICE. Speak with your implementation consultant for more details.

Salesforce Connector Metadata

The following metadata is required to support Salesforce integrations with SAP Business One, including Golden Workflows.

Technical information is provided in this section. Installation instructions are found at the bottom of this page in the Hana Metadata Installation section or SQL Server Metadata Installation section, depending on which version of SAP Business One is installed.

User-Defined Tables

(none)

User-Defined Fields

UDF Object Description
V33SB_SFActivityId Activities Salesforce Activity ID
V33SB_SFAccountId Business Partners Salesforce Account ID
V33SB_SFOrderId Documents Salesforce Order ID
V33SB_SFQuoteId Documents Salesforce Quote ID
V33SB_SFPricebookEntryId Item Master Data Salesforce PricebookEntry ID
V33SB_SFProductId Item Master Data Salesforce Product ID
V33SB_SFProductItemId Item Master Data Salesforce Product Item ID
V33SB_SFLASTCT Item Warehouse (Inventory in a Warehouse) Salesforce Last Inventory Count
V33SB_SFOpportunityId Opportunities Salesforce Opportunity ID

Queries

Query Category: B1WebAPI_Salesforce

Query Name Purpose
GetCardCodeByAccountId Fetch the B1 CardCode associated with the given Salesforce Account Id.
GetClgCodeByActivityId Fetch the B1 Activity Code associated with the given Salesforce Activity Id.
GetCurrencyISOCode Fetch the Currency ISO code in B1 based on the B1 Currency Code.
GetDocEntryByOrderId Fetch the B1 DocEntry associated with the given Salesforce Order Id.
GetDocEntryByQuoteId Fetch the B1 DocEntry associated with the given Salesforce Quote Id.
GetDocNumByOrderId Fetch the B1 DocNum associated with the given Salesforce Order Id.
GetDocNumByQuoteId Fetch the B1 DocNum associated with the given Salesforce Quote Id.
GetItemCodeByProductId Fetch the B1 Item Code associated with the given Salesforce Product Id.
GetOpprIdBySFOpprId Fetch the B1 Opportunity Id associated with the given Salesforce Opportunity Id.
GetSFInventory Fetch inventory for all items which have a Salesforce Product Id.
GetSFOpportunityID Fetch the given Salesforce Opportunity Id if it exists in B1.
GetSFOrderID Fetch the given Salesforce Order Id if it exists in B1.
GetSFQuoteID Fetch the given Salesforce Quote Id if it exists in B1.

Stored Procedures

(none)

Shopify Connector Metadata

The following metadata is required to support Shopify integrations with SAP Business One, including Golden Workflows.

Technical information is provided in this section. Installation instructions are found at the bottom of this page in the Hana Metadata Installation section or SQL Server Metadata Installation section, depending on which version of SAP Business One is installed.

User-Defined Tables

(none)

User-Defined Fields

UDF Object Description
V33SB_EXTERNALORDERID Documents External Order Id
V33SB_EXTERNALORDERSRC Documents External Order Source
V33SB_EXTERNALLINEID Document Lines External Line Id
V33SB_SHOPIFYITEMID Item Master Data Shopify Product Id
V33SB_SHOPIFYITEMINVTID Item Master Data Shopify Inventory Item Id
V33SB_SHOPIFYVARIANTID Item Master Data Shopify Variant Id
V33SB_SHOPIFYLASTCT Item Warehouse (Inventory in a Warehouse) Shopify Last Inventory Count
V33SB_SHOPIFYLOCATIONID Warehouse Shopify Location Id

Queries

Query Category: B1WebAPI_Shopify

Query Name Purpose
ExistingItemCheck Determine if the given B1 ItemCode has a corresponding Shopify product. Returns true or false.
GetAccountCode Fetch the B1 Account Code associated with the given FormatCode.
GetCreditCardCode Fetch the B1 Credit Card Code for the given credit card CardName.
GetDownPaymentDocEntry Fetch the B1 A/R Down Payment DocEntry for the given Shopify Order Id.
GetExpenseCode Fetch the B1 Expense Code for the indicated B1 Expense Name.
GetOrderDocEntry Fetch the B1 Order DocEntry for the given Shopify Order Id.
GetOrderLine Fetch the B1 Order Line Number for the indicated Shopify Order Id and Shopify Order Line Id.
GetShopifyInventoryStockInfo Fetch B1 inventory data for items whose inventory is tracked in Shopify.
GetShopifyLocationIdByWarehouse Fetch the Shopify Location Id for the indicated B1 Warehouse Code.

Stored Procedures

Shopify requires updates to the B1 Stored Procedure SBO_SP_POSTTRANSACTIONNOTICE. Speak with your implementation consultant for more details.

WooCommerce Connector Metadata

The following metadata is required to support WooCommerce integrations with SAP Business One, including Golden Workflows.

Technical information is provided in this section. Installation instructions are found at the bottom of this page in the Hana Metadata Installation section or SQL Server Metadata Installation section, depending on which version of SAP Business One is installed.

User-Defined Tables

(none)

User-Defined Fields

UDF Object Description
V33SB_EXTBPID Business Partners WooCommerce Customer Id
V33SB_EXTERNALORDERID Documents External Order Id
V33SB_EXTERNALORDERSRC Documents External Order Source
V33SB_EXTERNALLINEID Document Lines External Line Item Id
V33SB_EXTPRODID Item Master Data WooCommerce Product Id
V33SB_WCLastInventoryCount Item Warehouse (Inventory in a Warehouse) WooCommerce Last Count

Queries

Query Category: B1WebAPI_WooCommerce

Query Name Purpose
GetAccountCode Fetch the B1 Account Code associated with the given FormatCode.
GetCreditCardCode Fetch the B1 Credit Card Code for the given credit card CardName.
GetDownPaymentDocEntry Fetch the B1 A/R Down Payment DocEntry for the given WooCommerce Order Id.
GetExpenseCode Fetch the B1 Expense Code for the indicated B1 Expense Name.
GetOrderDocEntryByExtId Fetch the B1 Order DocEntry for the given WooCommerce Order Id.
GetOrderLine Fetch the B1 Order Line Number for the indicated WooCommerce Order Id and WooCommerce Order Line Id.
GetWCInventoryStockInfo Fetch B1 inventory data for items whose inventory is tracked in WooCommerce.

Stored Procedures

WooCommerce requires updates to the B1 Stored Procedure SBO_SP_POSTTRANSACTIONNOTICE. Speak with your implementation consultant for more details.

Hana Metadata Installation

To install metadata for Hana, Service Layer is used. One example of a tool that can securely access Service Layer is Postman. The instructions below assume Postman is used for installation, and that this installation is performed on a system with network access to Service Layer, such as a network server. Also, if Stored Procedure changes are required, Hana Studio must be used to perform these updates.

Before you begin:

  • Contact your implementation consultant for the latest Postman metadata installation files.
  • Ensure Postman is installed where it has access to Service Layer.
  • Confirm access to Hana Studio if installing Stored Procedure updates.

To install metadata for Hana via Service Layer using Postman:

  • Import the postman collection file provided. Below is a list of the type of scripts and their purposes, as well as the modifications required to successfully install metadata.

    Note that all scripts require update to the “servername” (change this to the appropriate server).

    • 0 Connection
      • In the Request Data section, ensure that you view the “Raw” mode. Configure the database name, username and password for a super user such as manager, who has sufficient permissions to install User-Defined Fields and other metadata. An Indirect user is not sufficient in most cases.
      • Update the POST path: change “servername” to the appropriate server.
    • 1.1 UDT
      • Update the POST path: change “servername” to the appropriate server.
    • 1.2 UDF
      • Update the POST path: change “servername” to the appropriate server.
      • In the Request Data section, ensure that you view the “Raw” mode. This will either contain several field definitions that must be processed one at a time, or will contain batch annotations. In the case where supplied script requires serial installation, execute the script, then delete the top field from the data and repeat. Ensure there are no blank lines are at the top, or it will result in an error.
    • 1.3 Query Category
      • Update the POST path: change “servername” to the appropriate server.
    • 1.4 Query Category FETCH ID
      • Update the GET path: change “servername” to the appropriate server.
      • This checks to see if the specified category already exists. This is used to fetch the Query Category ID for use with the next Queries request.
    • 1.4 Queries
      • Update the POST path: change “servername” to the appropriate server.
      • In the Request Data section, ensure that you view the “Raw” mode. Change "QueryCategory": "XXX" (or similar name, such as “XXX connector category”) to use the Query Category ID fetched in 1.4 Category FETCH ID.
      • In the Request Data section, ensure that you view the “Raw” mode. This will either contain several query definitions that must be processed one at a time, or will contain batch annotations. In the case where supplied script requires serial installation, execute the script, then delete the top query from the data and repeat. Ensure there are no blank lines are at the top, or it will result in an error.
      • Make sure no blank lines are at the top, or it will result in an error.
    • 1.5 Stored Proc Updates
      • View the Request Data section and ensure that you view the “Raw” mode. This is not a postman-compatible script, rather this is a reference of manual Stored Procedure changes that are required.
      • Manually install Stored Procedure updates using Hana Studio
  • Connect to Service Layer using the Connection script “0 Connection”. Either copy the resulting bearer token into each subsequent request, or use the Postman Environment Variables to use the bearer token in installation requests.

  • Use the scripts to install basic data (data not dependent on other data):
    1. User-Defined Tables (UDTs) - use script 1.1 UDT
    2. User-Defined Fields (UDFs) - use script 1.2 UDF
    3. Query Categories - use script 1.3 Query Category
  • At this point, use the provided Fetch Query Category ID Script (“1.4 Query Category FETCH ID” or similar name) to identify the ID used in the next script.

  • Modify the Queries install script (“1.4 Queries”) and replace the placeholder query category ID with the numeric category ID identified above (typically XXX, XXX connector category or similar). This is the “QueryCategory” property of the UserQueries section and the ID will vary for each installation.

Once metadata installation is complete:

  • Install or modify any supporting stored procedures manually using Hana Studio. If applicable, these are provided in the request body section of the postman script called “1.5 Stored Proc Updates”. Note that Postman itself cannot be used to perform this installation. This info is provided in the same file set for convenience.

SQL Server Metadata Installation

To install metadata for SQL Server, InterConnect Server Tools is used. This process is documented here: Installing Metadata with InterConnect Server Tools.

Contact your implementation consultant for the latest InterConnect Server Tools metadata installation files.