getMissions
Get all the missions of your program
You must have set some missions in your configuration to get a result.
Description
Get all the missions of your configuration.
Response
Returns a Promise
containing an array
of mission object
. Example with two configured missions:
[
{
name: "Laisse 5 avis avec photo",
icon_url: "{{iconUrl}}",
image_url: "{{imageUrl}}",
nqp_value: 75,
conditions: [
{
name: "Sur notre site internet ou notre application",
description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea."
},
{
name: "En boutique",
description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea."
}
],
description: "Gagnez 75 points en laissant 5 avis avec une photo",
external_id: "review_picture"
},
{
name: "Nous suivre sur Instagram",
color: "var(--splio-color-font-on-general)",
icon_url: "{{iconUrl}}",
image_url: "{{imageUrl}}",
nqp_value: 30,
conditions: [
{
name: "Sur notre site internet ou notre application",
description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea."
}
],
description: "Gagnez 30 points en suivant notre compte @pophat sur Instagram",
external_id: "instagram"
},
]
Code example
splioSDK.getMissions().then((missions) => {
console.log('First Mission description', missions[0].description);
console.log('Second Mission NQP Value', missions[1].nqp_value);
});
Updated over 1 year ago