Rider Bot (and the CEO Service Experience)

I’m super excited that I recently had my second Salesforce AppExchange posting listed. This one is branded under the Salesforce Labs publisher (the unofficial conglomerate of Salesforce Employee’s Apps), and is unmanaged, so it’s open source! w00t!

It’s called Rider. Rider is an Einstein Bot and Messaging enabled App-less experience for customers to interact with their FSL Service Appointments over SMS (or other messaging channels). Essentially what that means is that it’s a digital engagement overlay to Field Service Lightning. Have you ever been texted appointment confirmations by your cable provider for an upcoming home visit? Do they allow you to reschedule right over the same message thread? That’s what this bot will help with!

Rider speaks to the fact that we are starting to see a new wave of app-less or “Alexa-ified” experiences (hint: nobody wants another app). Anything we can do on websites and apps can now be done through conversation! This has me really excited about the future of how we problem solve. More and more people just want to speak their intent/problem, and have it resolved simply through conversation. I see this as the holy grail of the best service experience (assuming we can’t avoid never having a problem in the first place).

The “CEO Service Experience”

This “speak-comprehend-resolve” process is what I call the “CEO service experience”. I imagine that when a CEO has a problem/need, they’ve designed a network of “assistants” around them to comprehend and quickly resolve things. The CEO speaks what they want, and it just magically happens. Not only would they never call in and wait on hold to speak with anyone (nobody does that anymore), but they also wouldn’t be going to google, and searching through websites/portals to find what they are looking for. Time is their most valuable resource, so searching/chasing/tracking/waiting all has to go. And because one of technology’s major trends is to scale the elite luxuries of the past to the masses of the future, we can expect the same “CEO Service Experience” for everyone in the future.

Whenever I talk about “the service experience of the future”, I simply try to think about what experiences are like for the most affluent members of today’s society.

Wait, so does this mean that google searching/navigating websites will be less and less relevant? Probably. I don’t see as much value in websites as AI and other conversational technologies advance. Why would I go searching on a website to find what I want, if someone/something already found it for me? Why would I go browsing for entertainment if someone/something serves up the right content for me without me having to choose?

New technologies/form factors/media quickly make others obsolete. AI and machine learning have the promise to erase all of the unnecessary artificial media/form factors we’ve created (forms, websites, spreadsheets, folders, passwords, apps, etc). These may all be replaced one day with something more instinctually natural to us humans… a protocol we’ve used to exchange information since the beginning of our existence, conversation. (That is, until our linguistic bandwidth limitation can be solved. Get on that Elon)

Back to Bots

Getting back to Rider (and back out of the future a few years), it is a simple AI driven conversational bot that you can use today for free to overlay messaging on top of your existing FSL implementation. It allows for customers to perform all the functions below over any supported messaging channel, without ever having to call in or search through some website:

  • Be notified of any Service Appointments and their status updates
  • Schedule a Service Appointment
  • Reschedule a Service Appointment
  • Cancel/Confirm Appointments
  • Get Service Report/Invoice PDF
  • Connect to a live Agent over chat

Check it out and let me know how it goes!

https://appexchange.salesforce.com/listingDetail?listingId=a0N3A00000FMdIiUAL

One Giant Leap

50 years ago today, humanity accomplished one of its most awesome technological achievements: traveling to, landing, and setting foot on another rock in space far away from our home on Earth.

Not being alive then, I can only dream about the emotions going through the minds of my young mother and father, and every other teenager that day. What is our place in the universe? Are we meant to stay on earth? What does this mean for the future generations now that we can travel to other places in our galaxy (after just 10 short years of R&D at NASA)?

“For one priceless moment in the whole history of man, all the people on this Earth are truly one: one in their pride in what you have done, and one in our prayers that you will return safely to Earth.” -President Nixon speaking to Armstrong and Aldrin

These romantic feelings of excitement, uncertainty, and dreams for the future is possibly the greatest example in history of how technology can unite us as a species, and even if for one “priceless moment”, make us all feel like we are part of an exciting journey together on this planet. Collectively we can use our minds, talents, and hearts to make the future brighter for everyone.

I wonder what will excite and inspire my 3 year old son as he grows up and witnesses our latest technological achievements. How will it differ from what my parents witnessed 50 years ago? Is high-tech still inspiring children the same way? Could/should the latest releases of devices/software inspire kids to be technologists the same way millions of children were inspired to be astronauts/engineers/explorers/adventurers in 1969? Is high-tech still as romantic as it once was?

I came to Salesforce because I believe it is. Salesforce, if nothing else, represents a vision to me, that we can use technology to empower anyone on the planet to make an honest and equitable living. Whether that living is running a company, being a successful employee, happy customer, or even an entrepreneur looking to skill up for their next adventure, Salesforce democratizes opportunity in a unique way.

Let us reflect today on what happened 50 short years ago, and conjure the same spirit we all feel as humans on earth. Just as the youth of that generation’s eyes widened in wonder, while watching their low resolution analog TVs, let us romanticize, be uncertain, and be excited about our future together a species on whatever rock or starship we’re destined to settle on.

Tesla Tracker

A Tesla Vehicle API / Salesforce Integration.

Monitor, Log, and Control your Tesla from your very own free Salesforce org in 5 easy steps.

All Tesla vehicles are connected to the cloud over an owner REST API. This is how they are able to allow owners do cool things remotely like: turn on the AC on, lock/unlock doors, honk the horn, upgrade the software, and the list goes on. Although Tesla doesn’t officially promote this concept to 3rd parties, they don’t seem to prevent people from making applications that leverage this API.

Below is an application I wrote that leverages the Salesforce platform to connect to your Tesla(s). Because it’s on the Salesforce platform, you can even extend/tweak it to your liking (ie customize your reports/dashboards, plug in your own events/workflow/notifications/etc). To get started, follow the steps below:

Step 1: Create a FREE Salesforce Developer org

  1. Go here and fill out the form to get your org provisioned.
  2. Check your email and follow the activation link. From there you will enter a password (remember if your car is going to be connected, you probably want a strong password 🙂 )

Step 2: Prepare your org

Once logged into your org, you should be on a setup menu. If not, you can always click the gear icon on the upper right hand corner to get back to setup.

From setup, search for “My Domain” from the Quick find search on the left panel. This should filter down the menu to see Company Settings > My Domain. Click My Domain.

From this screen, enter a domain to prefix the .my.salesforce.com. Check availability, and Register Domain. When you click register, it will take a few minutes for the domain to be ready. While waiting, you can continue to perform the installation steps until step 5. When you reach step 5, make sure you come back to this screen and click Log In and then Deploy to Users. You will notice that your domain is being used now in your browser URL.

Again from the setup screen, search for “Apex Settings” from the Quick find search. Click Apex settings. From this screen, select “Allow Metadata from non-certified packages”, and click Save. This option will be required until I get this application published to Salesforce’s AppExchange officially. Essentially, this will allow the Tesla Tracker package to save/update settings that are stored in Salesforce org’s metadata (ie your unit of measure preference, your google map api key, etc). For more information, see Metadata Access in Apex Code.

The final configuration to prepare your org is to update your timezone. This will make sure all the timestamps are displayed in your local time. To do this, again from setup, Quick find search for Users. This will show the list of users in your org. Click Edit on your user, and in the sea of settings, find Time zone, and select yours. Click Save.

Step 3: Install the package

  1. While logged into your org, open a new tab with this link. (If prompted to login again, do so).
  2. Now select “Install for Admins Only”, agree to the terms, and click Install. This will take a minute to install.

Step 4: Store your Tesla Credentials

Once the package is installed, you have to enter your Tesla credentials into a “Named Credential” setting, so that the org can make callouts to the Tesla API. Named Credentials are a secure way of storing user credentials in a Salesforce org for this purpose. For more information, see Named Credentials. For more information about how security works with this application, see The Fine Print section below.

To set this, from the setup menu, enter “Named Credentials” in the Quick find. Click Named Credentials. From here you should see a setting called TeslaAuth. Click Edit on this. Enter your Tesla account credentials in the username, and password field. Don’t change any other settings, and click Save. This completes all the setup menu changes.

(note: Tesla recently changed around how api authentication works in Feb2021, so I had to add a new named credential in v1.4. Ignore the other TeslaAPI named credential. For more info, see this)

Step 5: Connect your vehicle to Salesforce

Now the application is installed, and your credentials are entered, we can launch the Tesla Tracker app. Click the App Launcher menu (the 9 dots waffle menu in the upper left), and on the modal that pops up, click Tesla Tracker. This will now show the home screen of the app. Now you can connect your car and enter your settings using the setup flow. Click the Tracker Setup tab (the last tab on the right).

This setup flow will guide you through a series of steps to get your car(s) connected. You can always come back to this tab if you want to change your settings (ie disable a car from monitoring, or update your energy cost multiplier).

  1. The first screen confirms that you have set your named credentials from step 4. Say yes and click Next.
  2. The second screen allows you to set your basic settings around your preferred Units of measure, how much you pay per kWh (if currency is different from USD, you may need to change your currency settings on your user like you did for timezone), and your Google Map JS API key. You can leave the API key blank if you want to come back to it later, but having a valid API will prevent watermarks over the maps. Click here to get a Google Map API key.
  3. The settings are then saved. Click Next to then have the application callout to your Tesla account to retrieve your vehicles.
  4. If successful, the application will present your vehicles one by one. Here you should enable the vehicle for monitoring (ie track logs), and set the basic info around what battery size you have and what the maximum range is rated for your vehicle. Click Next and repeat the process for your other vehicles.
  5. Click Finish to complete the setup. Then click the Tracker Dashboard tab, to go to the home screen.
  6. To ping your vehicle for the first time, Click the button in the command window Ping Vehicle.

Usage

There are three main objects that are used to store records about your vehicle. Each of these objects have tabs in the Tesla Tracker app:

  1. Vehicle: This object is used to store information about each vehicle connected to your Tesla account, and its state. Most people will only have one record of this type (unless you connect multiple vehicles).
  2. Vehicle Log: This object tracks each ping sent to your vehicles. Each log represents a point in time where the vehicle reports a ton of information about the vehicles current state (everything down to how fast the fan is blowing for the AC). You can inspect and tinker with any of these records, to maybe make workflow associated with them (for example, it would be easy to create a workflow rule that says, if the car ever enters a geofenced polygon you define, to send an email to you).
  3. Vehicle Session: This object tracks “sessions” for your vehicles. Sessions are “Parking” sessions, “Driving” Sessions, or “Charging” Sessions. This is a grouping of multiple “Vehicle Log” records (described above), where you can see high level energy usage for things like a recent trip (driving session), how much it cost to charge (charging session), or how much vampire drain you had on a particular day (parking session). Most reports are Vehicle session based.

The application will managing pinging your vehicle on an interval to write a log and assign them to sessions. The general intervals are defined below:

  1. When the vehicle is driving, it will ping and write a log every 30 seconds. You can track the trip live on the trip tracker map, on the “Tracker Dashboard” tab.
  2. When the vehicle is asleep or online and “in use” but not driving (ie the screen is on, or sentry is active) it will ping the vehicle every minute to see if the state has changed, but writes a log every 15minutes (except while asleep, where no log is written).
  3. When the vehicle is parked and not “in use” it will ping and write a log every 15minutes (to allow for the vehicle to sleep).

Reports and dashboards are also available, and the app comes with a dashboard and a few reports. Feel free to modify them to make your own!

Using this, if you know the Salesforce platform really well, you can use this as a foundation to make your own apps. I’ve made some of the functions generic (ie ping vehicle, send a command to the vehicle, activate sentry, etc) in invokable actions, so you can use that to make your own app/workflow.

The Fine Print

  1. This application is NOT affiliated with either Tesla OR Salesforce. This app is meant to be a proof of concept around connecting two great platforms together. Neither Tesla, Salesforce, nor Gilmore Labs is responsible for anything related to abuse, privacy, or security related issues involved with installing or using this app. See the site’s terms and conditions.
  2. I think it goes without saying that this app should NOT BE INSTALLED IN ORGS THAT ARE SHARED. You should not install this app in your Salesforce org that you use at your company. ANYONE with access to your salesforce org will essentially have access to monitor and send commands to your car (unless you know a lot about buttoning up Salesforce permissions). You should only install this in an org that ONLY YOU have complete control over and are comfortable with the nature of its security.
  3. If you want to remove this application for ANY reason, from setup, go to Installed Packages, and uninstall the “Tesla Tracker” app. You may have to disable the vehicle setup workflow first. Uninstalling the application will remove all settings/records/objects related to this app (including the named credentials for your Tesla account).
  4. Free Salesforce developer orgs have a data limit of 5MB currently. That should only be enough storage for a few weeks of logs. This application also does not clear old logs. If you can somehow get an org with more storage space, I would use that (keep in mind point #2 above). Otherwise, you may have to write a data retention script to clear old logs. I might post something about this later.
  5. From a security perspective, Salesforce named credentials are used to store your Tesla account information. Those credentials can only be used to make callouts to the Tesla endpoint. The application then encrypts (using AES 256) and stores an OAuth token to use for future callouts in your org. It is your responsibility to keep your org and data secure AT ALL TIMES.