/
Disable a product using Base64 custom_params

Disable a product using Base64 custom_params

When creating an out of stock or product substitution scenario, it is useful to disable already bought products by the respondent. This is how you can do this using the Base64 custom_params variable.

You can attach a base64 &custom_params= that will then disable the product on the shelf. This is useful for setting up out of stock scenarios.

To disable a specific product(s), we shall add &custom_params to the link. At this point, you need to open a JSON to base64 converter like JSON to Base64 Converter to edit the custom params as this is what will carry the information on what SKU(s) to disable. Additionally, a new flag grey_out_runtime_disabled_products can be included to determine whether disabled products should be visually greyed out or not.

Edit the JSON object below, and make sure you know what the block_id for the shelf is. In this case, shelf2 is the block_id. The set keyword can be replaced with append if there is another source of disabled products other than the custom params for example if there is a logic block disabling products that you don’t wish to overwrite. Using the clear key word will clear the disabled products list for a shelf, and this would take an empty list like "clear:disabled_products": []

{ "shelf": { "set:disabled_products": [ "a5414624321000", "PID009937" ], "set:grey_out_runtime_disabled_products": true } }
  • "shelf2": Replace this with the appropriate block ID of the shelf where the products are located.

  • "set:disabled_products": Specify an array of SKUs (product identifiers) that should be disabled.

  • "set:grey_out_runtime_disabled_products": Set this flag to true to visually grey out disabled products or false to keep them in their original appearance. This flag determines whether the disabled products are selectable or not.

Convert the JSON object to a base64 string using a JSON to Base64 converter tool. The resulting base64 string should look similar to this:

ewogICJzaGVsZjIiOiB7CiAgICAic2V0OmRpc2FibGVkX3Byb2R1Y3RzIjogWwogICAgICAiYTU0MTQ2MjQzMjEwMDAiLAogICAgICAiUElEMDA5OTM3IgogICAgXSwKICAgICJzZXQ6Z3JleV9vdXRfcnVudGltZV9kaXNhYmxlZF9wcm9kdWN0cyI6IHRydWUKICB9Cn0=

This is what will be the custom_param

&custom_params=ewogICJzaGVsZjIiOiB7CiAgICAic2V0OmRpc2FibGVkX3Byb2R1Y3RzIjogWwogICAgICAiYTU0MTQ2MjQzMjEwMDAiLAogICAgICAiUElEMDA5OTM3IgogICAgXSwKICAgICJzZXQ6Z3JleV9vdXRfcnVudGltZV9kaXNhYmxlZF9wcm9kdWN0cyI6IHRydWUKICB9Cn0=

The full URL will be similar to the below:

https://survey.rose.conceptsauce.io/?param_id=PRMS01G131YR8CY59W6KMJ1H5PKX6Q&respondent_id=preview&custom_params=ewogICJzaGVsZjIiOiB7CiAgICAic2V0OmRpc2FibGVkX3Byb2R1Y3RzIjogWwogICAgICAiYTU0MTQ2MjQzMjEwMDAiLAogICAgICAiUElEMDA5OTM3IgogICAgXSwKICAgICJzZXQ6Z3JleV9vdXRfcnVudGltZV9kaXNhYmxlZF9wcm9kdWN0cyI6IHRydWUKICB9Cn0=

 

Related content

Disable Products
Disable Products
More like this
Conjoint Options
Conjoint Options
More like this
Disable Products Sub Type Block
Disable Products Sub Type Block
More like this
Setting up out-of-stock exercises with ghost shelves
Setting up out-of-stock exercises with ghost shelves
More like this
Change Findability SKU
Change Findability SKU
More like this
Logic Block
Logic Block
More like this

©2020 ConceptSauce ltd / For further help please contact us directly on Team@conceptsauce.io