# Web shop integrations

Here we will discuss some use cases which are often implemented for web shop integrations. Of course you can do a lot more (for details see our reference) but to give you an idea what central building blocks of a web shop integration could be.

# Interesting data

When a configuration is changed and the part list is altered the event roomleConfigurator.getApi().callbacks.onPartListUpdate is called. You will receive the part list (to learn about the part list see our reference, our type definitions of the Roomle Web SDK package or the scripting docu (opens new window)). The part list consists of all the relevant parts which are necessary for your web shop. Ideally the part list can be used by your inventory management system (opens new window). With the part list you can calculate prices, create a shopping cart etc. This is quite handy because you only need to write a small integration logic to merge your data with the current part list. This makes it easy to manage the content only in one place, for example prices or stock. When the user decided to finish custimization of the product it makes sense to save the configuration. Therefore just call roomleConfigurator.getApi().saveCurrentConfiguration(). When the saving process is finished you will get a configuration ID (for details see). This ID is specific to the current configuration and enables to load this exact configuration again (see). Also the response contains a perspective image which can be used to show the apperance of the current configuration in the shopping cart or somewhere you want.

When the user checks out, for example, you can use the information from the part list and the perspective image to create an appealing checkout overview.

# Landing page

Also it makes sense to create a landing page which can handle all IDs which are Roomle specific. This is necessary if a user saves the configuration and the drops out of the checkout process. If you know the ID and if you have a landing page you can redirect the user back to this page and she or he can start from where she or he stopped. Also we recommend creating a short url for your landing page because the configuration IDs are quite long (due to the hash, see).