Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can attached 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": []

Code Block
{
  "shelf2shelf": {
    "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=Cnsic2hlbGYyIjp7InNldDpkaXNhYmxlZF9wcm9kdWN0cyI6WyJhNTQxNDYyNDMyMTAwMCIsICJQSUQwMDk5MzciXX19

The full URL will be similar to the below:

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