Enable user to save state

Is there a way with Shapediver to enable a client to save a design they have part worked on and come back to it later to complete and possibly purchase?

1 Like

Since you are mentioning clients saving and coming back later to finish their purchase, I will assume here that you have a user management system with all the relevant databases available. Therefore, your question amounts to saving the set of parameters that your users have worked on before they leave your configurator, and loading them again later when they come back.

The parameters interface of the API lets you read the current state of parameters and update them at will, therefore what you are trying to achieve is relatively easy. In order to save a configuration produced by a client of yours, just save the JSON response of the following API function:

let state = api.parameters.get().data;

When the user comes back, you can call the following function after the viewer is loaded:

let loadState = function(state) {
    let updateObject = [];
    for (let i=0; i<state.length; i++){
        updateObject.push({id: state[i].id, value: state[i].value});

We will be using a developer from a few Ezequiel has recommended to implement your API and embed in a website.
As such, the user management system and databases would be held by Shapediver, is this correct?

ShapeDiver does not provide anything besides access to your Grasshopper definitions in a cloud environment, as well as an online 3d viewer to visualize geometry included in those definitions. Everything else will have to be setup by your web developer. If Ezequiel recommended one, then they will be able to advise you on the best route to take.