Controlling Product State via URLs

Controlling Product State via URLs

 What Are State Paramaters?

These are the product state parameters that can be sent on the smartlink app. The product on the smartlink then loads with the state that is sent on the parameters.

It is useful when the front end platform requires certain states to be chosen outside the smartlink, for example, colour and size. Using this feature, the smartlink can load the product with the chosen color and size when the user clicks on Customize.

The following product states can be sent:
  1. Aspect options
  2. Text
  3. Images
  4. Attributes
  5. Print Sizes
  6. Variants
State URLs are a part of the core software and can therefore be used in any v3 app that has been updated to the latest version.

Aspect Options

The selected aspect option can be controlled using:

state[aspect][X][option]=Y

Where X is the name or ID of the target aspect and Y is the name, ID or SKU of the desired aspect option.
aspect option names currently do not support spaces when being called in state parameters.

Text

The default text for specific text areas can now be controlled using: 

state[text_areas][X][text]=Custom%20Gateway
Where x is the name, internal name or ID of the text area.

Please note that in both cases, if  X or Y have any spaces or other special characters, they must be encoded.

Names are case sensitive.

Images

The default image for specific image areas can now be controlled using:

state[image_areas][X][url]=Y
Where x is the name, internal name or ID of the Image area and Y is the publicly accessible image URL.
Please note that In both cases, if  X or Y have any spaces or other special characters, they must be encoded.
Note Names are case sensitive.

Attributes

The default attribute for specific attributes can be controlled using:

state[attribute][X]=Y

Where X is the name of the Group Name of the attribute, and Y is the Value of the attribute.
Note In both cases, if X or Y have any spaces or other special characters, they must be (encoded.)[https://meyerweb.com/eric/tools/dencoder/]

We can now send the Print sizes as state parameter on the url.

&state[print_size]=Print_Size

Where Print_Size:
  1. The Print Size ID
  2. The Print Size SKU
  3. The Print Size Description
Please note, the Print Size ID can be found from the variant export: variant.print_size_id (provided the variants are set up using the print sizes)
The Print Size SKU and print size Description can be found under Print Specification > Print Size

Variants

If the product has the variants set up (with the combination of Aspects, Attributes and Print Sizes), then the variant information combining all of them can be sent as state parameter on the url.

&state[variant]=Variant Name

where Variant Name = Attribute1 + Attribute2 + Aspect1+ Aspect2 + Print Size Description
So, for example if a product variant has the following it will appear like so - Aspect1=Red (Front), Aspect2=Red (Back), Print Size Description=Large and No Attributes would need to be set as &state[variant]=Red Red Large.
Please note that with Variants, all standard apps except digital3, eris and 3coloumn3 (which do not display size option currently) are updated with variants.

Examples

We have added a selection of different examples of this as shown below:
  1. Aspect Example
  2. Aspect Example 2
  3. Attribute Example
  4. Image Area Example
  5. Text Area Example
  6. Print Size Example
  7. Variants Example

    • Related Articles

    • Product Creation Services | Virtual Products - Production Spreadsheet

      What information do we request and why? Before we can begin production of your Virtual products we will contact you to ask for image assets and also setup information / data. We have a predefined Production Spreadsheet that you will be asked to ...
    • Product Manager | Updates

      Introduction As part of all products within Catalog > Product Manager there is an option to add updates to products. For example, if a blank product has had a range of new aspect option colours or print sizes added there will be a history audit trial ...
    • Product Creation Services | Blank Products - Production Spreadsheet

      What information do we request and why? Before we can begin production of your Blank products we will contact you to ask for image assets and also setup information / data. We have a predefined Production Spreadsheet that you will be asked to ...
    • Product Integration | Walmart Marketplace

      Introduction This article has been written to aide with setting up the Kornit X Product integration with the Walmart Marketplace platform. This This type of integration allows you to send products from the platform to Walmart marketplace connected ...
    • Product Integration | Salesforce

      Introduction This article has been written to aide with setting up the Kornit X Product integration with the Salesforce Ecommerce platform. This This type of integration allows you to send products from the platform to Salesforce connected via the ...