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 LS Commerce Service can send messages and requests from LS Central over to the eCommerce platform.

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 LS 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 LS Commerce Service:

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

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

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

Copy

orderstatus data

{
    "OrderId": "CO000111",
    "CardId": "",
    "HeaderStatus": "RECEIVED",
    "MsgSubject": "your order 001",
    "MsgDetail": "is ready for delivery",
    "Lines": [{
        "LineNo": "1",
        "PrevStatus": "NEW",
        "NewStatus": "PICKING"
    }]
}

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.

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, LS Commerce Service will contact the web hook and send the orderpayment command.

Copy

Order Payment object

{
    "document_id": "CO00001",
    "status": 1,
    "token": "1234",
    "amount": 100,
    "authcode": "1234",
    "reference": "1234"
}

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

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