async handle()

in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js [79:92]


    async handle(handlerInput) {
        var speakOutput = 'Error getting customer count. Please check logs'
        try{
            var path = '/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/BusinessPartnerSet/$count'
            var response = await getDataFromSAP(handlerInput,path,'GET',null,null,'application/json')
            speakOutput = 'You have a total of ' + response.body + 'customers' ;
        }catch(e){
            speakOutput = 'Error getting customer count. Please check logs'
        }
        return handlerInput.responseBuilder
                .speak(speakOutput)
                .reprompt(speakOutput)
                .getResponse();
    }