Skip to main content

Example

What you'll build

Build an automation that connects to SAP Business One through the Service Layer and queries BEM replication periods. The connection uses configurable credentials, and the operation stores its collection response in a result variable.

Operations used:

  • listBEMReplicationPeriods : Query the BEMReplicationPeriods collection.

Architecture

Prerequisites

  • An SAP Business One installation with the Service Layer enabled.
  • A company database, user name, and password with access to the Service Layer.

Setting up the Localization integration

New to WSO2 Integrator? Follow the Create a New Integration guide to set up your integration first, then return here to add the connector.

Adding the Localization connector

Step 1: Open the connector palette

Select Add Connection in the Connections section.

Localization connector palette open before selection

Step 2: Select the Localization connector

  1. Enter ballerinax/sap.businessone.localization in the search field.
  2. Select the Localization connector card.

Configuring the Localization connection

Step 3: Bind the connection parameters to configurable variables

Bind every required connection field to a configurable variable.

  • Session : Bind the SAP Business One session settings to configurable variables.
  • Connection Name : Enter localizationClient as the connection name.

Localization connection form with session parameters bound before saving

Step 4: Save the connection

Select Save and verify that the connection appears in the Connections section.

Localization connection visible after saving

Step 5: Set actual values for your configurables

  1. Select Configurations at the bottom of the project tree under Data Mappers.
  2. Enter a value for each configurable listed below before you run the integration.
  • companyDb (string) : Enter the SAP Business One company database name.
  • userName (string) : Enter the SAP Business One user name.
  • password (string) : Enter the SAP Business One password.

Configuring the Localization listBEMReplicationPeriods operation

Step 6: Add an automation entry point

  1. Select Add Entry Point next to Entry Points.
  2. Select Automation.
  3. Select Create to accept the settings.

Step 7: Expand the connection and configure the listBEMReplicationPeriods operation

  1. Select Add Step in the automation flow.
  2. Expand localizationClient to display its operations.

Localization connection expanded to display operations before selection

  1. Select List Bem Replication Periods.
  2. Review the generated result variable for the returned collection.
  • Result : Keep the generated result variable for the BEMReplicationPeriodsCollectionResponse value.

Localization listBEMReplicationPeriods operation form with the result variable configured

  1. Select Save.

Completed Localization flow with the configured operation

Try it yourself

Try this sample in WSO2 Integration Platform.

Deploy to Devant

View source on GitHub

More code examples

The SAP Business One connectors provide practical examples illustrating usage in various scenarios. Explore these examples, covering use cases like listing open sales orders, reporting inventory stock, and logging CRM activities.