In this video, we’re going to expand on our existing workflow to perform various actions.
In this case, I would like the system to create a status change workflow note to keep an audit trail of who changes what.
I would also like to know if a status changes to something specific like accepted, so that the system sends an email to the relevant person.
If we navigate back to settings after the status change, it creates the workflow note.
If I’m going to choose an if statement, if status is accepted, I’m going to add a task, open up the task and we can set up our if statement.
I navigate to my status change trigger which houses the data.
I want to say if status change to contains accepted.
On this record, the status change to is new status.
If I click run task, it will say it’s false.
So navigating to one word is true.
If I go to my status, let’s see where the status changed to was accepted.
That’s our third data record.
On this specific data record, I can now take a look over here.
If we rerun this, you’ll see that it’s true.
Now we’ve set up an if statement.
We know that this if statement works so we can switch it on.
I would then like to send an e-mail to the client.
We choose an e-mail, send e-mail to client and add a task.
You’ll see when I’ve added a task after the if statement it is either true or false.
You can click true or false to change the direction.
When I open up the e-mail task, it asks who the sender should be.
I would like to send from Peter Pan and it asks me for specific details.
We also need a client ID to ensure that this e-mail is sent to the client from the correct client account.
If I navigate to our status change trigger, I’m looking for a client ID.
This client ID belongs to Sylvie. I can now choose the e-mail which I need to find, and I can also choose a specific e-mail template or write a custom e-mail.
I’m going to choose an e-mail template and we’re going to be sending a welcome e-mail.
I now need the to address.
If I go through my inputs for status change trigger, it doesn’t give me Sylvie’s e-mail address, so I need to go find that.
Before we can send this task, we need to complete an additional step.
We need to locate the contact linked to Sylvie.
I click on contact task, get contact and we add a task.
In order to get a contact I need a contact ID.
The contact ID doesn’t exist in the initial data we have for our trigger.
We also need a different task to retrieve the contact ID, not the client ID.
In order to do that we need to use a match to client task.
If we click and add this task, it alerts us to what we should look out for in order for fields to match correctly.
In this case we navigate to Sylvie.
We don’t have a contact e-mail or cell phone number on file, but we do have a client ID.
I’m going to remove this one, and look for a client ID and add it here.
After running this task, it has found the correct client, Sylvie, and also provides me with contact ID’s.
This contact ID can be found when we navigate to Sylvie’s account and click on View Contact.
Back to settings.
We’ve matched to the correct client so we can capture all additional information about this client as well.
We’re now looking for contact ID.
We won’t be able to find that within the trigger information.
We also won’t find it in the workflow notes task.
You also won’t see it in the if statement task, but you can find it in the match to client task.
Scrolling down we can see contact ID’s and drag them. if I say run task, then it successfully fetches Sylvie’s contact information and contact e-mail.
I switch this on because I know it works and I would like to send an e-mail to the client.
Checking the 2 emails, I can now choose the contact e-mail to pull through there.
Our automation has been set up.
Let’s take a look.
Navigating to clients, Sylvie, I’m going to change the status to quoted first.
What we expect to see is a normal status change, workflow note, but no e-mail sent yet because the status wasn’t accepted.
If I click accepted, we can expect a workflow note that tells us the status has been changed from quoted to accepted and an e-mail goes out to the client.
We see quoted to accepted and now the system has sent an e-mail to the client.
If we expand, we see it was sent from Peter Pan to the client’s e-mail and the selected e-mail template.
Heading back to our automation workflow, we navigate between our additional records.
The first time, we changed the status to quoted and you can see how the automation flow ran.
It didn’t go further because of the if statement.
However, when I changed it to accepted
You see that it ran through this entire workflow.
This is how you build out certain workflows to achieve any type of automation that you need.