Please find below details :
2.AWS lambda intent handler code
const DeliveryPercentage_Handler = {
canHandle(handlerInput) {
const request = handlerInput.requestEnvelope.request;
return (
request.type === "IntentRequest" &&
request.intent.name === "DeliveryPercentage"
);
},
async handle(handlerInput) {
const request = handlerInput.requestEnvelope.request;
const responseBuilder = handlerInput.responseBuilder;
let sessionAttributes =
handlerInput.attributesManager.getSessionAttributes();
var num2 = request.intent.slots;
if (num2) {
console.log("numb2");
console.log(JSON.stringify(num2));
output1 = "The sum of " + num2 + " and " + num2 + " is " + (num2 + num2);
}
// let dataResponse = await getShipmentInPercentage(1,"Delivery");
// let say = "Your delivery percentage is " + (dataResponse.percentage);
let say = "test " + num2.numbnew.value;
return responseBuilder
.speak(say)
.reprompt("try again, " + say)
.getResponse();
} };
3.Getting the slots with name but not the value in it
END RequestId: a260e0f4-69a5-47a0-bcb5-91020a1b94f6
REPORT RequestId: a260e0f4-69a5-47a0-bcb5-91020a1b94f6 Duration: 0.91 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 75 MB
START RequestId: 87e8761d-e725-43b6-bb83-a4ca93b3d6c3 Version: $LATEST
2020-02-28T12:41:15.391Z 87e8761d-e725-43b6-bb83-a4ca93b3d6c3 numb2
2020-02-28T12:41:15.391Z 87e8761d-e725-43b6-bb83-a4ca93b3d6c3
{
"numbnew": {
"name": "numbnew",
"confirmationStatus": "NONE"
}
}
END RequestId: 87e8761d-e725-43b6-bb83-a4ca93b3d6c3 REPORT RequestId: 87e8761d-e725-43b6-bb83-a4ca93b3d6c3 Duration: 247.16 ms Billed Duration: 300 ms Memory Size: 128 MB Max Memory Used: 76 MB
Slot log value is missing ** { "numbnew": { "name": "numbnew", "confirmationStatus": "NONE" } } **
Any help would be appreciated
Thanks in advance !