Andi Soft Stops gives admins the ability to intercept a save or an action (Softs Stops) for a Relationship Manager (RM). For example, you can create a soft stop to appear if an RM prices an opportunity with information that appears to be entered incorrectly or out-of-policy for your bank.
The soft stop will display as a pop-up when the RM tries to save, giving them the opportunity to review any fields Andi flags as needing attention. The RM can then choose to go back and edit those fields or to proceed and save the opportunity.
Soft Stops can be configured for multiple fields in the opportunity (rate, close date, amount, funding source, maturity, etc.).
Note
You must have the Andi Skills Builder or use Professional services to create a custom skill for your FI.
Andi Soft Stops Use Cases
- Policy Enforcement - If you enter a close date in the past or set a rate that falls outside of your institution’s policy, Andi can intervene with a message.
- Reminders & Announcements - Prompt a pop-up when the pricing screen is opened, reminding you of key policy changes or recent updates that might affect pricing decisions.
Using Andi Soft Stops
You can build a skill using the new soft stop power in the Skills section of the Build tab.
The sample code below allows you to populate the modal with your own data as needed.
In this example, the body and button objects allow you to change the wording and prompt any warnings the user should be aware of before saving.
Sample Code
import { ConfirmModalOptions, FieldTag, TagPowers, ModalPowers } from "@andi/powers"; import { FieldTagTypes, ISkillContext, ISkillActivity, Placement, ContextCommand } from "andiskills"; // This function is the main entry point for the Andi skill
export async function run(skillContext: ISkillContext): Promise<ISkillActivity> {
// Define options for the confirmation modal const confirmModalOptions: ConfirmModalOptions = { body: { header: "Attention Needed", text: "I found some items that may conflict with your existing bank policies. By saving you acknowledge the following issues:", bulletedItems: [ "The projected close date is in the past.", "Amortization is less than maturity.", "Currency not aligned with the funding source.", "Amount is too high.", "Rate type should not be floating." ] }, confirmButton: { text: "Continue Editing", actions: [] }, cancelButton: { text: "Acknowledge and Save", actions: [] }, displayOptions: { tagType: FieldTagTypes.Warning, addBlurredBackground: true, } }
// Define a field tag to be attached to the Save button const fieldTag: FieldTag = { fields: [{ container: "MasterMenu", property: "SaveButton" }], text: "Save", tagType: FieldTagTypes.Warning, key: "softStops" }; // Add the modal to be displayed when the Save button is clicked ModalPowers.addModalOnClick(confirmModalOptions, fieldTag);
// Send the field tag to be displayed in the UI return TagPowers.sendTags([fieldTag]);
}
```
Explanation: 1. The code imports necessary types and functions from "@andi/powers" and "andiskills" modules. 2. The `run` function is the main entry point for the Andi skill. It takes a `skillContext` parameter and returns a Promise that resolves to an `ISkillActivity`. 3. A `confirmModalOptions` object is defined, which contains the configuration for a confirmation modal. This modal will be displayed when the user attempts to save the opportunity. 4. The modal includes a header, explanatory text, and a list of potential policy conflicts. 5. The modal has two buttons: "Continue Editing" and "Acknowledge and Save", with the latter being the cancel action (which will actually save the opportunity). 6. A `fieldTag` object is created to attach a warning tag to the Save button. 7. The `ModalPowers.addModalOnClick` function is used to associate the confirmation modal with the Save button's field tag. 8. Finally, the `TagPowers.sendTags` function is called to send the field tag to be displayed in the UI. This skill is implementing a "soft stop" feature, where users are warned about potential policy conflicts before saving an opportunity. It allows them to either continue editing or acknowledge the issues and proceed with saving.