1
votes

I'm looking to build a single Alexa skill that can answer multiple questions. Using the Skill Builder on the Amazon developer site, I've been able to create a custom intent that handles one question and returns a response, but I can't see how, using the Skill Builder, to add a second custom intent to the skill (I can see how to add the second intent, but not how to tie it to a second AWS). The Skill Builder allows you to enter only a single AWS apn number to process the request, but I want a different AWS to handle each different type of question.

So, my skill name is Ventura County Information. My invocation is ventura county. I want to be able to say Alexa ask ventura county where do I report for jury duty (this would call the GetJuryDuty intent, which would call the getJuryDutyFunction in one AWS) and return the location for Jury Duty. Or, I want to be able to say Alexa ask ventura county where do I get a copy of my birth certificate (this would call the GetBirthCertificate intent, which would call the getBirthCertificateFunction in a different AWS) and return the location for Birth Certificates. I just can't figure out how to tie each Intent to the proper AWS apn, when the Skill Builder only gives me one slot for the apn number.

1

1 Answers

1
votes

As you found out you can only use one ARN for one given skill. so this results in writing all your code for this given skill in this one Function. (there is a thing that you can call a lambda function inside of another lambda function but we are not going this route). Now for your solution there are 2 options:

1.(recommended)

Look at this link for help on how to set this up: help me BUT here you need to take different utterances for every intent you want to call like:

{ask jury duty} where do i report for jury duty

{ask birth certificate} where do i get a copy of my birth certificate

this way Alexa will know which intent to call and your back end will know what to execute.

2.(do not recommend this because you need to write a lot of code yourself in the backend.)

{
  "intents": [   
    {
      "intent": "ask duty",
      "slots": [{
        "name": "Duty type", 
        "type": "DUTY_TYPE"
      }]
    }
    {
      "intent": "AMAZON.HelpIntent"
    },    
    {
      "intent": "AMAZON.CancelIntent"
    },    
    {
      "intent": "AMAZON.StopIntent"
    }    
  ]
}

where DUTY_TYPE is a custom slot with all your duty types. and utterances like:

{ask duty} where do i report for {duty type}

Now you can your skill like: Alexa ask ventura county where do I report for jury duty In your backend you just write some code to check what duty type it is and then execute this given code for this given duty type.

for any more help or clarification feel free to ask.