1. Help Center
  2. ShoeAI Documentation
  3. Additional Documentation ShoeAI Scripts

Shoe Questions

This article describes how your customized shoe questions are loaded. You will receive an individual json file from us.

Add a script at the end of the page with id ssm_pages and type application/json, add and paste inside the JSON file that you got provided by us.  

<script type="application/json" id="ssm_pages"></script>

SAMPLE OF JSON

{
"pages":[
{
"data_name":"gender",
"content":[
{
"title": {
"default":"Footwear I am looking for",
"es":"Zapatos que me interesan",
"fr":"Chaussures que je recherche"
},
"layout":{
"columns":2,
"design":"hover"
},
"blocks":[
{
"image": "https://images.unsplash.com/photo-1545151414-8a948e1ea54f?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=687&q=80",
"text": {
"default":"Women",
"es":"Mujer"

},
"value":"women",
"map_value":"female"
},
{
"image": "https://images.unsplash.com/photo-1554068865-24cecd4e34b8?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80",
"text": {
"default":"Men",
"es":"Hombre"

},
"value":"men",
"map_value":"male"

}, {
"image": "https://images.unsplash.com/photo-1581079708051-9784b310349f?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1153&q=80",
"text": {
"default":"Kids",
"es":"Niños"

},
"value":"kids",
"map_value":"kids"

}

]
}
]
},
{
"data_name":"shoe_type",
"content":[
{
"title": {
"default":"Tennis shoes I am looking for",
"es":"Zapato de tenis que me interesa"
},
"layout":{
"columns":2,
"design":"hover"
},
"blocks":[
{
"image": "https://www.detenis.top/wp-content/uploads/2020/03/tipos-de-pistas-tenis.jpg",
"text": {
"default":"All Court Shoes"
},
"value":"all_court"
},
{
"image": "https://images.pexels.com/photos/209977/pexels-photo-209977.jpeg",
"text": {
"default":"Clay Court"

},
"value":"clay_court"
},
{
"image": "https://images.pexels.com/photos/60689/tennis-sport-paddle-ball-60689.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2",
"text": {
"default":"Grass Court"
},
"value":"grass_court"
}
]
}
]
}
]
}

CALLBACK PAYLOAD

If the ShoeFinder experience is enabled, the ShoeSize callbacks will return a Pages object having as keys the name of each page. Each page name can be found in the  JSON as "data_name" parameter. 

The page object will contain a value parameter equal to the value set inside the block object selected in the UI
Only the value parameter is necessary, the map_value is for internal use only. 

{ 
...
pages:{
gender:{
value":"men",
map_value":"male
},
shoe_type:{
value:"shell_cordovan",
map_value:¡null
}
}
}