window.twikit.checkConfiguration checks the validity of an existing configuration based on the configuration id.

window.twikit.checkConfiguration(configurationId, startupParameters): Promise<Object{}>
CODE

Example usage

Make sure the plugin script is fully loaded before checking the validity of a configuration.

JavaScript

window.twikit.checkConfiguration(configurationId, startupParameters)
  .then(function(result) {
    console.log('checkConfiguration result', result);
  }) ;
JS

Parameters

Name

Type

Required

Description

configurationId

string

yes

Key of the previously created configuration to check the validity on.

startupParameters

Object{}

no

Object with parameter settings to use when starting the configurator. This can be used to enable or disable parameter options given a startup value.

E.g. In a car configurator, a limited set of interior colors is available given a preselected exterior car color.

Returns

Type

Required

Description

Object{}

yes

An object with status as the most severe status of the issues and an array of issues. The object has the following structure:

{
    status: 'OK'|'INFO'|'WARNING'|'ERROR'|'FATAL' ,  // The most severe status of the issues.
    issues: {
      level: 'INFO'|'WARNING'|'ERROR'|'FATAL' ,  // The status of the issue.
      error: 'PARAMETER_MISSING_FROM_PRODUCT|OPTION_MISSING_FROM_PRODUCT|PARAMETER_UNUSED' // The actual error.
      parameter: String // The id of the parameter concerning the issue.
      value?: String // The value of the parameter in the configuration
    } []
} 
CODE

If there are no issues, status is OK and issues is an empty array.