Documentation

Welcome to the cieblinkSDK module! This module allows customers to embed different functionalities of the Cieblink website directly in a frame that will allow them to communicate between their website and Cieblink.

Getting Started

Getting started with the cieblinkSDK module is incredibly easy. All you need to do is include the cieblink-sdk.js script in your HTML file by adding the following line to the section of your document:

<script src="https://sdk.ciemetric.com/sdk/cieblink-sdk.js"></script>

Once you've included the cieblink-sdk.js script in your HTML file, you'll have access to all the methods provided by the cieblinkSDK global object. This will allow you to interact with the Cieblink website directly from your own website and to access all the features provided by the cieblinkSDK module.

cieblinkSDK

The `cieblinkSDK` global variable is the object that you will use to interact with the Cieblink SDK module. This object contains all of the methods and properties that you will need to use the module and configure your products and recipes.

OpenProductConfiguration

The OpenProductConfiguration method is used to configure a cabinet or product using the Cieblink website. To use this method, you'll need to use the OpenProductConfiguration method from the cieblinkSDK module. Here's an example of how to use this method:

            
cieblinkSDK.OpenProductConfiguration({
    key: "cieblinkTest",
    cabinet: cabinet,
    ref_type: "order",
    ref_id: "123456",
    onSave: (recipe) => {
                //doSomething(recipe)
    }
}).render('#element');
            
        

Following the initialization of the recipe configurator, it is important to call the render() method, otherwise the element will not render.

Here below are the different props the method can use :

            
            env: string [ "dev" | "lab" | "production"];
            key: string;
            ref_type: string;
            ref_id: string;
            dimensions (optional) : object;
            recipe: object;
            onSave: (optionsRecipe : string) => void;
            
        

OpenRecipeConfiguration

The OpenRecipeConfiguration method is used to configure a recipe using the Cieblink website. To use this method, you'll need to use the OpenRecipeConfiguration method from the cieblinkSDK module. Here's an example of how to use this method:

            
cieblinkSDK.OpenRecipeConfiguration({
    key: "cieblinkTest",
    recipe: recipe,
    ref_type: "order",
    ref_id: "123456",
    onSave: (recipe) => {
                //doSomething(recipe)
    }
}).render('#element');
            
        

Following the initialization of the recipe configurator, it is important to call the render() method, otherwise the element will not render.

Here below are the different props the method can use :

            
            env: string [ "dev" | "lab" | "production"];
            key: string;
            ref_type: string;
            ref_id: string;
            dimensions (optional) : object;
            recipe: object;
            onSave: (optionsRecipe : string) => void;