SAPB1 - How To Add an Order (Magic xpi 4.6)
This topic gives an example of how to add an order. This flow uses the SAPB1 connector to connect to the SAP Business One application. The flow has various steps and invokes additional flows, as well. The final step uses the SAPB1 connector to complete the new order process. The flow is triggered by an HTTP request.
Step 1 is the HTTP trigger. This step configures Magic xpi to wait for an HTTP request. The type of request is defined in the argument called OrderXML. For information on how to configure an HTTP trigger, see HTTP - Trigger Configuration.
Step 2 uses the Flow Data utility to import the data sent in the HTTP request into a variable. The information from the HTTP request is received in XML format. For information on how to configure the Flow Data utility, see Flow Data Utility Configuration.
Step 3 uses the Data Mapper utility to do the following:
Step 4 uses the Invoke Flow utility to start the Add Customer flow, which adds a new customer to SAP Business One. This takes place only if the customer does not exist. If the customer already exists, the flow skips to step 5.
Step 5 uses the Flow Data utility to initialize the customer.
Step 6 begins after the previous flows are completed for both new and existing customers. This flow uses the Data Mapper to build an XML file to use with the SAPB1 connector. This XML file will provide data on the items in the order.
Step 7 uses the Invoke Flow utility to invoke the Add Items flow. This flow will add the items ordered to the SAP Business One Database.
Step 8 uses the SAPB1 connector to add the order.