Skip to main content
All CollectionsAdvanced HelpIntegrationsDIY Integration
DIY Live Pricing — Real-Time from the ERP
DIY Live Pricing — Real-Time from the ERP

DIY Live pricing integration can lookup pricing to the ERP for all products on the screen and also support swaps and product badges

Niall Diamond avatar
Written by Niall Diamond
Updated over 5 months ago

Setup DIY Live Pricing

If you are an integrator (e.g. DCKAP) or have a development team that is running your own integration with EvoX, you can use the below to setup your own live pricing integration. Simply choose the "ErpLivePricing" as the provider.

Enable Endpoint in Admin

Once you have created an API endpoint to support the ERP Live Pricing integration (see example request and response below) then you can configure the EvolutionX store in Admin Settings → Settings → Store Preferences and enter the following:

  • Provider: ErpLivePricing

  • Endpoint URL: [endpoing url starting with https://]

  • Password (used in the authorization header):

    • [Authorization] for Bearer Token and OAuth2.0.

    • [custom key] for Username & Password.

  • Token (used in the authorization header):

    • [your bearer token] for Bearer Token (We automatically apply the "bearer").

    • [custom password] for Username & Password.

    • For OAuth 2.0, a token should already be placed.

Example Live Pricing Request and Response

EvolutionX can code for new live pricing integrations. EvolutionX includes an account code and one or many products in a single request. If, for example, we send 12 products in the list and you are unable to find one of them in the ERP, we would ask that your response includes the item and pricing that you did find (you can either not include the missing item or include it with an error message in your response, along with the item prices of the found products).

This is an example Live Pricing Request:

Request Header

Notes:

  • Authorization types supported:

    • Bearer Token

    • Username & Password

    • oAuth2 requires OAuth2.0 app in EvolutionX

  • The Method for the endpoint should be POST.

Example Request Header:

Content-Type: application/json
Accept: application/json
Authorization: [token]

Request Body

Notes:

  • The Customer Code and Item SKU will use the references of the ERP. It is not required for the ERP to store EvolutionX IDs for these entities.

  • customer_code — EvolutionX uses the Customer record account_number field value

  • seller_reference — This is optional, EvolutionX uses the Customer record seller_reference field value if set.

  • location_id — Deprecated field.

{
"customer_code": "ACME001",
"seller_reference": "002",
"products": [
{
"item_sku": "ABC-100",
"uom": "ea",
"qty": 1
},
{
"item_sku": "AAA-200",
"uom": "ea",
"qty": 1
}
]
}

Response Body

Notes:

  • HTTP Response Status

    • Return HTTP response status 2xx for success if the request is correctly sent, even if SKUs did not exist in the ERP.

    • Return HTTP response status 4xx for malformed requests

    • Return HTTP response status 5xx for internal errors

  • Not all SKU items in the request must be returned, if an item is not found it can be excluded from the response list. Do not fail a request if SKU items are not found, instead return what is found or an empty list.

  • Not all fields are required in the response, the most critical ones are the SKU and the Unit Price for each item returned

  • The price_source_type field can be added to the product to be used when creating Live Pricing Badges. Refer to Live Pricing Badges for more details.

{
"status": "success",
"data": [
{
"customer_code": "ACME001",
"item_sku": "ABC-100",
"uom": "EA",
"qty": 1,
"unit_price": "56.02",
"price_source_type": "S"
},
{
"customer_code": "ACME001",
"item_sku": "AAA-200",
"uom": "EA",
"qty": 1,
"unit_price": "150.22"
}
]
}

If the price_source_type has a value and the Live Pricing Badges are set in the store, a badge will be displayed in the corresponding item on the storefront.

Postman Overview

As previously mentioned, when the password field value is set to "Authorization", the Bearer will be automatically attached at the beginning of the token value.

We have a brief preview on Postman that can help visualising the expected behaviour:

Live Item Swaps

Live Swaps is an extension to Live Pricing, enabling your store to change/suggest a new item after the user selecting it. This feature is optional and is going to depend on the structure provided.

Alternative to Live Item Swaps

EvolutionX has the Item Swaps feature built in. Learn more about in this article.

Live Item Swaps Examples

Sugestive Swap

Force Swap

A suggested swap will allow the customer to add the original item or suggested item to basket.

A forced swap will allow only the swapped item to be purchased.

Example Live Item Swaps Response

Being an extension of Live Pricing, the headers and request are the same. The change needed to enable this feature is only on the response and is expected in the same endpoint as Live Pricing.

Request Header

Request Body

Response Body

Notes:

  • It's accepted for each item an limit of 10 swaps.

  • The field swaps is optional.

  • If the field swaps is provided, all fields within the object are required.

  • Type options:

    • 1 - Suggestive.

    • 2 - Force.

  • For a better user experience when provided a force swap, keep in mind the price should be the same (a user might not like to be force to select an item with higher price).

{
"status": "success",
"data": [
{
"customer_code": "ACME001",
"item_sku": "ABC-100",
"uom": "EA",
"qty": 1,
"unit_price": "56.02",
"price_source_type": "S",
"swaps": [
{
"type": 1,
"sku": "ABC-200",
"uom": "EA",
"unit_price": "36.02",
"stock": 10
},
{
"type": 1,
"sku": "ABC-300",
"uom": "EA",
"unit_price": "26.02",
"stock": 1
}
]
},
{
"customer_code": "ACME001",
"item_sku": "AAA-200",
"uom": "EA",
"qty": 1,
"unit_price": "50.22",
"swaps": [
{
"type": 2,
"sku": "AAA-250",
"uom": "EA",
"unit_price": "20.22",
"stock": 10
}
]
}
]
}

ERP DIY Integration

To use this feature you need the ERP DIY Integration App see the full article.


Contact the customer success team to discuss a new Live Pricing integration project.

Did this answer your question?