- Hi, my name is Ceverly Strand
and today I'm going to walk you through a demo
of how to get started using our Einstein Deep Learning APIs
in order to create AI powered apps.
And with that, let's get started.
The first step you want to do
is use your existing Salesforce or Heroku account
to sign up for an Einstein Platform Services key,
to generate an OAuth token.
You can do this @Einstein.ai.
The next step is to create a dataset,
then train that dataset in order to create a custom model.
Now, I'm not going to walk through those steps today
just because we don't have a lot of time.
However, you can find all that documentation
right on Einstein.ai under the documentation links.
And today we're really going to focus
on the image custom classifier,
just so you guys know if you're looking
at that one specifically.
You can also use the Einstein Vision
and Language Model Builder,
available free on the AppExchange,
to check the accuracy of your models before deploying them
or refining them once they've been deployed.
The Einstein Vision and Language Model Builder
is a very easy visual tool to use to begin to build models.
So in this instance, you can see,
you can upload a specific URL with your dataset
or you can actually upload a file,
and usually it's a file if you're working with images.
Once you have those you can actually review
all your image datasets that you've created.
So for instance, maybe we have a Car Vision one,
it shows you the models that have been created
from that dataset and it also shows you
the different labels that you have
and how many examples of each of those labels you have.
So once you have your Model ID
you can jump into your Salesforce org
to complete the rest of the steps,
which is where we're going to focus most of our time today.
Let's start with what the end user's experience looks like.
So imagine we just got in a fender bender
and we're at our insurance agents' website,
and so we just want to file an insurance claim.
We would use this chat bot,
which automatically identifies
as a chat bot for ethical reasons,
to interact with our insurance agent.
So it's asking us to upload an image of the damage.
What's happening behind the scenes,
is Einstein is analyzing that image to determine,
is it damaged, is it not damaged.
And it's coming back that it is damaged
and it's pretty sure it is damaged with a 98% accuracy.
So this really helps the customer understand,
yes, we see there is damage.
We are taking care of it.
We're going to file that claim and is there anything else
that we can help with in the moment?
The agent will file the claim for them
and follow up with them if they have any questions.
So let's go ahead and dive
into how we created this bot really simply.
Now you'll notice that I switched over to my code editor,
and here we're creating a custom lightning web component
called Vision Component.
And it has your normal files here,
CSS, HTML and JavaScript.
The really cool thing here is that we're using
this JavaScript file to invoke an apex method.
And this apex method you see right here.
And then we also noticed down below that we have a return.
In this instance, we making a promise of sorts, saying,
if we're calling this method,
we want this to be returned to us,
which populates in that UI chat bot that we just saw.
So let's take a look at that specific apex method,
which is this called DE Einstein Vision control.
And the really cool,
short code that we need to use is right here.
And basically what we're saying is,
we're calling the image classification service right here
in this line.
And next we're requesting an image classification
by passing that Model ID that we were talking about earlier.
And then Einstein will return the predicted label
depending on what that prediction was.
Alright, you'll notice that we jumped back into Salesforce
and we went to Settings and chose our Einstein bots
and just made sure that this was turned on,
this feature was turned on.
The next step is to go to Embedded Service Deployments.
Normally you would start a new one,
but in this case, in the interest of time,
we're going to look at one of our preexisting ones
to see what that looks like.
The first thing you need to make sure
is that this chat settings is turned on.
The next thing is once you hit edit,
it might take a second,
but we need to make sure this says active.
And then if you scroll down below,
this is where we choose our Custom Components.
And you would do that just under the edit here,
but in interest of time, again,
this is that custom vision font that we just created,
that we would put on here.
So once all that is set up,
then you would go back to bots.
You would either use an existing bot
that you already have enabled,
or you could create a new one using those different steps.
In the interest of time, again,
we're going to look at our current one,
which is this vision bot.
Let's go ahead and look at this.
Now, if you've ever worked with bots, just know,
or if you haven't, I suppose,
just know you cannot edit an active bot.
It says this pretty plainly up here.
If you need to just deactivate it and reactivate it.
So the Custom Component of the bot comes into view here
where we have Einstein Vision, the Case,
then we show the Record ID and then we show the Model ID.
Remember when I mentioned the Model ID earlier,
that's where that comes in.
And now that you've done all this,
you can go ahead and activate if it isn't already.
And you have a fully functional,
customized AI power bot with Einstein Vision functionality.
You can definitely check out Einstein-hub,
if you'd like to learn more
or einstein.ai to check out all the documentation
on these great APIs.