Andi® skills fall under 3 basic skill types: email, field tag, and conversational (chat). However, a skill can be written that encompasses any combination of this functionality using the Andi® powerset. Written using the available templates, your skills should be designed with the ultimate goal of providing valuable insights and coaching to your users. To do that, it's important to understand what the skills are and what their life cycle is. This article provides an introduction to Andi® skills.


In this Article


General Skill Life Cycle

Shows the lifecycle of a skill

When a user performs an action in the application (think PrecisionLender), such as selecting 'Save', asking Andi® a question, or adding a fee or relationship to an opportunity, this creates what is known as an event because the action has caused a change to occur.

When Andi® receives this event she then determines what needs to happen next through a process known as enrichment. For example, when a user asks Andi® a question, thereby creating a chat event, that event will be checked against Language Understanding before being routed to your skill library, whereas non-chat events will route to your skill manager.

Your skill manager consists of the configured, installed, and enabled skills for your organization. Each skill in the manager is a package, containing its own unique id and the three files:

  1. skillmanifest.json
  2. shouldIRun.ts
  3. run.ts

When the event reaches your manager, Andi® checks the shouldIRun.ts file in each skill package to see if that skill should execute based on your code logic. For this reason, it's important that your shouldIRun.ts file should contain relatively simple logic. Andi® needs to quickly determine whether or not your skill should run. The longer it takes her to determine that, the longer it will take for other skills that should run, to run or even worse, time out and not run at all. 

If based on your skill code Andi® determines your skill should run, then she will execute the logic contained in your run.ts file. This is where your more targeted or complex logic should reside, such as API calls, calculations, and any settings defined in the skillmanifest.json file. The result of the run will determine whether or not there is an output and the run activity is logged. If there is an output, that output will be returned to the user. The output can be one of the following:

  • Email - allows for the ability to send an email notification based on certain events as defined in the skill. For more information on setting up your skill to send emails, see the Email Power article.

  • Chat - allows for the ability to deliver information, such as help articles and internal documents/videos, based on questions or conversations Andi® receives. This is a subset of a larger category of conversational or chat skills that can be written.

  • Field tag - allows for the ability to display a notification to the lender in the PrecisionLender application, either in a particular field or the Andi® window, based on how the skill is defined. Field tags, contain their own cycle as well. Only one field tag can be sent per skill.

    Tags that display to either 1) both a field and the Andi® Window or 2) a field only are referred to as Field tags. Tags that display in the Andi® Window only, are referred to as Summary tags.

    There are three field tag types you can create using the Field Tag Power:

    • Warning - displays with an orange tag color under the 'Here are some concerns' header to alert the user to a concern about the opportunity or procedure that needs to occur because of how the opportunity has been priced.
    • Informational (Info) - displays with a blue tag color under the 'Here are things to consider' header to provide the user with information such as general information or encouraging statements.
    • Value for Target - displays with a red tag color under the 'Here is additional information header' to alert the user to an invalid entry in a field (ex.'one' is entered instead of '1').

There are two other field tag types as well, but these will not be created using the Field Tag Power:

    • Help - displays with a purple tag color under the 'I found these support articles header' to indicate available articles or reference documents that can assist users with pricing their opportunity. You will use the chat powers to generate this type of tag.
    • Suggestion - display with a green tag color under the 'Here are ways to reach the target' header at the top of the Andi® window. These field tags provide insights from skills embedded within the PrecisionLender application and cannot be created using the Builder.

When the user sees the output, that is then logged in the analytics section with the associated run activity.

And with each subsequent user action, the cycle will begin again.


Field Tag Skill Life Cycle

As described above, field tags can convey several types of messages, but those messages won't always be relevant to the user as events continue to occur. In addition to the general skill life cycle, field tags also contain their own life cycle, defined by the skill key and the shouldIShow function in your skill code.

When Andi® determines that a skill should execute based on an event and the output of that skill would be a field tag, there are two checks that happen:

  1. The skill key check ensures that the result returned by the same skill is still applicable. If not applicable, the field tag won't show.
  2. The shouldIShow checks whether or not the output should actually be displayed. After the event that causes the field tag's initial appearance, the field tag will continue to appear, until your code tells it not to. Because events are always occurring after that initial event, you need to make sure the most relevant and valuable insights are what display to your users. Use the shouldIShow to define when the field tag should show so that it appears when needed and is removed when no longer relevant. Your shouldIShow should rarely, if ever, have 'return true' as the only parameter. Once the logic returns false based on subsequent events, the tag will no longer appear to the user.


Time to start writing!

Was this article helpful?
1 out of 1 found this helpful