Hemi Connectors / Fuse5 Technical Scope / Fuse5 Create Orders

Fuse5 Create Orders

Version Date Created / Updated Notes
v1.0 02/05/2025 Hristiyan First publish
v1.1 30.05.2025 Bogomil Remove the requirement for order acknowledged.
v1.2 09/07/2025 Hristiyan Mapping changes

Create Orders

In order to forward the order to Fuse5 apart from the order data we need to push the Fuse5 Account and Fuse5 Location which we have to obtain with additional calls and properly setup the connector. You can view the scopes for Fuse5 Get Accounts and Fuse5 Get Locations

If any of the Channel Fuse5 Connector > Fuse5 Account Number or the Channel Fuse5 Connector > Fuse5 Location is missing when trying to create an order in Fuse5, we want to store an internal Order Error with Type = Connector stating that either the Fuse5 Location or Fuse5 Account or both is/are missing.

API Docs : https://greenteam.fuse5live.com/f5apidoc/standalone/#api-Sales_Order-Create_Sales_Order

API Call : sales_order/create

<v1.1>We want to create order in Fuse5 when we have the shipping cost splitted, debundled and the following statuses/flags :</v1.1>

Order > Connector Order ID = "" AND Product on Order > Connector ID = "" Product on Order > Seller != '' AND Order > Connector Error = ""

We want to check which order and item statuses we will export based on the Fuse5 Connector > Order status for export and Fuse5 Connector > Order items for export

Example Request:

{
    "authenticate":{
       "apikey": "RvDYVek0LHwq32WgKGe3Xyil8Gp8cUWN"   
    },
    "services":[        
        {
            "call":"sales_order/create",
            "params":{      
                "account_number":"000500", 
                "sales_order_track_id":"987654321",
                "sales_order_location":"Bora Bora",
                "tracking_number":"",
                "price_override":{
                    "subtotal":160.00,
                    "tax": 0.10,
                    "discount":0.00,
                    "handling":0.00,    
                    "shipping":5.30,
                    "total":180.00            
                },
                "billing_address":{
                    "name" : "Dum Taki",
                    "phone" : "(319) 248-5658",

                    "pobox" : "",
                    "city" : "Sofia",
                    "state" : "Sofia",
                    "county" : "",
                    "country" : "Bulgaria",
                    "code" : "1700"
                },
                "shipping_address":{
                    "name" : "Dum Taki",
                    "phone" : "(319) 248-5658",
                    "street" : "Dimitar Blagoev",
                    "pobox" : "",
                    "city" : "Sofia",
                    "state" : "Sofia",
                    "county" : "",
                    "country" : "Bulgaria",
                    "code" : "1300"
                },              
                "products":[
                    {
                        "line_code":"PML",
                        "product_number":"Product1",
                        "quantity":"1",
                        "price":30.00
                    },
                    {
                        "line_code":"PML",
                        "product_number":"Product10",
                        "quantity":"1",
                        "price":60.00
                    }
                ]
            }
        }
    ]
}

Request Mapping (please note if any info is missing we send the node empty unless specifically stated in the notes):

Fuse5 Field Hemi Field Notes
params
account_number Channel Fuse5 Connector > Fuse5 Account Number
<v1.2> customer_purchase_order_number</v1.2> Orders > Marketplace Order ID
sales_order_location Channel Fuse5 Connector > Fuse5 Location
tracking_number Order Shipment > Tracking Number We want to send it if we have it. Incase we have more than one shipment, we want to consolidate the trackings and send them separated by comma.
price_override
subtotal Orders > Order Subtotal Amount
tax Orders > Total Sales Tax

OR Orders > Total Vat OR Orders > Total Marketplace VAT | This would depend on Channel > Country IF we have Country = United States we use the Total Sales Tax field, IF we have Country != United States we use Total Vat OR Total Marketplace VAT Total Marketplace VAT is with priority. We must have a logic and send “0” if the field is empty in MCPro | | | | discount | | Orders > Discount Value | We must have a logic and send “0” if the field is empty in MCPro | | | | handling | | | We must hardcode it as “0” | | | | shipping | | Orders > Shipping Service Cost | We must have a logic and send “0” if the field is empty in MCPro | | | | total | | Orders > Order Total Amount | | | | billing_address | | | | | | | | name | | Orders > Billing Name | | | | | phone | | Orders > Billing Phone | | | | | street | | Orders > Billing Street 1 | | | | | pobox | | Orders > Billing Street 2 | | | | | city | | Orders > Billing City Name | | | | | state | | Orders > Billing State Province | | | | | county | | N/A | | | | | country | | Orders > Billing Country Name | | | | | code | | Orders > Billing Postal Code | | | | shipping_address | | | | | | | | name | | Orders > Shipping Buyer Name | | | | | phone | | Orders > Shipping Phone | | | | | street | | Orders > Shipping Street 1 | | | | | pobox | | Orders > Shipping Street2 | | | | | city | | Orders > Shipping City | | | | | state | | Orders > Shipping State Province | | | | | county | | N/A | | | | | country | | Orders > Shipping Country Name | | | | | code | | Orders > Shipping Postal Code | | | | products | | | | | | | | line_code | | | This will be part of the SKU so we need to pick it from Product In Order > SKU . The sku will be in format line_code-product_number (with a delimiter that will be picked from Connector Fuse5 > SKU Delimiter) Example SKU : EMP-025-141-031. We need to split the sku (based on the delimiter) and send only the line_code part of it in this field. In the case of the example, this will be “EMP”. If for some reason we have empty delimiter, we need to return internal error in Order Errors with Type = Connector stating that we cannot export the order as we are unable to split the line code and product number | | | | product_number | | | This will be part of the SKU so we need to pick it from Product In Order > SKU . The sku will be in format line_code-product_number (with a delimiter that will be picked from Connector Fuse5 > SKU Delimiter) Example SKU : EMP-025-141-031. We need to split the sku (based on the delimiter) and send only the product_number part of it in this field. In the case of the example, this will be “025-141-031”).If for some reason we have empty delimiter, we need to return internal error in Order Errors with Type = Connector stating that we cannot export the order as we are unable to split the line code and product number | | | | quantity | | Product In Order > Quantity | | | | | price | | Product In Order > Item Price | |

Sample Response:

{
    "authenticate": {
        "apikey": "RvDYVek0LHwq32WgKGe3Xyil8Gp8cUWN",
        "status": "success"
    },
    "services": [
        {
            "request": {
                "call": "sales_order/create",
                "params": {
                    "account_number": "000500",
                    "sales_order_track_id": "1234576",
                    "sales_order_location": "Bora Bora",
                    "tracking_number": "",
                    "price_override": {
                        "subtotal": "160",
                        "tax": "0.1",
                        "discount": "0",
                        "handling": "0",
                        "shipping": "5.3",
                        "total": "180"
                    },
                    "billing_address": {
                        "name": "Dum Taki",
                        "phone": "(319) 248-5658",
                        "pobox": "Street 2",
                        "city": "Sofia",
                        "state": "Sofia",
                        "county": "",
                        "country": "Bulgaria",
                        "code": "1700"
                    },
                    "shipping_address": {
                        "name": "Dum Taki",
                        "phone": "(319) 248-5658",
                        "street": "Dimitar Blagoev",
                        "pobox": "Street 2",
                        "city": "Sofia",
                        "state": "Sofia",
                        "county": "",
                        "country": "Bulgaria",
                        "code": "1700"
                    },
                    "products": [
                        {
                            "line_code": "PML",
                            "product_number": "Product1",
                            "quantity": "1",
                            "price": "30"
                        },
                        {
                            "line_code": "PML",
                            "product_number": "Product10",
                            "quantity": "1",
                            "price": "60"
                        }
                    ]
                },
                "identifier": {
                    "apitype": "Standalone"
                }
            },
            "response": {
                "status": true,
                "msg": [
                    {
                        "M004": "Record saved successfully"
                    }
                ],
                "data": {
                    "sales_order_id": "7269537",
                    "sales_order_number": "S1-173677",
                    "tracking_number": ""
                }
            }
        }
    ]
}

Response Mapping:

Fuse5 Field Hemi Field Comment
msg
M004 N/A
data
sales_order_id Orders > Connector Id

AND

Product In Order > Connector Id | | | | sales_order_number | Orders > Selling Manager SalesRecordNumber | | | | tracking_number | N/A | |

Sample Error Response:

{
    "authenticate": {
        "apikey": "RvDYVek0LHwq32WgKGe3Xyil8Gp8cUWN",
        "status": "success"
    },
    "services": [
        {
            "request": {
                "call": "sales_order/create",
                "params": {
                    "account_number": "000500",
                    "sales_order_track_id": "12345764",
                    "sales_order_location": "Bora",
                    "tracking_number": "",
                    "price_override": {
                        "subtotal": "160",
                        "tax": "0.1",
                        "discount": "0",
                        "handling": "0",
                        "shipping": "5.3",
                        "total": "180"
                    },
                    "billing_address": {
                        "name": "Dum Taki",
                        "phone": "(319) 248-5658",
                        "pobox": "",
                        "city": "Sofia",
                        "state": "Sofia",
                        "county": "",
                        "country": "Bulgaria",
                        "code": "1700"
                    },
                    "shipping_address": {
                        "name": "Dum Taki",
                        "phone": "(319) 248-5658",
                        "street": "Dimitar Blagoev",
                        "pobox": "",
                        "city": "Sofia",
                        "state": "Sofia",
                        "county": "",
                        "country": "Bulgaria",
                        "code": "1300"
                    },
                    "products": [
                        {
                            "line_code": "PML",
                            "product_number": "Product1",
                            "quantity": "1",
                            "price": "30"
                        },
                        {
                            "line_code": "PML",
                            "product_number": "Product10",
                            "quantity": "1",
                            "price": "60"
                        }
                    ]
                },
                "identifier": {
                    "apitype": "Standalone"
                }
            },
            "response": {
                "status": false,
                "msg": [
                    {
                        "E006": "Bora: "
                    }
                ],
                "data": []
            }
        }
    ]
}

When we have an error response, we will have a status = false. In this case we will have the error message in the msg object. We want to store the message into Order Error with Type = Connector and into Order > Connector Error

Is this article helpful?
0 0 0