In this tutorial, learn how to automate the creation of customers and orders in Sap Business One when an Opportunity is Closed Won in monday.com.
Prerequisites #
Before you begin, ensure the following connections are established:
- Connection between Engini and monday.com.
Learn how to connect monday.com to Engini - Connection between Engini and Sap Business One.
Learn how to connect Sap Business One to Engini.
Item Updated #

Add the “Item Updated” action in monday.com so that the flow will be triggered when the item’s status changes to “Closed Won.”
- Board field
- Click on the empty field and the tooltip will pop up showing all the boards that the user has accesses to.
- Choose the board from which the trigger will originate. For this tutorial. choose the “Demos – SBO Opportunities” Board.
- Columns to listen to field
By clicking on the “Add column to listen to” button, select the “Status” column that will activate the sequence of activities in the workflow if an update occurs in it.- Click on the “Add column” button.
- Click on the field to open the drop down.
- Choose the “Status” column.
- Conditions fields
Choose to add a condition for the status. The workflow will only work if the condition you define is met. Follow the next steps to add conditions:- Select from the drop down the “Status” field.
- Select the “Equal” condition.
- Click on the empty field and the tooltip will pop up showing the options you can choose and choose the “Closed Won” status.
Initialize Variable #

Now, let’s initialize a variable that will later hold the customer Id of the customer in SBO:
- Choose “Initialize Variable” action of Engini.
- Name field
Click on the empty field and choose a name for the variable. For example “SBO Customer id”. - Type field
Choose from the drop down the “String” option. - Click on the “next step” button.
Add If Condition #

Add the “If Condition” action of Engini to check whether the customer has been established in SBO or not. When we create a customer in SBO, we will populate the “SBO customer id” field with the number of the created customer.
Using the if activity, we check whether the value in the “SBO customer id” field is populated or not, if so – it means that the customer has been created and there is no need to create the customer. If not – it means that the customer has not been created, and we will need to create the customer.
- Click on “Add conditions” button.
- Click on left the field to show the tooltip with all the options you can choose:
- Click on the Dynamic Content label.
- Choose the “SBO customer id” field from the trigger.
- Select the “Is Equal” (=) condition.
- Click on the right to show the tooltip with all the options you can choose:
- Click on the functions label
- Choose the “Null()” function, which return null.
- If Yes
If the condition is met, create a customer:- Click on “Next step” button to add the next activity.
- Add the ‘Get Item’ activity in monday.com to retrieve the item linked to this item through the ‘Connect Board’ column.
- Item ID – The format in which data from the Connect Board in monday.com is received through the API is an array, so manipulation is necessary. We will extract the first cell from the array of values named “linkedPulseId.” This way, we will retrieve the ID of the record connected to this entry in the Connect Board column.
- Add the “Create Record” Activity of SBO and create the card of the “Business Partner”.
- Item ID – The format in which data from the Connect Board in monday.com is received through the API is an array, so manipulation is necessary. We will extract the first cell from the array of values named “linkedPulseId.” This way, we will retrieve the ID of the record connected to this entry in the Connect Board column.
- Add the “Update Item” activity in monday.com to update the item with the business partner ID (“Card Code”) that was created.
- Finally, add “Set Variable” activity to update the variable you initialized with the “Card Code” obtained from the previous activity.
- If No
If the condition isn’t met, add “Set Variable” activity to update the variable you initialized with the “Card Code” obtained in the trigger.
Get SubItems #
Add the “Get SubItems” action for monday.com.

- Board
Select from the drop-down menu the “Demos – Subitems of SBO Opportunities” board option. - Parent Item Id
- Click on the empty field, and a tooltip will appear showing the options of available values.
- Select the “Item Id” from the trigger.
Map Object Array #
Add the “Map Object Array” activity for SAP Business One

- Data List
Select “Demos – Subitems of SBO Opportunities” from the “Get Subitems” activity. - Object Name
Choose from the drop down the “Document Lines” as the object name. - Fields
- Item Code
Choose “Item No.” from the “Get Subitems” activity. - Quantity
Select “Qty” to specify the quantity. - You can continue adding more fields as needed.
- Item Code
Create Order #
Add the “Create Order” action for SAP Business One.

- Object Type
Select from the drop down the “Orders” as the object type. - Doc Entry
Leave the Doc Entry field empty, as it will be automatically generated. - Fields
- Card Code
Choose “SBO Customer Id” variable. - Document Lines
Select “Document Lines” from the “Map Object Araay” activity, to link the associated document lines. - Doc Date
Choose the functionsAddDays
andUtcNow
to crate the manipulation ofAddDays(UtcNow(), -1)
to set the document date to one day prior to the current date. - Doc Due Date
Choose the functionsAddDays
andUtcNow
to crate the manipulation ofAddDays(UtcNow(), 7)
to set the document due date. - You can add more fields if necessary.
- Card Code
Update Item #
Add the “Update Item” action for monday.com.

- Board
Select from the drop-down menu the “Demos – Subitems of SBO Opportunities” board option. - Item Id
- Click on the empty field, and a tooltip will appear showing the options of available values.
- Select the “Item Id” from the trigger.
- Fields
- SBO Order – Choose the “Doc Entry” of the Order you created in the previous activity.