Inspiration

My partner runs a non for profit animal rescue group who specialise in taking in foster animals and ensuring they are re-homed by families who will be able to love and care for them. One of the problems that is noticeable when spending any time in these groups is that the organisation can be very up in the air and disjointed.

The problem I wanted to try to solve is that one where rescue volunteers and soon to be new owners should be able to seamlessly interact with the public database of animals currently in our care.

Try it

WA Animals Adoption is an Alexa skill that processes requests about Adoption, animal traits and location and returns this data in a friendly manner via Alexa. Some of the supported Intents are:

  • Alexa, Open WA Animals Adoption and tell me about Felix

  • Alexa, Open WA Animals Adoption and find whether Frankie has been adopted

  • Alexa, Open WA Animals Adoption and tell me how to adopt

  • Alexa, Open WA Animals Adoption and tell me where Frankie can be adopted from

  • Alexa, Open WA Animals Adoption

    • Is Julia vaccinated?
    • has Sam been desexed?

Challenges I ran into

One of the early challenges I faced was trying to poll the DynamoDB table using fields that weren't primary partition keys. It took me a little while to get my head around a schema that would work as both an easy way to pull via Alexa, and also be robust enough to function as a good data structure moving forward.

DynamoDB Table

While I'm not sold on this structure long term, it does work currently; however there's a bunch of interesting work I will be doing moving forward.

Accomplishments that I'm proud of

I'm really happy with out the conversational nature of Alexa works because of some smart if / else statements. It allows Alexa to change the way she approaches responses and make them seem more fluid based on the outcomes of a particular line.


if (vaccinated) {
    response += " is Vaccinated, "
} else {
    response += " is not Vaccinated yet, "
}
if (microchipped) {
    response += "has been Microchipped, "
} else {
    response += "has not been Microchipped, "
}
if (desexed) {
    response += "and has been desexed. "
} else {
    response += "and needs to be desexed. "
}
if (children) {
    if (desexed) {
        response += name + " is also good with children!"
    } else if (!desexed) {
        response += name + " is however very good with children!"
    }
}

An example of this can be seen in the following lines:

  • Felix is vaccinated, has been microchipped and has been desexed. Felix is also good with children!
  • Frankie is not vaccinated yet, has not been microchipped and needs to be desexed. Frankie is however very good with children.

The final line is dynamic based on the final if statement, so that the overall flow of the sentence works better when we have an all negative reply.

What's next?

There's a bunch of things I want to continue to build into this skill:

  • Correct the schema so the primary key isn't the Animal Names
  • Use the ask-sdk integration with DynamoDB directly
  • Migrate production database to DynamoDB after schema is corrected
  • Make use of Alexa cards
  • On-boarding of new Animals to the system via the Skill for authorised users.

Built With

Share this project:
×

Updates