---
# System prepended metadata

title: Tracki Assistant

---

---
title: 'Tracki Assistant'
disqus: hackmd
---

```sequence
User->>Alexa/Google: Talk to Go Track
Alexa/Google->>User: Welcome to Go Track. I can help you get your device location,\n calculate distance to your device, and others. What can I help you with?
User->>Alexa/Google: Where is my {device_name}
Alexa/Google->>Tracki API: Get device list
Tracki API->>Alexa/Google: Response device list
Alexa/Google->Alexa/Google: Find {device_name}\n in device list.
Note left of User: Case 1
Note over User, Alexa/Google: 1) Matched device name
Alexa/Google->>User: Your {device_name} is at {place}, speed {speed} and battery is {battery} percent.\n Do you want to get distance from here to your device?
User->>Alexa/Google: Yes
Alexa/Google->>Google Map API: Get distance
Google Map API->>Alexa/Google: Response distance
Alexa/Google->>User: Distance from here to your {device_name} is {number} feets/miles.
Note left of User: Case 2
Note over User, Alexa/Google: 2) Not matched device name
Alexa/Google->>User: Cannot find your {device_name}.\n You can ask where is my device for get your device list.
User->>Alexa/Google: Where is my device
Note over User, Alexa/Google: 2.1) User have one device
Alexa/Google->>User: Your {device_name} is at {place}, speed {speed} and battery is {battery} percent.\n Do you want to get distance from here to your device?
User->>Alexa/Google: Yes
Alexa/Google->>Google Map API: Get distance
Google Map API->>Alexa/Google: Response distance
Alexa/Google->>User: Distance from here to your {device_name} is {number} feets/miles.
Note over User, Alexa/Google: 2) User have more than one device
Alexa/Google->>User: You have more than one device, {device_name}. Please say yes or next?
User->>Alexa/Google: Next
Alexa/Google->>User: Select device {device_name}. Please say yes or next?
User->>Alexa/Google: Yes
Alexa/Google->>User: Your {device_name} is at {place}, speed {speed} and battery is {battery} percent.\n Do you want to get distance from here to your device?
User->>Alexa/Google: Yes
Alexa/Google->>Google Map API: Get distance
Google Map API->>Alexa/Google: Response distance
Alexa/Google->>User: Distance from here to your {device_name} is {number} feets/miles.
```