Skip to content

Instantly share code, notes, and snippets.

@dhavaln
Last active April 18, 2024 04:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhavaln/52d59b2cb77dffc11da9a6076a7c38c3 to your computer and use it in GitHub Desktop.
Save dhavaln/52d59b2cb77dffc11da9a6076a7c38c3 to your computer and use it in GitHub Desktop.
Alexa Skill Analysis through SoftwareSpec.ai

Following requirements has been received from a client.

A city municipal organization wants to develope an innovative solution for this Christmas. They want to utilize Alexa Devices to build a Voice-based skill so that homeowners can use to request pickup Christmas Trees from their home locations for scrapping purpose. Normally, they have been using an IVR-based service where users would call and schedule the pickup. But they want to modernize that service and also add another feature of scheduling the tree pickup using Alexa devices.

Following is the list of key requirements:

  • Voice based Tree Pickup scheduling through Amazon Alexa devices
  • User can use English or Spanish to interact with the skill
  • Alexa skill will ask for few inputs like preferred day of the week and time slots
  • Alexa skill will automatically pickup address from the associated location but will ask for confiration from the user
  • User can change or give updated address through audio recording

Following is the list of future requirements:

  • No future requirements as of now.

Following is the list of assumptions:

  • Alexa devices are integrated with home owner's phone
  • The companion app has the address saved
  • The companion app has the phone or contact email saved to avoid frudalent schedule

--- Iteration 1 ---

The following is the list of questions and answers already discussed with the client.

Section 1: User Interaction and Experience

Sub-Section 1.1: Language Support

Q: Are there any other languages besides English and Spanish that need to be supported in the Alexa skill?

A: No, for now only English and Spanish

Sub-Section 1.2: Address Confirmation

Q: In what scenarios might a user need to change or update their address through audio recording?

A: The backend system will send an email to share precise address.

Sub-Section 1.3: Error Handling

Q: How should the Alexa skill handle situations where it cannot understand the user's input or there is an error in processing the request?

A: For now, it will simply say it couldn't understand the detail and ask user politely to try again.


Section 2: Scheduling and Logistics

Sub-Section 2.1: Time Slots

Q: What are the available time slots for tree pickup? Are there any restrictions or limitations based on location or day of the week?

A: It will show the system configured days and possible time slots. Depending on areas of the city the day and time slots for pickup may vary.

Sub-Section 2.2: Pickup Process

Q: Could you please elaborate on the process followed by the municipal organization once a tree pickup is scheduled? This includes aspects such as truck routing, personnel allocation, and estimated pickup timeframes.

A: We just need to collect request from the Alexa and call their main backend system API with the detail. This will log the request.

Sub-Section 2.3: Confirmation and Notifications

Q: How will users be notified about their scheduled pickup? Will there be any confirmation messages or reminders sent through the Alexa skill or other channels?

A: Users will be notified through email or phone, whichever is saved in the companion app.


Section 3: Technical Considerations

Sub-Section 3.1: Data Security

Q: How will user data, including addresses and contact information, be securely stored and managed to ensure privacy and compliance with relevant regulations?

A: The skill backend will not store any request data, it will simply collect and pass the detail to the main system through given APIs.


Section 4: Future Requirements

Sub-Section 4.1: Scalability

Q: Are there any anticipated future needs or potential expansions of the Alexa skill's functionality beyond the current scope? For instance, the inclusion of other holiday tree types or additional services.

A: This service will be rolled out for the entire city, so the backend has to scale based on demand but should still be cost efficient.


--- Iteration 2 ---

Section 1: User Interaction and Experience

Sub-Section 1.4: User Authentication

Q: How will the Alexa skill authenticate users and ensure that only authorized individuals can schedule tree pickups?

A: It will check for the saved email or phone in the companion application. If none found, then it will simply ask users to first enter those detail and then try again.

Sub-Section 1.5: Cancellation/Reschedule Process

Q: What is the process for users to cancel or reschedule a tree pickup through the Alexa skill?

A: Cancellation and Reschedule will not happen through Alexa Voice skill. For that the user will have to call the Contact Center.

Section 2: Scheduling and Logistics

Sub-Section 2.4: Tree Placement Guidelines

Q: Are there specific guidelines or instructions for how and where users should place their trees for pickup (e.g., curbside, driveway)?

A: Yes, the skill will share the instructions once the schedule is confirmed.

Sub-Section 2.5: Pickup Capacity

Q: What is the estimated maximum capacity for tree pickups per day or week? How will the system handle situations where demand exceeds capacity?

A: Out of the scope for Alexa service. That will be managed by the municipal department separately.

Section 3: Technical Considerations

Sub-Section 3.2: API Integration

Q: Can you provide more details about the APIs that will be used for integrating the Alexa skill with the municipal organization's backend system? This includes information about authentication, data formats, and rate limits.

A: Yes, it's their Salesforce integration. They already have created an API with input structure and we just need to call that and pass the necessary detail. The API will respond with Success or Failure codes and the Alexa skill will confirm to user based on the return code.

Sub-Section 3.3: Error Logging and Reporting

Q: How will errors or issues encountered during the scheduling process be logged and reported? Are there any mechanisms for monitoring and troubleshooting the Alexa skill's performance?

A: We will just log for now, they are already monitoring the API calls, so we don't need to do much on the skill side.

--- Iteration 3 ---

Section 1: User Interaction and Experience

Sub-Section 1.6: Voice Recognition Accuracy

Q: How will the Alexa skill handle accents or variations in pronunciation for both English and Spanish languages to ensure accurate voice recognition and interpretation of user requests?

A: In case we don't recognize the input then we need to instruct user to try again.

Sub-Section 1.7: User Interface and Prompts

Q: Can you provide more details on the specific prompts and questions that the Alexa skill will use to guide users through the scheduling process? This will help ensure clarity and user-friendliness.

A: Prompts and instructions will be shared later on.

Section 2: Scheduling and Logistics

Sub-Section 2.6: Holiday Scheduling

Q: How will the system handle scheduling around holidays or days when the municipal organization may not be operating for tree pickups?

A: Yes, depending on areas there will be available days and timeslots for pickup. But we will finalize that later on. For now we have to assume that All Week days and a fixed time slots are available for each serviceable areas.

Sub-Section 2.7: Tree Size and Type Restrictions

Q: Are there any restrictions on the size or type of Christmas trees that can be scheduled for pickup? For example, are there limitations on tree height or whether flocked trees are accepted?

A: Yes, we will be asking for Tree Size and if the trea has anything attached or not. Users will be given specific instructions before putting the tree for pickup.

Section 3: Technical Considerations

Sub-Section 3.4: Testing and Quality Assurance

Q: What are the plans for testing and quality assurance to ensure the Alexa skill functions as expected and provides a seamless user experience? This includes unit testing, integration testing, and user acceptance testing. A: We will be doing some trial runs through test Alexa devices.

Sub-Section 3.5: Deployment and Maintenance

Q: Can you elaborate on the process for deploying the Alexa skill and any ongoing maintenance or updates that may be required?

A: Because this service will only be active for certain days after the Christmas. We need to ensure that the skill is fully tested and working prior to the holidays. Once the pickup service is stopped we will disable the skill as well.

Proposed Architecture for Christmas Tree Pickup Alexa Skill

This document outlines a cost-optimized architecture using AWS services and modern technologies like ReactJS and NodeJS for the Christmas tree pickup Alexa Skill.

Open Questions for Client:

  • Data Specifics:
    • Exact format and structure of the data to be sent to the Salesforce API.
    • Expected volume of requests during peak times.
  • User Experience:
    • Detailed user flow and prompts for the Alexa skill.
    • Error handling strategies beyond the basic retry prompt.
  • Future Proofing:
    • Long-term plans for the skill beyond the initial Christmas season.
    • Potential integration with other municipal services or expansion to other holidays.
  • System Integration:
    • Authentication methods for the Salesforce API.
    • Rate limits and error handling mechanisms for the API.

Functional Requirements:

  1. Voice-Based Scheduling: Users can schedule Christmas tree pickups using voice commands through Alexa devices in English or Spanish.
  2. Address Management: The skill retrieves the user's address from the Alexa app and allows for confirmation or updates via voice input.
  3. Scheduling Options: Users can select preferred days and time slots for pickup based on availability in their area.
  4. Confirmation and Notifications: The skill confirms the scheduled pickup and sends notifications via email or phone.
  5. Tree Placement Instructions: The skill provides instructions on how and where to place trees for pickup.
  6. API Integration: The skill integrates with the municipal organization's Salesforce backend system via APIs to log pickup requests.

Technical Considerations:

  • AWS Services:
    • Amazon Lex: For natural language understanding and intent recognition to process user voice commands.
    • AWS Lambda: To run the backend code for the skill, triggered by Lex, handling business logic and API calls.
    • Amazon API Gateway: To create and manage APIs for the skill, acting as a front door for the Lambda functions.
    • Amazon DynamoDB: A NoSQL database to store temporary data or session information, if needed.
  • Frontend: ReactJS can be used to build a web interface for managing schedules or providing additional information, if required.
  • Backend: NodeJS will be used for server-side development, handling API calls and business logic within Lambda functions.
  • Data Security: User data is not stored in the skill's backend. All information is passed directly to the Salesforce API, leveraging their existing security measures.
  • Testing and Deployment: Unit tests will be implemented for Lambda functions. Integration testing will ensure smooth interaction between Lex, Lambda, and the Salesforce API. The skill will be deployed on the AWS cloud with appropriate scaling configurations to handle varying demand.

Architecture Diagram:

[User] -> [Alexa Device] -> [Amazon Lex] -> [AWS Lambda] -> [Amazon API Gateway] -> [Salesforce API]
                 ^                                                  |
                 |                                                  v
                 \------------------[DynamoDB (if needed)]-----------/

Benefits:

  • Cost-Optimization: Serverless architecture with Lambda minimizes infrastructure costs and allows for pay-per-use billing.
  • Scalability: The system can automatically scale to handle increased demand during peak times.
  • Rapid Development: Modern technologies like NodeJS and ReactJS, along with serverless architecture, facilitate faster development and deployment.
  • Improved User Experience: Voice-based interaction provides a convenient and modern way for users to schedule tree pickups.

Next Steps:

  1. Gather additional information: Address the open questions with the client to finalize requirements.
  2. Develop the Alexa skill: Implement the skill using Amazon Lex and AWS Lambda, incorporating user prompts and error handling strategies.
  3. Integrate with Salesforce API: Develop the API integration layer to connect the skill with the backend system.
  4. Testing and Deployment: Thoroughly test the skill and deploy it on the AWS cloud with appropriate monitoring and scaling configurations.
  5. User Training and Support: Provide documentation and support materials for users to effectively utilize the new skill.

This architecture provides a solid foundation for building a scalable, cost-effective, and user-friendly Christmas tree pickup Alexa Skill. The proposed approach leverages the latest cloud technologies and aligns with the development team's expertise, ensuring a successful and timely implementation.

High-Level Summary: Christmas Tree Pickup Alexa Skill

Project Goal: Develop an Alexa Skill to enable residents to schedule Christmas tree pickups for recycling, replacing the existing IVR system and offering a modern, convenient solution.

Key Features:

  • Voice-Based Scheduling: Users can schedule tree pickups using voice commands in English or Spanish.
  • Address Confirmation: The skill automatically retrieves the user's address from the Alexa account but allows for voice-based address updates.
  • Scheduling Options: Users can choose preferred pickup days and time slots based on their location and availability.
  • Confirmation and Notifications: Scheduling confirmations and reminders are sent via email or phone, based on the user's preference.
  • Tree Placement Instructions: The Skill provides instructions on where and how to place the tree for pickup.
  • Size and Type Restrictions: Users are informed about size limitations and restrictions on decorations or flocking.

Technical Considerations:

  • AWS Cloud Platform: Utilize AWS services for a cost-optimized and scalable architecture, leveraging the development team's expertise.
  • Serverless Architecture: Consider using AWS Lambda and other serverless technologies for efficient resource management.
  • NodeJS and ReactJS: Develop the backend APIs with NodeJS and the frontend (if necessary) with ReactJS.
  • Salesforce Integration: Integrate with the existing Salesforce backend system through provided APIs for data exchange.
  • Data Security: Ensure user data privacy by not storing any information in the skill's backend and relying on secure API calls to the main system.
  • Testing and Deployment: Implement thorough testing procedures and ensure the Skill is fully functional before the holiday season. Disable the Skill after the service period ends.

User Experience:

  • Language Support: Offer English and Spanish language options.
  • Error Handling: Provide clear and polite messages if the skill fails to understand the user or encounters errors.
  • User Authentication: Verify users through the companion app to prevent unauthorized scheduling.
  • Voice Recognition Accuracy: Implement strategies to handle accents and variations in pronunciation.
  • User Interface and Prompts: Develop clear and user-friendly prompts to guide users through the scheduling process.

Open Questions for Client:

  • Specifics of Time Slots: Clarify the exact available time slots for different areas and days of the week.
  • Holiday Scheduling: Define how the system will handle scheduling around holidays or non-operational days.
  • Tree Size and Type Restrictions: Confirm the precise limitations on tree size and acceptable types.
  • User Interface and Prompts: Finalize the exact wording and flow of user prompts and instructions.
  • Testing and Quality Assurance: Determine the scope and procedures for testing and user acceptance.

Next Steps:

  • Obtain clarification on open questions from the client.
  • Finalize the system architecture and technology stack.
  • Develop and implement the Alexa Skill according to the defined requirements and UX principles.
  • Conduct thorough testing and quality assurance.
  • Deploy the Skill before the holiday season and monitor its performance.

Additional Considerations:

  • Explore potential future enhancements, such as incorporating other holiday tree types or additional services.
  • Evaluate the possibility of enabling cancellation and rescheduling functionalities within the Skill.
  • Consider developing a companion app to enhance user experience and provide additional features.

By addressing these points and carefully considering the client's needs and preferences, we can develop a successful Christmas tree pickup Alexa Skill that provides a convenient and user-friendly experience for residents while streamlining operations for the municipal organization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment