Context commands 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.

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.

Commands make changes to the application on the users behalf and work hand in hand with Context Queries.

ContextCommandDefinitions : object

Kind: global namespace

ContextCommandDefinitions.addCommercialLoanAccount : ContextCommand

This context Command will add a new commercial loan account to the opportunity and can be used with the click event for Summary and Field Tags as well as in Andi Chat.

Kind: static property of ContextCommandDefinitions
Properties

Name Type Description
name string addCommercialLoanAccount
args Array.<any> accountIdOrName

Example

// This example will create a new commercial loan on the 
// current opportunity for Product name "Commercial Installment".
 
// This can also be the Product Id or the Product Family Id.
const accountIdOrName: string = "Commercial Installment";

const command: contextCommand = {
    name: "addCommercialLoanAccount",
    args: [accountIdOrName]
};

const tag: SummaryTag = {
    key: "sample-tag",
    text: "Sample Tag",
    tagType: FieldTagTypes.Info,
    onClick: [command]
};                 

ContextCommandDefinitions.addOtherAccount : ContextCommand

This context Command will add a new other account to the opportunity and can be used with the click event for Summary and Field Tags as well as in Andi Chat.

Kind: static property of ContextCommandDefinitions
Properties

Name Type Description
name string addOtherAccount
args Array.<any> otherProductIdOrName , revenue, balance, description

Example

// This example will create a new Other Account on the 
// current opportunity for the Product Name "Wealth Management".

// This can be the Other Product Name, Product Id or Product Family Id.
const otherProductIdOrName: string = "Wealth Management";

// Revenue amount in whole numbers based in the current locale's currency.
const revenue: number = 20000;

// Balance amount in whole numbers based in the current locale's currency.
const balance: number = 2555;

// Description of the Account to be displayed.
const description: string "Description of the other Account";

const command: contextCommand = {
    name: "addOtherAccount ",
    args: [otherProductIdOrName, revenue, balance, description]
};

const tag: SummaryTag = {
    key: "sample-tag",
    text: "Sample Tag",
    tagType: FieldTagTypes.Info,
    onClick: [command]
};                 

ContextCommandDefinitions.addDepositAccount : ContextCommand

This context Command will add a new Deposit account to the opportunity and can be used with the click event for Summary and Field Tags as well as in Andi Chat.

Kind: static property of ContextCommandDefinitions
Properties

Name Type Description
name string addDepositAccount
args Array.<any> depositAccountIdOrName, balance, rate, term, origination

Example

// This example will create a new Deposit Account on the 
// current opportunity with Product Name "Certificate of Deposit".
 
// This can also be the Deposit Account Product id or 
// Deposit Account Production Family id.
const depositAccountIdOrName: string = "Certificate of Deposit";  

// This should be a whole number representing the balance of the
// account in the current locale's currency
const balance: number = 1000000;

// This should be decimal value representing the interest rate being
// used on the current product. For example a rate of 3.25% would be
// 0.0325.
const rate: number = 0.1;

// This should be a whole number representing the term in months of 
// the product. For example, One year would be 12.
const term: number = 12;

// This should be the date of the deposit account's origination formatted
// using the current locale.
const origination: string = "12-20-2020";

const command: contextCommand = {
    name: "addDepositAccount",
    args: [depositAccountIdOrName, balance, rate, term, origination]
};

const tag: SummaryTag = {
    key: "sample-tag",
    text: "Sample Tag",
    tagType: FieldTagTypes.Info,
    onClick: [command]
};                 

ContextCommandDefinitions.navigateToTab : ContextCommand

This context Command will navigate to a Tab on the current opportunity specified on the tabIdOrName parameter and can be used on the click event for Summary and Field Tags as well as in Andi Chat.

Kind: static property of ContextCommandDefinitions
Properties

Name Type Description
name string navigateToTab
args Array.<any> tabIdOrName i.e. deposits, other, relationship or commercial loan account id and can be used with the click event for Summary and Field Tags as well as in Andi Chat.

Example

// This example will navigate to the relationship tab on the 
// current opportunity.

// This can be deposits, other, relationship or the id of
// a commercial loan.
const tabIdOrName: string = "relationship";    
    
const command: contextCommand = {
    name: "navigateToTab",
    args: [tabIdOrName]
};

const tag: SummaryTag = {
    key: "sample-tag",
    text: "Sample Tag",
    tagType: FieldTagTypes.Info,
    onClick: [command]
};                 

ContextCommandDefinitions.openEmail : ContextCommand

This context Command will open current users email client and create a new email to be send with the to, subject, body and cc specified in the command. This can be used with the click event for Summary and Field Tags as well as in Andi Chat.

Kind: static property of ContextCommandDefinitions
Properties

Name Type Description
name string openEmail
args Array.<any> to, subject, body, cc

Example

// This example generate an email.

// IMPORTANT: It's important to note that using this command can fail
// when the total length of the request including the
// to, subject, body and cc exceeds a certain length which
// varies from email client, OS and IT policies. 2000 total
// characters is a general max size.

// This is the addressee email address. If you want to specify
// multiple email addresses then that is dependent on your email
// client. Outlook recognizes ';' semi colon and other
// clients recognize ',' comma. For example, it could 
// be email@somewhere.com;email2@somewhere.com for Outlook
// based clients and for others email@somewhere.com,email2@somewhere.com.
// Setting up a distribution group email address is
// probably the safer route if you need to send to multiple
// addresses.
const to: string: "email@somewhere.com";

// Email Subject to be displayed in the email client.
const subject: string "Email Subject Goes Here";

// Body of the email to be displayed in the email client.
const body: string "Body of the email goes here";

// Carbon Copy email addressee.
const cc: string "cc@somewhere.com";
    
const command: contextCommand = {
    name: "openEmail",
    args: [to, subject, body, cc]
};

const tag: SummaryTag = {
    key: "sample-tag",
    text: "Sample Tag",
    tagType: FieldTagTypes.Info,
    onClick: [command]
};                 

ContextCommandDefinitions.addGuarantee : ContextCommand

This context Command allow for adding one more or more guarantees to an opportunity.

Kind: static property of ContextCommandDefinitions
Properties

Name Type Description
name string addGuarantee
args Array.<any> guarantees - See example for more details.

Example

// This example provides the definition of type Guarantee and demonstrate
// how to assemble adding two Guarantees. 

type Guarantee = {
  guaranteeType: string, // can be guaranteeType id or name
  riskRating: string, // can be riskRating id or name
  guaranteedAmount?: number, // optional value dependent on guaranteeType
  guaranteedExposure?: number // optional value dependent on guaranteeType expressed as decimal percentage
}

const corporateGuarantee: Guarantee = {
 guaranteeType: "Corporate",
 riskRating: "Average",
 guaranteedAmount: 20000            
};

const personalGuarantee: Guarantee = {
 guaranteeType: "Personal - High Correlation % Exposure",
 guaranteedExposure: 0.10
};

// if the goal is just to add a single item then use the following format
// const guarantee: Guarantee[] = [corporateGuarantee]; 
// It's important to pass an array object into the args regardless if 
// if the command is going to add one ore more items.
const guarantee: Guarantee[] = [corporateGuarantee,personalGuarantee]; 
const command: contextCommand = {
    name: "addGuarantee",
    args: [guarantee]
};

const tag: SummaryTag = {
    key: "sample-tag",
    text: "Sample Tag",
    tagType: FieldTagTypes.Info,
    onClick: [command]
};                 

ContextCommandDefinitions.setCapAndFloor : ContextCommand

This context Command allow for setting the Cap and Floor on the opportunity.

Kind: static property of ContextCommandDefinitions
Properties

Name Type Description
name string setCapAndFloor
args Array.<any> capAndFloor - See example for more details.

Example

// This example provides the definition of type CapAndFloor and demonstrate
// how to assemble set the Cap And Floor. 

type CapAndFloor = { 
 id: string, // id of the CapAndFloor
 duration: number, // Integer 1 or higher representing months
 floor: number, // Decimal percentages 
 cap: number // Decimal percentages  
}

const capFloor: CapAndFloor = {
 id: "0dc783e2-5352-4b24-8732-f86db4d275e2",
 duration: 21, 
 floor: 0.25, 
 cap: 0.375      
};

const command: contextCommand = {
    name: "setCapAndFloor",
    args: [capFloor]
};

const tag: SummaryTag = {
    key: "sample-tag",
    text: "Sample Tag",
    tagType: FieldTagTypes.Info,
    onClick: [command]
};                 

ContextCommandDefinitions.setOriginationChannel : ContextCommand

This context Command allow for setting the Origination Channel on the opportunity.

Kind: static property of ContextCommandDefinitions
Properties

Name Type Description
name string setOriginationChannel
args Array.<any> originationChannel - See example for more details.

Example

// This example provides the definition of type OriginationChannel and demonstrate
// how to assemble set and apply it. 

type OriginationChannel = { 
 channel: string, // Channel Id or Name
 percentOfFees: number, // Decimal percentage of fee
 percentOfAmount: number,  // Decimal percentage of amount
 additionalExpense: number // Positive Integer representing Expense amount
}

const originationChannel: OriginationChannel = {
 channel: "3b0fa145-a6ed-482e-ac6f-af5f641fe4ac", 
 percentOfFees: 10.0, 
 percentOfAmount: 0.25, 
 additionalExpense: 1800    
};

const command: contextCommand = {
    name: "setOriginationChannel",
    args: [originationChannel]
};

const tag: SummaryTag = {
    key: "sample-tag",
    text: "Sample Tag",
    tagType: FieldTagTypes.Info,
    onClick: [command]
};                 

ContextCommandDefinitions.setServicingChannel : ContextCommand

This context Command allow for setting the Service Channel on the opportunity.

Kind: static property of ContextCommandDefinitions
Properties

Name Type Description
name string setServicingChannel
args Array.<any> serviceChannel - See example for more details.

Example

// This example provides the definition of type ServiceChannel and demonstrate
// how to assemble set and apply it. 
                
type ServiceChannel = { 
 channel: string, // Channel Id or Name
 percentOfAverageBalance: number, // Decimal percentage Average Balance
 percentOfAmount: number,  // Decimal percentage of amount
 additionalExpense: number // Positive Integer representing Expense amount
}

const serviceChannel: ServiceChannel = {
 channel: "3b0fa145-a6ed-482e-ac6f-af5f641fe4ac", 
 percentOfAverageBalance: 0.25, 
 percentOfAmount: 0.25, 
 additionalExpense: 1800    
};

const command: contextCommand = {
    name: "setServicingChannel",
    args: [serviceChannel]
};

const tag: SummaryTag = {
    key: "sample-tag",
    text: "Sample Tag",
    tagType: FieldTagTypes.Info,
    onClick: [command]
};                 

ContextCommandDefinitions.setScheduledCommitments : ContextCommand

This context Command allow for setting the Origination Channel on the opportunity.

Kind: static property of ContextCommandDefinitions
Properties

Name Type Description
name string setScheduledCommitments
args Array.<any> scheduledCommitments - See example for more details.

Example

// This example provides the definition of type OriginationChannel and demonstrate
// how to assemble set and apply it. 
                
type ScheduledCommitment = { 
 month: number, // Integer represent month 1-12
 commitment: number, // Integer must be greater than or equal to 0
 available: number, // Decimal greater than or equal to 0 and less than or equal to 1
 utilizationPercent?: number, // Decimal Percentage optional can not be used with utilizationAmount
 utilizationAmount?: number // Integer must be greater than or equal to 0. This is optional and can not be used with utilizationPercent.
}

const scheduledCommitment: ScheduledCommitment = {
 month: 1, 
 commitment: 100000, 
 available: .02, 
 utilizationAmount: 1000000 
};

const scheduledCommitments: ScheduledCommitment[] = [scheduledCommitment];

const command: contextCommand = {
    name: "setScheduledCommitments",
    args: [scheduledCommitments]
};

const tag: SummaryTag = {
    key: "sample-tag",
    text: "Sample Tag",
    tagType: FieldTagTypes.Info,
    onClick: [command]
};                 

ContextCommandDefinitions.setPropertyOnOpportunity : ContextCommand

This context Command sets a value for the property specified by name on the opportunity which can be used with the click event for Summary and Field Tags as well as in Andi Chat.

Kind: static property of ContextCommandDefinitions
Properties

Name Type Description
name string setPropertyOnOpportunity
args Array.<any> [propertyName, propertyValue] For more detailed information and a list of fields refer to setPropertyOnOpportunity

Example

// This example will set the name of the opportunity
// VIP

const propertyName: string = "name";
const propertyValue: string: "VIP";
    
const command: contextCommand = {
    name: "setPropertyOnOpportunity",
    args: [propertyName, propertyValue]
};

const tag: SummaryTag = {
    key: "sample-tag",
    text: "Sample Tag",
    tagType: FieldTagTypes.Info,
    onClick: [command]
};                 

ContextCommandDefinitions.setPropertyOnCurrentScenario : ContextCommand

This context Command sets a value for the property specified by name on the current scenario which can be used with the click event for Summary and Field Tags as well as in Andi Chat.

Kind: static property of ContextCommandDefinitions
Properties

Name Type Description
name string setPropertyOnCurrentScenario
args Array.<any> [propertyName, propertyValue] For more detailed information and a list of fields refer to setPropertyOnCurrentScenario

Example

// This example will set the name of the Current Scenario
// VIP

const propertyName: string = "name";
const propertyValue: string: "VIP";
    
const command: contextCommand = {
    name: "setPropertyOnCurrentScenario",
    args: [propertyName, propertyValue]
};

const tag: SummaryTag = {
    key: "sample-tag",
    text: "Sample Tag",
    tagType: FieldTagTypes.Info,
    onClick: [command]
};                 

ContextCommandDefinitions.setPropertyOnCurrentCommercialLoanAccount : ContextCommand

This context Command sets a value for the property specified by name on the current commercial loan which can be used with the click event for Summary and Field Tags as well as in Andi Chat.

Kind: static property of ContextCommandDefinitions
Properties

Name Type Description
name string setPropertyOnCurrentCommercialLoanAccount
args Array.<any> [propertyName, propertyValue] For more detailed information and a list of fields refer to setPropertyOnCurrentCommercialLoanAccount

Example

// This example will set the Amount of the Current 
// Commercial Loan to 100,000.
 
const propertyName: string = "amount";
const propertyValue: number: 100000;
    
const command: contextCommand = {
    name: "setPropertyOnCurrentCommercialLoanAccount",
    args: [propertyName, propertyValue]
};

const tag: SummaryTag = {
    key: "sample-tag",
    text: "Sample Tag",
    tagType: FieldTagTypes.Info,
    onClick: [command]
};                 

ContextCommandDefinitions.setPropertyOnCurrentCommercialLoanAccount : ContextCommand

This context Command sets a value for the property specified by name on the specific commercial loan which can be used with the click event for Summary and Field Tags as well as in Andi Chat.

Kind: static property of ContextCommandDefinitions
Properties

Name Type Description
name string setPropertyOnSpecificCommercialLoanAccount
args Array.<any> [idOrName, propertyName, propertyValue] For more detailed information and a list of fields refer to setPropertyOnSpecificCommercialLoanAccount

Example

// This example will set the Amount of the Specific 
// Commercial Loan to 100,000 with the id of
// "07cc8823-ecbd-4040-b167-8a7722873d28". The
// idOrName can also be latest to specify the latest loan.
 
const idOrName: string = "07cc8823-ecbd-4040-b167-8a7722873d28";
const propertyName: string = "amount";
const propertyValue: number: 100000;
    
const command: contextCommand = {
    name: "setPropertyOnSpecificCommercialLoanAccount",
    args: [propertyName, propertyValue]
};

const tag: SummaryTag = {
    key: "sample-tag",
    text: "Sample Tag",
    tagType: FieldTagTypes.Info,
    onClick: [command]
};                 

ContextCommandDefinitions.setPropertyOnDepositAccount : ContextCommand

This context Command sets a value for the property specified by name on the specific commercial loan which can be used with the click event for Summary and Field Tags as well as in Andi Chat.

Kind: static property of ContextCommandDefinitions
Properties

Name Type Description
name string setPropertyOnDepositAccount
args Array.<any> [idOrName, propertyName, propertyValue] For more detailed information and a list of fields refer to setPropertyOnDepositAccount

Example

// This example will set the rate of the Specific 
// Deposit Account to 5% with the id of
// "07cc8823-ecbd-4040-b167-8a7722873d28". 
 
// Can be the id of the deposit account or the product name.
const idOrName: string = "07cc8823-ecbd-4040-b167-8a7722873d28";
const propertyName: string = "rate";
const propertyValue: number: 0.5;
    
const command: contextCommand = {
    name: "setPropertyOnDepositAccount",
    args: [propertyName, propertyValue]
};

const tag: SummaryTag = {
    key: "sample-tag",
    text: "Sample Tag",
    tagType: FieldTagTypes.Info,
    onClick: [command]
};                 

ContextCommandDefinitions.setPropertyOnOtherAccount : ContextCommand

This context Command sets a value for the property specified by name on the specific commercial loan which can be used with the click event for Summary and Field Tags as well as in Andi Chat.

Kind: static property of ContextCommandDefinitions
Properties

Name Type Description
name string setPropertyOnOtherAccount
args Array.<any> [idOrName, propertyName, propertyValue] For more detailed information and a list of fields refer to setPropertyOnOtherAccount

Example

// This example will set the description of the Specific 
// Other Account to 'Real Estate Investments' with the name of
// "Wealth Management". 
 
// Can be the id of the deposit account or the product name.
const idOrName: string = "Wealth Management";
const propertyName: string = "description";
const propertyValue: number: "Real Estate Investments";
    
const command: contextCommand = {
    name: "setPropertyOnOtherAccount",
    args: [propertyName, propertyValue]
};

const tag: SummaryTag = {
    key: "sample-tag",
    text: "Sample Tag",
    tagType: FieldTagTypes.Info,
    onClick: [command]
};                 

ContextCommandDefinitions.setPipelineScenario : ContextCommand

This context Command creates a pipeline scenario for scenario specified by id or by name and can be used with the click event for Summary and Field Tags as well as in Andi Chat.

Kind: static property of ContextCommandDefinitions
Properties

Name Type Description
name string setPipelineScenario
args Array.<any> scenarioIdOrName

Example

// This example will create Pipeline Scenario
// for the scenario "Main Scenario".

// This can also be the id of the scenario.
const scenarioIdOrName: string: "Main Scenario";
    
const command: contextCommand = {
    name: "setPipelineScenario",
    args: [scenarioIdOrName]
};

const tag: SummaryTag = {
    key: "sample-tag",
    text: "Sample Tag",
    tagType: FieldTagTypes.Info,
    onClick: [command]
};                 

ContextCommandDefinitions.setCurrentScenario : ContextCommand

This context Command makes the scenario specified by id or name the current scenario and can be used with the click event for Summary and Field Tags as well as in Andi Chat.

Kind: static property of ContextCommandDefinitions
Properties

Name Type Description
name string setCurrentScenario
args Array.<any> scenarioIdOrName

Example

// This example will set the pipeline scenario to 
// the scenario with the name "Main Scenario".

// This can also be the id of the scenario.
const scenarioIdOrName: string: "Main Scenario";
    
const command: contextCommand = {
    name: "setPipelineScenario",
    args: [scenarioIdOrName]
};

const tag: SummaryTag = {
    key: "sample-tag",
    text: "Sample Tag",
    tagType: FieldTagTypes.Info,
    onClick: [command]
};