Order Add

Tags:

Updated:

3 minute read

Executing the Process is a vital part when integrating any applications. This Document will let the users to understand how the integration process can be executed through workflow for adding Order from Magento2 to SAPB1.

Brief Description

orderadd-workflow

After Adding and Updating the inventory of the product in Magento2, an order has been placed which needs to be synced in SAP Business One. Therefore, a workflow has been designed as shown above, to sync all the orders in SAP Business One that are created in Magento2.

Click here to know about the process of creating an order in Magento2.

On Placing the order, the same needs to be fully completed by generating Invoice and Shipment. The Orders will only be synced when the status of the order is completed fully.

Order Status:

  1. Only Order is created - The status would be Pending.
  2. Order + Invoice - The status will be Processing
  3. Order + Invoice + Shipment - The status of the order will be Completed.

orderadd-image1

In this case, the Order has been placed in the name of Paul M Berry (customer) in Magento2.

Lookup Mapping

The lookup Mapping for the Freight and Tax is needed to be done as the rates and the values differ. The Mapping should be done as shown below.

orderadd-image2

The destination value ‘exempt’ is needed to be created in the SAP Business One.

  1. To create the tax value in SAP Business One, Navigate to Administration Module > Setup > Financials > Tax > Sales Tax Codes. The Sales Tax Codes - Setup Window Opens.
  2. Add a new Tax Code under the type State which can be selected from drop down option Available.

Click here to know more about the Tax Code – Setup Window.

orderadd-image3

Attribute Mapping/Transformation

Following the Provided Mapping, the user can sync the Order Add Workflow from Magento2 to SAP Business One. To know more, see Mapping & Transformation Techniques.

Mapping for the ComplexObjectCollection Documents
orderadd-image4

orderadd-image5

a. CardCode: This is mapped with the variable Customer Email Query for fetching the customer Email. b. U_WEBORDID: This is mapped with Entity ID of Magento2.

  1. The Root Variables should be arranged as given below:

orderadd-image6

Executing the Workflow Integration

Note: Before integrating with Magento2 and SAP Business One, make sure all the Master Data Touchpoints are synced.

  1. Once the workflow is designed, Update the Configuration in agent for deploying the workflow in the agent.
  2. Click on the run button in the workflow panel in the cloud portal.
    orderadd-image7
  3. Once the Execution is finished, click on the Resync Button in the agent. The Resync Panel shows the Success Result in the agent. The User can also trigger or Deploy the workflow from the agent by clicking on the run button.

orderadd-image8

Integration Data Survey

The user can survey the data by viewing the Processed Snapshot from the node level of the workflow. This Snapshot View displays the successful execution of the workflow. The Sales Order with the source id 56 is successfully synced to SAP Business One with its destination ID as 74.

orderadd-image9

Post-Conditions

The user can view the sales order in the SAP Business One Client by navigating to Sales - A/R > Sales Order.

orderadd-image10

Frequency of Use

The user can execute the Integration through workflow as and when required.

Troubleshooting

  1. Error: Details: “Specify valid tax code”.

orderadd-image11

This error occurs when the Lookup mapping is not done or has not been done accurately. For troubleshooting this error, please go through the Lookup mapping section in this document.

Doing this, the user can successfully integrate this workflow.

  1. Error: Value too long in property TaxCode of DocumentLine troubleshooting-orderadd1-sapmage2

Solution: Users need to verify the mapping for the attribute TaxCode of the complex object DocumentLine. Users should also note that it might not always be the fault of the mentioned attribute. Any variables if called in its mapping should also be reviewed.

  1. Customer Record Not Found
    troubleshooting-orderadd2-sapmage2
    Solution: The error usually occurs when the Business Partner for the Order has not been synced or is not available in the destination application. Users need to sync the Business Partner before integrating the Order.

  2. Invalid value [RDR12.StateS][line:0] troubleshooting-orderadd3-sapmage2
    Solution: For troubleshooting this issue, user is required to map the attributes ShipToState & BillToState correctly (if already mapped) available under the ComplexObject “AddressExtension”. Verify & Rectify the XPATH provided in the mapping (if already Mapped) with the input packets generated by APPSeCONNECT.

Users are advised to Reset Cache and Reset Publish the workflow and Update Configuration in the agent before the executing the Resync Process.