eCommerce Communication

If eCommerce will be used to send emails or monitor order status updates and handle final payment processes, a Web Hook must be implemented so Commerce Service can send messages and requests from LS Central over to the eCommerce platform.

Status

Payment

Shipping

Set the URL to the Web Hook in the Appsetting.config file:

<add key="ECom.Url" value="" />

“Demo” can be set as URL value for demo purposes and Commerce Service will always reply to LS Central with an OK and without trying to communicate with the eCommerce platform.

Functionality profile should include the URL to Commerce Service:

LS Central can send Order status updates when Customer Order status changes.

  1. To activate communication from LS Central to Commerce Service, go to Customer Order Setup.
  2. Select the Send Omni Messages check box, and select the correct Commerce Functionality Profile ID (the Omni Func. Profile ID field) that includes the URL to Commerce Service.

  3. Go to the Customer Order Line - Processing Status Setup page, and select all Send Omni Message check boxes that you want to be broadcast back to eCommerce for status.

Status

When LS Central broadcasts Order status update, Commerce Service will contact the eCommerce web hook and send an orderstatus message.

Copy

OrderMessageStatus object

{
    "OrderId": "CO000111",
    "CardId": "",
    "HeaderStatus": "RECEIVED",
    "ExtOrderStatus": "",
    "MsgSubject": "your order 001",
    "MsgDetail": "is ready for delivery",
    "Lines": [{
            "LineNo": "1",
            "PrevStatus": "NEW",
            "NewStatus": "PICKING",
            "ExtLineStatus": "",
            "ItemId": "40020",
            "VariantId": "001",
            "UnitOfMeasureId": "PCS",
            "Quantity": 1.0,
            "Amount": 99.0
        }
    ]
}

Statues will include the Status Code used in LS Central.

MsgSubject and MsgDetail will have data if the email data to be sent is formatted by LS Central.

Payment

At time of Posting a Sales Order, a Finalized Payment request will be sent, if a Pre-Authorized payment token was taken when the order was created. To get Final payment confirmation from the payment provider, Commerce Service will contact the web hook and send the orderpayment command.

Copy

OrderMessagePayment object

{
    "OrderId": "CO00001",
    "Status": 1,
    "Token": "1234",
    "Amount": 100,
    "CurrencyCode": "GBP",
    "AuthCode": "1234",
    "Reference": "1234",
    "Lines": [{
        "LineNo": "1",
        "ItemId": "40020",
        "VariantId": "001",
        "UnitOfMeasureId": "PCS",
        "Quantity": 1.0,
        "Amount": 99.0
    }]
}

Status:

0: Customer order is unchanged, same amount and all items delivered

1: Customer order is changed since web order

2: Customer order was canceled

Copy

OrderMessageResult object

{
    "message": "Command posted successfully",
    "success": true
}

Response string should be OK if everything is OK, otherwise an error message is sent from the payment provider.

Shipping

When an order is ready for shipping, a Shipping request will be sent, Commerce Service will contact the web hook and send the ordershipping command.

Copy

OrderMessageShipping object

{
    "OrderId": "CO00001",
    "TrackingId": "123456",
    "TrackingUrl": "http://fedex.com/1234",
    "Provider": "FedEx",
    "Service": "GROUND",
    "Lines": [{
        "LineNo": "1",
        "ItemId": "40020",
        "VariantId": "001",
        "UnitOfMeasureId": "PCS",
        "Quantity": 1.0,
        "Amount": 99.0
    }]
}
Copy

OrderMessageShippingResult object

{
    "message": "Command posted successfully",
    "success": true,
    "trackingInfo": [{
            "trackingId": "123456",
            "trackingUrl": "http://fedex.com/1234",
            "shipmentProvider": "FedEx",
            "service": "GROUND"
    }]
}