Tutorials
Opportunity closed won in monday.com -> create customer and order in Sap Business One
11 min
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 https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview td33fdcyfx3ign84qa0pd#79cmn connection between engini and sap business one learn how to https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview wkhhywavkxilonrsgmuir#x5nsh 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” 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 n o 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 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 functions adddays and utcnow to crate the manipulation of adddays(utcnow(), 1) to set the document date to one day prior to the current date doc due date choose the functions https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview o3kkbgi5xnqf yvnuqkcv#2z5tk and https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview o3kkbgi5xnqf yvnuqkcv#01civ to crate the manipulation of adddays(utcnow(), 7) to set the document due date you can add more fields if necessary 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