Skip to main content

Can I also display data from an external service?

Imagine you want to set up a configurator for prefabricated houses and have a loan calculator. You want to display its results in the configurator.

Call up service​

  • Open the editor of your configurator.
  • Click on
    Loading...
    in the sidebar.
  • Click on
    Loading...
    .
  • Here you can now specify
    • a URL to which the K3 sends a POST request.
    • a time span in milliseconds. There is a wait of at least this long between two requests (debounce).
    • Whether characteristic values should be sent.
    • And if so, which ones. An entry here also reduces the calls to your service.
    • Whether articles and the current price should also be sent.

We then call your service after every change made by the user. As a result, we expect a JSON document with a structure like this:

{
"json": {
"shippingPrice": 123.12,
"dealerCount50Km": "value",
"dealerCount100Km": "value",
"dealerCount150Km": "value",
"test": "value"
}
}

Display information​

  • Switch to
    Loading...
    in the sidebar.
  • Switch to the layout editor by clicking on the pencil at the top of the new mobile/desktop selection.
  • If you have not already done so, click on
    Loading...
    .

You can now add a component of the type

<CustomData key="path.im.Json"/>

in the layout, for example:

<CustomData key="shippingPrice" />

insert. The text from the selected location in the JSON document is then output at this point.