Overview
Context commands and queries allow skill writers to define how their field tag and summary tag (collectively referred to as tag) skills should interact with the application, in the current viewState, without having to write JavaScript to execute in the browser based on engagement events. This article discusses the context command and query schema as well as the available commands and queries.
In this Article
Context Commands
ContextCommand is defined an array of objects, where each object contains the following key/value parameters
- name: defined as a string, is the name of the command (see list below)
- args: defined as an array of any data type of objects, contain the arguments needed (the queries) in order for the command to execute
Available Commands
name | args | usage | description |
---|---|---|---|
addOtherAccount | otherProductId (string) revenue (number) |
field-tag (click)
summary-tag (click) |
|
navigateToOtherAccountsTab | None |
field-tag (click)
summary-tag (click) precisionlender-chat (click) |
|
setRate | rate (number) |
field-tag (click)
summary-tag (click) precisionlender-chat (click) |
|
setInterestOnlyPeriod | months (number) |
field-tag (click)
summary-tag (["click"]) precisionlender-chat (["click"]) |
|
setPrepaymentOptionId | prepaymentOptionId (string) |
field-tag (["click"])
summary-tag (["click"]) precisionlender-chat (["click"]) |
|
addParticipation | participationData (object) |
field-tag (["click"])
summary-tag (["click"]) precisionlender-chat (["click"]) |
|
modifyParticipation | participationId (string) participationData (object) |
field-tag (["click"]) summary-tag (["click"]) precisionlender-chat (["click"]) |
takes the string id of the participation you want to modify and an object like addParticipation.
|
removeParticipationById | participationId (string) | field-tag (["click"]) summary-tag (["click"]) precisionlender-chat (["click"]) |
takes the id of the participation to remove. The Opportunity must always have at least one participation. If you're trying to remove the last one, it will just zero out all the values, which is what PL counts as no participation.
|
opportunityRecalculate | delay (number) iterations (number) |
field-tag (["click"])
summary-tag (["click"]) precisionlender-chat (["click"]) |
|
markLoansAsPayoffById | loanIds (object) | field-tag (["click"]) summary-tag (["click"]) precisionlender-chat (["click"]) |
takes a list of loan IDs. It will mark them as Payoffs as long as they exist on the attached Relationship and aren't already marked
|
removeLoansAsPayoffById | loanIds (object) | field-tag (["click"]) summary-tag (["click"]) precisionlender-chat (["click"]) |
takes a list of loan IDs. It will unmark them as Payoffs if marked.
|
markLoansAtRiskById | loanIds (object) | field-tag (["click"]) summary-tag (["click"]) precisionlender-chat (["click"]) |
takes a list of loan IDs. It will mark them At Risk as long as they exist on the attached Relationship and aren't already marked.
|
removeLoansAtRiskById | loanIds (object) |
field-tag (["click"])
summary-tag (["click"]) precisionlender-chat (["click"]) |
|
setStage | stageIdNameOrDescription (string) |
field-tag (["click"])
summary-tag (["click"]) precisionlender-chat (["click"]) |
|
setCommercialLoanAccountInput | inputName (string) value (any) |
field-tag (["click"])
summary-tag (["click"]) precisionlender-chat (["click"]) |
|
setAmortizationBalances | amortizationBalances (array) |
field-tag (["click"])
summary-tag (["click"]) precisionlender-chat (["click"]) |
|
openEmail | to (string) subject (string) body (string) cc (string) |
field-tag (["click"]) summary-tag (["click"]) precisionlender-chat (["click"]) |
Opens a new email window with the provided parameters
|
addDepositAccount | depositAccountIdOrName (string) balance (number) rate (number) term (number) origination (string) |
field-tag (["click"]) summary-tag (["click"]) precisionlender-chat (["click"]) |
Adds a deposit account with the specified parameters. Pass in 0 or ““ for the parameters that arent needed for a particular deposit account
|
navigateToTab | tabIdOrName (string) | field-tag (["click"]) summary-tag (["click"]) precisionlender-chat (["click"]) |
Navigates a user to a specified tab within PL
|
Context Queries
ContextQueries are defined as an object, where each object contains the following key/value parameters
- name: defined as a string, is the name of the query (see list below)
- args: defined as an array of any data type of objects, contain the arguments needed for the query.
The queries are stored as part of the Condition for when the tag should load.
Available Queries
name | args | usage | description |
---|---|---|---|
getAverageAmortizationDistancePercent | recommendedDrawSchedule (object) |
field-tag (All)
summary-tag (All) |
|
getOpportunityRelationshipId | None |
field-tag (All)
summary-tag (All) |
|
getTargetRoe | None |
field-tag (All)
summary-tag (All) |
|
getOpportunityRoe | None |
field-tag (All)
summary-tag (All) |
|
getTotalAmountFromOtherAccounts | None |
field-tag (All)
summary-tag (All) |
|
opportunityHasUnsavedChanges | None |
field-tag (All)
summary-tag (All) precisionlender-chat (All) |
|
getNumberToNDecimalsFromCurrentCommercialLoanAccount | propertyName (string) numberOfDecimals (number) |
field-tag (All)
summary-tag (All) precisionlender-chat (All) |
|
getNumberToNDecimalsFromSpecificCommercialLoanAccount |
idOrName (string) numberOfDecimals (number) propertyName (string) |
field-tag (All)
summary tag (All)
precisionlender-chat (All) |
|
getPropertyFromCommercialLoanAccount | propertyName (string) | field-tag (All) summary-tag (All) precisionlender-chat (All) |
get the raw value off any userInput in the model.**
|
hasParticipationWithId | id (string) | field-tag (All) summary-tag (All) precisionlender-chat (All) |
query takes a string, searches through the names of existing participations, returns boolean.
|
hasMatchingParticipation | properties (object) | field-tag (All) summary-tag (All) precisionlender-chat (All) |
takes an object, searches through the list of existing participations to find one whose properties match all the properties in the supplied object, returns true if one is found.
|
getPropertyFromParticipation | participationId (string) propertyName (string) |
field-tag (All) summary-tag (All) precisionlender-chat (All) |
takes a string id and string property name. It will return the value of that property from the participation with that ID if such a property exists on that participation, if it exists.
|
hasLoanIdMarkedPayoff | payoffId (string) | field-tag (All) summary-tag (All) precisionlender-chat (All) |
takes a string id and returns a boolean representing if an account with that id has been marked as Payoff on this loan
|
hasLoanIdMarkedAtRisk | atRiskId (string) | field-tag (All) summary-tag (All) precisionlender-chat (All) |
takes a string id and returns a boolean representing if an account with that id has been marked At Risk on this loan
|
getAmortizationBalanceByMonth | month (number) |
field-tag (All)
summary-tag (All) precisionlender-chat (All) |
|
getPropertyFromRelationshipIfWeWin | property (string) | field-tag (All) summary-tag (All) precisionlender-chat (All) |
returns the value for the specified property from the relationship impact if we win
|
getPropertyFromRelationshipIfWeWin | property (string) | field-tag (All) summary-tag (All) precisionlender-chat (All) |
returns the value for the specified property from the relationship impact if we lose
|
getPropertyFromOpportunityFinancialStatement | property (string) | field-tag (All) summary-tag (All) precisionlender-chat (All) |
returns the value for the specified property from the opportunity financial statement
|