Powers are a set of utility functions available to skill writers that enables them to easily perform common actions such as an HTTP GET request or send an email. Within the skill's ShouldIRun or Run methods, powers are available through the passed in `skillContext: andiSkills.ISkillContext` parameter. You can access the powers available to any skill through the `skillContext.powers` property. For example, skill writers can use the email power to deliver their insight through email.

Here is a code snippet for sending email from inside the skill Run method that uses the EmailFrequencyType of OneMinute which means this email message will be sent within the next minute whenever this skill code executes:

example
 skillContext.powers.andi.email.sendEmail(
      "opportunity-changed-email",
       andiSkills.EmailFrequencyTypes.OneMinute,
       [new andiSkills.EmailUserModel("yourname", "yourname@youremail.com")],
       "reply@youremail.com",
        "Test Email",
        "This is a test email.",
        "",
        ""
       );

Hierarchy

  • IPowerSet

Index

Properties

andi

andi: { batchJob: { fireAtMidnight: any; fireAtSundayMidnight: any; returnRunComplete: any }; chat: { addArticle: any; addSimpleHeader: any; composeResponse: any; getTopScoringIntent: any; sendResponse: any; sendSimpleHeader: any }; dataSets: { getDataSet: any }; dialogue: { composeDialogueTag: any; sendDialogueResponseWithTags: any }; email: { composeEmail: any; sendEmail: any }; event: { checkDailyMidnightEvent: any; checkFiveMinuteIntervalEvent: any; checkHourlyIntervalEvent: any; checkOneMinuteIntervalEvent: any; checkWeeklySundayMidnightEvent: any; getApplicationEvent: any; getNaturalLanguageEvent: any; returnRunComplete: any }; fieldTag: { composeFieldTag: any; sendFieldTag: any; sendFieldTags: any }; fileAttachments: { conversation: { storeCsvFileForCurrentUser: any } }; initialize: { initializeFailure: any; initializeSuccess: any }; request: { get: any; post: any }; secretKeys: { getOrganizationAppLevelKey: any }; shouldIRun: { shouldIRunFalse: any; shouldIRunTrue: any }; storage: { currentSkill: { get2dCSVFile: any; getCSVFile: any; getCSVFileOf: any; getFile: any; getJSONFile: any; getJSONFileOf: any; putFile: any }; installer: { get2dCSVFile: any; getCSVFile: any; getCSVFileOf: any; getFile: any; getJSONFile: any; getJSONFileOf: any; putFile: any }; publisher: { get2dCSVFile: any; getCSVFile: any; getCSVFileOf: any; getFile: any; getJSONFile: any; getJSONFileOf: any; putFile: any } } }

andi powers

Type declaration

  • batchJob: { fireAtMidnight: any; fireAtSundayMidnight: any; returnRunComplete: any }
    • fireAtMidnight: function
      • Use this ´fireAtMidnight´ method to run your skill everyday at midnight.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns Promise<IShouldIRunResponse>

        Returns true or false.

    • fireAtSundayMidnight: function
      • Use this ´fireAtSundayMidnight´ method to run your skill at midnight on Sunday.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns Promise<IShouldIRunResponse>

        Returns true or false.

    • returnRunComplete: function
      • Use this ´returnSuccess´ method to return a successful skill activity result.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns Promise<ISkillActivity>

        Returns true or false.

  • chat: { addArticle: any; addSimpleHeader: any; composeResponse: any; getTopScoringIntent: any; sendResponse: any; sendSimpleHeader: any }

    Use this power to compose and send chat responses formatted for Andi chat in PL.

    • addArticle: function
      • Use ´addArticle´ method to add an article to the NLP response

        Parameters

        • text: string

          is the text string displayed in the article

        • url: string

          is the hyperlink for the given text

        • skillActivity: ISkillActivity

          is the skill activity

        • Optional location: ListLocationTypes

          defines the placement of the article in the list of message articles. Property value is provided as a zero-based index. If omitted, article will be added to the end of the array.

        Returns void

    • addSimpleHeader: function
      • addSimpleHeader(headerText: string, skillActivity: ISkillActivity): void
      • Use ´addSimpleHeader´ method to add a simple header text message to any NLP response

        Parameters

        • headerText: string

          is the text string displayed as header

        • skillActivity: ISkillActivity

          is the ISkillActivity containing other types of nlp response

        Returns void

    • composeResponse: function
    • getTopScoringIntent: function
      • Use this to get the top scoring natural language understanding result based on intent.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns INaturalLanguageUnderstandingResult

    • sendResponse: function
      • Use ´sendResponse´ method to send an NLP response

        Parameters

        Returns Promise<ISkillActivity>

    • sendSimpleHeader: function
      • Use ´sendSimpleHeader´ method to send a simple header text message response

        Parameters

        • headerText: string

          is the text string displayed as header

        Returns Promise<ISkillActivity>

        skillActivity with nlp response

  • dataSets: { getDataSet: any }

    Use this power to query DataSets

  • dialogue: { composeDialogueTag: any; sendDialogueResponseWithTags: any }
    • composeDialogueTag: function
      • Use this method to generate ITag objects for including in a DialogueResponse

        Parameters

        • name: string

          The text string for tag name

        • tagType: FieldTagTypes

          fieldTagType Refer to FieldTagTypes documentation (usage andiSkills.FieldTagTypes.Info) - different tag types options are Info, Warning, ValueForTarget and Help.

        • text: string

          Text to show - tag message that gets displayed to the user

        • onClick: ContextCommand[]

          A collection of ContextCommands to invoke when the tag is clicked

        • Optional customIcon: string

          Custom icon url that can be sent from server and used by client side Andi to prefix icon before the text message

        Returns ITag

    • sendDialogueResponseWithTags: function
      • Use this method to send a dialogue response with tags

        Parameters

        • message: string

          The text string displayed as the header

        • tags: ITag[]

          A collection of ITag objects. Use 'composeDialogTag' to create objects.

        Returns Promise<ISkillActivity>

  • email: { composeEmail: any; sendEmail: any }

    Use this power to send skill run result through email channel. Email channel supports html body format.

    • composeEmail: function
      • composeEmail(emailCategory: string, frequencyType: EmailFrequencyTypes, toAddress: EmailUserModel[], fromAddress: string, subject: string, body: string, footer: string, bodyHeader: string): any
      • composeEmail can be used to generate an email message - very similar to sendEmail but does not send actual email - still work in progress

        deprecated

        Use EmailPowers.send(emailBody, emailOptions) - See EmailPowers documentation for further information.

        Parameters

        • emailCategory: string

          Use this parameter to give a category name for your message - multiple messages with the same email frequencyType, email category, email subject and same to address are grouped together and sent as one email to reduce email noise. Leave it blank for a simple email message.

        • frequencyType: EmailFrequencyTypes

          Refer to EmailFrequencyTypes documentation (usage andiSkills.EmailFrequencyTypes.OneMinute)- Currently supported email frequency types are: OneMinute (use this frequency if you want send email in the next one minute), FiveMinute, Hourly, Daily (use this frequency if you want to send email daily at 8 am EST), Weekly, BeginningOfMonth and EndOfMonth.

        • toAddress: EmailUserModel[]

          Refer to EmailUserModel documentation - array of email users - e.g. [new andiSkills.EmailUserModel("your name", "yourname@youremailaddress.com")].

        • fromAddress: string

          From address that will be attached to the email.

        • subject: string

          Subject for the email message - all emails with the same subject, same email frequency and same email to address will be combined together as one email to reduce email noise.

        • body: string

          Body of the email - this can be plain text or html.

        • footer: string

          Any special footer message - e.g. link to a disclaimer notice.

        • bodyHeader: string

          Any special header text - this is displayed at the beginning of the email body in bold format.

        Returns any

        Returns a promise, once it is completed it should place message in the email queue.

    • sendEmail: function
      • Use this ´sendEmail´ method to send email notifications.

        deprecated

        Use EmailPowers.send(emailBody, emailOptions) - See EmailPowers documentation for further information.

        Parameters

        • emailCategory: string

          Use this parameter to give a category name for your message - multiple messages with the same email frequencyType, email category, email subject and same to address are grouped together and sent as one email to reduce email noise. Leave it blank for a simple email message.

        • frequencyType: EmailFrequencyTypes

          Refer to EmailFrequencyTypes documentation (usage andiSkills.EmailFrequencyTypes.OneMinute)- Currently supported email frequency types are: OneMinute (use this frequency if you want send email in the next one minute), FiveMinute, Hourly, Daily (use this frequency if you want to send email daily at 8 am EST), Weekly, BeginningOfMonth and EndOfMonth.

        • toAddress: EmailUserModel[]

          Refer to EmailUserModel documentation - array of email users - e.g. [new andiSkills.EmailUserModel("your name", "yourname@youremailaddress.com")].

        • fromAddress: string

          From address that will be attached to the email.

        • subject: string

          Subject for the email message - all emails with the same subject, same email frequency and same email to address will be combined together as one email to reduce email noise.

        • body: string

          Body of the email - this can be plain text or html.

        • footer: string

          Any special footer message - e.g. link to a disclaimer notice.

        • bodyHeader: string

          Any special header text - this is displayed at the beginning of the email body in bold format.

        Returns Promise<ISkillActivity>

        Returns a promise, once it is completed it should place message in the email queue.

  • event: { checkDailyMidnightEvent: any; checkFiveMinuteIntervalEvent: any; checkHourlyIntervalEvent: any; checkOneMinuteIntervalEvent: any; checkWeeklySundayMidnightEvent: any; getApplicationEvent: any; getNaturalLanguageEvent: any; returnRunComplete: any }

    Use this power to get specific type of event i.e. Application vs Natural Language events

    • checkDailyMidnightEvent: function
      • Use this ´checkDailyMidnightEvent´ method to check if it is midnight - use this event for running special skills at this time.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns boolean

        Returns true or false.

    • checkFiveMinuteIntervalEvent: function
      • checkFiveMinuteIntervalEvent(skillContext?: ISkillContext): boolean
      • Use this ´checkFiveMinuteIntervalEvent´ method to check if five minutes has elapsed.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns boolean

        Returns true or false.

    • checkHourlyIntervalEvent: function
      • checkHourlyIntervalEvent(skillContext?: ISkillContext): boolean
      • Use this ´checkHourlyIntervalEvent´ method to check if an hour has elapsed.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns boolean

        Returns true or false.

    • checkOneMinuteIntervalEvent: function
      • checkOneMinuteIntervalEvent(skillContext?: ISkillContext): boolean
      • Use this ´checkOneMinuteIntervalEvent´ method to check if one minute has elapsed.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns boolean

        Returns true or false.

    • checkWeeklySundayMidnightEvent: function
      • checkWeeklySundayMidnightEvent(skillContext?: ISkillContext): boolean
      • Use this ´checkWeeklySundayMidnightEvent´ method to check if it is sunday midnight - use this event for running special skills at this time.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns boolean

        Returns true or false.

    • getApplicationEvent: function
      • Use this ´getApplicationEvent´ method to get an event in IApplicationEvent format - refer to IApplicationEvent documentation.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns IApplicationEvent

        Returns IApplicationEvent if the event is an application event otherwise null.

    • getNaturalLanguageEvent: function
      • Use this ´getNaturalLanguageEvent´ method to get an event in INaturalLanguageEvent format - refer to INaturalLanguageEvent documentation.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns INaturalLanguageEvent

        Returns INaturalLanguageEvent if the event is a natural language event otherwise null.

    • returnRunComplete: function
      • Use this ´returnSuccess´ method to return a successful skill activity result.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns Promise<ISkillActivity>

        Returns true or false.

  • fieldTag: { composeFieldTag: any; sendFieldTag: any; sendFieldTags: any }

    Use this power to send field tag message that gets displayed in the browser through client side Andi. Currently, only works on PrecisionLender Opportunity Page UI.

    • composeFieldTag: function
      • composeFieldTag(fieldTagType: FieldTagTypes, key: string, displayOrder: number, text: string, fields: string[], section: FieldTagSection, shouldIShow: (api: any, model: any, compareHash?: number | string, custom?: any) => boolean, action?: (api: any, model: any, custom?: any) => void, compareHash?: number | string, custom?: any, customIcon?: string): FieldTagModel
      • composeFieldTag can be used to generate field tag message - very similar to sendFieldTag but does not send actual field tag

        Parameters

        • fieldTagType: FieldTagTypes

          Refer to FieldTagTypes documentation (usage andiSkills.FieldTagTypes.Info) - different tag types options are Info, Warning, ValueForTarget and Help.

        • key: string

          Unique key to represent field tag on browser - always ensure that this key is updated to a unique value before deploying any skill.

        • displayOrder: number

          Display order number - client side Andi can use this for sorting the order of the field tag messages.

        • text: string

          Text to show - field tag message that gets displayed to the user.

        • fields: string[]

          Name of fields in an array where this message gets displayed on the UI. Consult your UI developer for finding out field names available on a page.

        • section: FieldTagSection

          (Optional) Used to display field tags under a custom header. Required Properties: headerText - string used when displaying the custom header.

        • shouldIShow: (api: any, model: any, compareHash?: number | string, custom?: any) => boolean

          Client side function that can be written within the skill to evaluate any special condition using the client side data to determine if field tag should be displayed - data passed are client side api, client side model, comparehash (a special selected field hash) and custom bag that can be sent from server as a custom parameter (i.e. the second last parameter of this method) .

            • (api: any, model: any, compareHash?: number | string, custom?: any): boolean
            • Parameters

              • api: any
              • model: any
              • Optional compareHash: number | string
              • Optional custom: any

              Returns boolean

        • Optional action: (api: any, model: any, custom?: any) => void

          Similar to shouldIShow parameter except when action is set, the field tag message is shown as an actionable link and on click of that link the code inside this action function is invoked.

            • (api: any, model: any, custom?: any): void
            • Parameters

              • api: any
              • model: any
              • Optional custom: any

              Returns void

        • Optional compareHash: number | string

          Compare hash that can be sent from server and used by client side shouldIShow or action function.

        • Optional custom: any

          Custom object that can be sent from server and used by client side shouldIShow or action function.

        • Optional customIcon: string

          Custom icon url that can be sent from server and used by client side Andi to prefix icon before the text message.

        Returns FieldTagModel

        Returns a promise, once it is completed it should send the field tag message to client side Andi.

    • sendFieldTag: function
      • sendFieldTag(fieldTagType: FieldTagTypes, key: string, displayOrder: number, text: string, fields: string[], section: FieldTagSection, shouldIShow: (api: any, model: any, compareHash?: number | string, custom?: any) => boolean, action?: (api: any, model: any, custom?: any) => void, compareHash?: number | string, custom?: any, customIcon?: string): Promise<ISkillActivity>
      • Use this ´sendFieldTag´ method to send field tag message to the client side Andi.

        Parameters

        • fieldTagType: FieldTagTypes

          Refer to FieldTagTypes documentation (usage andiSkills.FieldTagTypes.Info) - different tag types options are Info, Warning, ValueForTarget and Help.

        • key: string

          Unique key to represent field tag on browser - always ensure that this key is updated to a unique value before deploying any skill.

        • displayOrder: number

          Display order number - client side Andi can use this for sorting the order of the field tag messages.

        • text: string

          Text to show - field tag message that gets displayed to the user.

        • fields: string[]

          Name of fields in an array where this message gets displayed on the UI. Consult your UI developer for finding out field names available on a page.

        • section: FieldTagSection

          (Optional) Used to display field tags under a custom header. Required Properties: headerText - string used when displaying the custom header.

        • shouldIShow: (api: any, model: any, compareHash?: number | string, custom?: any) => boolean

          Client side function that can be written within the skill to evaluate any special condition using the client side data to determine if field tag should be displayed - data passed are client side api, client side model, comparehash (a special selected field hash) and custom bag that can be sent from server as a custom parameter (i.e. the second last parameter of this method) .

            • (api: any, model: any, compareHash?: number | string, custom?: any): boolean
            • Parameters

              • api: any
              • model: any
              • Optional compareHash: number | string
              • Optional custom: any

              Returns boolean

        • Optional action: (api: any, model: any, custom?: any) => void

          Similar to shouldIShow parameter except when action is set, the field tag message is shown as an actionable link and on click of that link the code inside this action function is invoked.

            • (api: any, model: any, custom?: any): void
            • Parameters

              • api: any
              • model: any
              • Optional custom: any

              Returns void

        • Optional compareHash: number | string

          Compare hash that can be sent from server and used by client side shouldIShow or action function.

        • Optional custom: any

          Custom object that can be sent from server and used by client side shouldIShow or action function.

        • Optional customIcon: string

          Custom icon url that can be sent from server and used by client side Andi to prefix icon before the text message.

        Returns Promise<ISkillActivity>

        Returns a promise, once it is completed it should send the field tag message to client side Andi.

    • sendFieldTags: function
      • Use this 'sendFieldTags' method to send multiple field tag messages to the client side Andi. Use 'composeFieldTag' to build the individual field tags.

        Parameters

        • fieldTags: FieldTagModel[]

          A collection of FieldTagModel objects. Use 'composeFieldTag' to create objects.

        Returns Promise<ISkillActivity>

  • fileAttachments: { conversation: { storeCsvFileForCurrentUser: any } }

    Use this power to save attachments

    • conversation: { storeCsvFileForCurrentUser: any }
      • storeCsvFileForCurrentUser: function
        • use this ´storeCsvFileForCurrentUser´ method to store a csv file for a current user's conversation

          Parameters

          • fileData: any

            the CSV data to be stored

          • Optional fileName: string

            optional file name for the CSV file

          Returns Promise<StoreAttachmentResponse>

          Returns StoreAttachmentResponse which includes the fileId which is used to help identify the newly created CSV file and an indicator whether the power was successful at storing the attachment

  • initialize: { initializeFailure: any; initializeSuccess: any }

    Use this power to easily return success or failure from initialize method

    • initializeFailure: function
      • Use this ´initializeFailure´ method incase of a failure on initialization - it encapsulates the promise return types.

        Returns Promise<ISkillInitializationResult>

        Returns a promise, once it is completed it should send the initialization failure message.

    • initializeSuccess: function
      • Use this ´initializeSuccess´ method to return success on initialization- it encapsulates the promise return types - e.g. .

        Returns Promise<ISkillInitializationResult>

        Returns a promise, once it is completed it should send the initialization success message.

  • request: { get: any; post: any }

    Use this power to make external https get or post request.

    • get: function
      • get(url: string, headers: any, requestTimeout?: number): Promise<any>
      • Use this ´get´ method to make an https get call.

        Parameters

        • url: string

          Url value that get request will call.

        • headers: any

          Header values for get request.

        • Optional requestTimeout: number

          request timeout in milliseconds, optional parameter

        Returns Promise<any>

        Returns a promise when completed should return the object received from https get request.

    • post: function
      • post(url: string, headers: any, data: any, requestTimeout?: number): Promise<any>
      • Use this ´post´ method to make an https post call.

        Parameters

        • url: string

          Url that post request will call.

        • headers: any

          Header values for post request.

        • data: any

          Json post body for post request.

        • Optional requestTimeout: number

          request timeout in milliseconds, optional parameter

        Returns Promise<any>

        Returns a promise, once it is completed it should return the object received from https post request.

  • secretKeys: { getOrganizationAppLevelKey: any }

    Use this power to get secret keys that are encrypted and stored at organization/application/skill level from Andi Gallery.

    • getOrganizationAppLevelKey: function
      • getOrganizationAppLevelKey(skillContext: ISkillContext, keyName: string): Promise<any>
      • Use this ´getOrganizationAppLevelKey´ method to retrieve any encrypted key configured and stored from Andi Gallery at the organization/application level.

        Parameters

        • skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        • keyName: string

          name of the key to retrieve.

        Returns Promise<any>

        Returns the key value object if present otherwise null.

  • shouldIRun: { shouldIRunFalse: any; shouldIRunTrue: any }

    Use this power to easily return true or false from shouldIRun method

    • shouldIRunFalse: function
      • Use this ´shouldIRunTrue´ method to return false from shouldIRunTrue- it encapsulates the promise return types.

        Returns Promise<IShouldIRunResponse>

        Returns a promise, once it is completed it should return false which will prevent skill run function from executing.

    • shouldIRunTrue: function
      • Use this ´shouldIRunTrue´ method to return true from shouldIRunTrue- it encapsulates the promise return types.

        Parameters

        • Optional estimatedRelevance: number

          Optional relevance that can be used to weight the priority of a skill run.

        Returns Promise<IShouldIRunResponse>

        Returns a promise, once it is completed it should return true which will cause skill run function to be called.

  • storage: { currentSkill: { get2dCSVFile: any; getCSVFile: any; getCSVFileOf: any; getFile: any; getJSONFile: any; getJSONFileOf: any; putFile: any }; installer: { get2dCSVFile: any; getCSVFile: any; getCSVFileOf: any; getFile: any; getJSONFile: any; getJSONFileOf: any; putFile: any }; publisher: { get2dCSVFile: any; getCSVFile: any; getCSVFileOf: any; getFile: any; getJSONFile: any; getJSONFileOf: any; putFile: any } }

    Use this power to retrieve files already stored from gallery at organization/skill level.

    • currentSkill: { get2dCSVFile: any; getCSVFile: any; getCSVFileOf: any; getFile: any; getJSONFile: any; getJSONFileOf: any; putFile: any }
      • get2dCSVFile: function
        • get2dCSVFile(path: string, options?: ICSVOptions): Promise<any[][]>
        • Use this ´get2dCSVFile´ method to retrieve a 2 dimensional array of from a CSV file stored at current skill level.

          deprecated

          Use DataPowers.get - See DataPowers documentation for more information.

          Parameters

          • path: string

            filepath filepath along with the filename to retrieve.

          • Optional options: ICSVOptions

            options used by the CSV Parser to generate the 2 dimensional array

          Returns Promise<any[][]>

          Return the 2 dimensional array from the file data otherwise null.

      • getCSVFile: function
        • getCSVFile(path: string, options?: ICSVOptions): Promise<any[]>
        • Use this ´getCSVFile´ method to retrieve an array of objects from a CSV file stored at current skill level.

          deprecated

          Use DataPowers.get - See DataPowers documentation for more information.

          Parameters

          • path: string

            filepath filepath along with the filename to retrieve.

          • Optional options: ICSVOptions

            options used by the CSV Parser to generate the 2 dimensional array

          Returns Promise<any[]>

          Return the an array of objects from the file data otherwise null.

      • getCSVFileOf: function
        • getCSVFileOf<T>(path: string, options?: ICSVOptions, autoMapDataTypes?: boolean): Promise<T[]>
        • Use this ´getCSVFileOf´ method to retrieve an array of objects of Type T from a CSV file stored at current skill level.

          deprecated

          Use DataPowers.get - See DataPowers documentation for more information.

          Type parameters

          • T

          Parameters

          • path: string

            filepath filepath along with the filename to retrieve.

          • Optional options: ICSVOptions

            options used by the CSV Parser to generate the array

          • Optional autoMapDataTypes: boolean

            use this boolean flag to auto map data types of a csv value, by default all values are mapped as string type

          Returns Promise<T[]>

          Return an array of objects of type T from the file data otherwise null.

      • getFile: function
        • getFile(path: string): Promise<any>
        • Use this ´getFile´ method to retrieve any file stored at current skill level.

          deprecated

          Use DataPowers.get - See DataPowers documentation for more information.

          Parameters

          • path: string

            filepath along with the filename to retrieve.

          Returns Promise<any>

          Returns the file buffer value if present otherwise null.

      • getJSONFile: function
        • getJSONFile(path: string): Promise<any>
        • Use this ´getJSONFile´ method to retrieve a JSON object from a file stored at current skill level.

          deprecated

          Use DataPowers.get - See DataPowers documentation for more information.

          Parameters

          • path: string

            filepath filepath along with the filename to retrieve.

          Returns Promise<any>

          Return the JSON object from the file data otherwise null.

      • getJSONFileOf: function
        • getJSONFileOf<T>(path: string): Promise<T>
        • Use this ´getJSONFileOfT´ method to retrieve an object from of Type T from a file stored at current skill level.

          deprecated

          Use DataPowers.get - See DataPowers documentation for more information.

          Type parameters

          • T

          Parameters

          • path: string

            filepath filepath along with the filename to retrieve.

          Returns Promise<T>

          Return the object of Type T from the file data otherwise null.

      • putFile: function
        • putFile(path: string, data: any): Promise<boolean>
        • Use this ´putFile´ method to create or update any file at current skill level.

          deprecated

          Use DataPowers.set - See DataPowers documentation for more information.

          Parameters

          • path: string

            filepath along with the filename to store.

          • data: any

            file data buffer to store.

          Returns Promise<boolean>

          Returns true if store operation is successful otherwise false.

    • installer: { get2dCSVFile: any; getCSVFile: any; getCSVFileOf: any; getFile: any; getJSONFile: any; getJSONFileOf: any; putFile: any }
      • get2dCSVFile: function
        • get2dCSVFile(path: string, options?: ICSVOptions): Promise<any[][]>
        • Use this ´get2dCSVFile´ method to retrieve a 2 dimensional array of from a CSV file stored at installed level.

          deprecated

          Use DataPowers.get - See DataPowers documentation for more information.

          Parameters

          • path: string

            filepath filepath along with the filename to retrieve.

          • Optional options: ICSVOptions

            options used by the CSV Parser to generate the 2 dimensional array

          Returns Promise<any[][]>

          Return the 2 dimensional array from the file data otherwise null.

      • getCSVFile: function
        • getCSVFile(path: string, options?: ICSVOptions): Promise<any[]>
        • Use this ´getCSVFile´ method to retrieve an array of objects from a CSV file stored at installed level.

          deprecated

          Use DataPowers.get - See DataPowers documentation for more information.

          Parameters

          • path: string

            filepath filepath along with the filename to retrieve.

          • Optional options: ICSVOptions

            options used by the CSV Parser to generate the 2 dimensional array

          Returns Promise<any[]>

          Return the array of objects from the file data otherwise null.

      • getCSVFileOf: function
        • getCSVFileOf<T>(path: string, options?: ICSVOptions, autoMapDataTypes?: boolean): Promise<T[]>
        • Use this ´getCSVFileOf´ method to retrieve an array of objects of Type T from a CSV file stored at installed level.

          deprecated

          Use DataPowers.get - See DataPowers documentation for more information.

          Type parameters

          • T

          Parameters

          • path: string

            filepath filepath along with the filename to retrieve.

          • Optional options: ICSVOptions

            options used by the CSV Parser to generate the array

          • Optional autoMapDataTypes: boolean

            use this boolean flag to auto map data types of a csv value, by default all values are mapped as string type

          Returns Promise<T[]>

          Return the array of objects of type T from the file data otherwise null.

      • getFile: function
        • getFile(path: string): Promise<any>
        • Use this ´getFile´ method to retrieve any file stored at installed skill level.

          deprecated

          Use DataPowers.get - See DataPowers documentation for more information.

          Parameters

          • path: string

            filepath along with the filename to retrieve.

          Returns Promise<any>

          Returns the file buffer value if present otherwise null.

      • getJSONFile: function
        • getJSONFile(path: string): Promise<any>
        • Use this ´getJSONFile´ method to retrieve a JSON object from a file stored at installed skill level.

          deprecated

          Use DataPowers.get - See DataPowers documentation for more information.

          Parameters

          • path: string

            filepath filepath along with the filename to retrieve.

          Returns Promise<any>

          Return the JSON object from the file data otherwise null.

      • getJSONFileOf: function
        • getJSONFileOf<T>(path: string): Promise<T>
        • Use this ´getJSONFileOfT´ method to retrieve an object from of Type T from a file stored at installed skill level.

          deprecated

          Use DataPowers.get - See DataPowers documentation for more information.

          Type parameters

          • T

          Parameters

          • path: string

            filepath filepath along with the filename to retrieve.

          Returns Promise<T>

          Return the object of Type T from the file data otherwise null.

      • putFile: function
        • putFile(path: string, data: any): Promise<boolean>
        • Use this ´putFile´ method to create or update any file at installed skill level.

          deprecated

          Use DataPowers.set - See DataPowers documentation for more information.

          Parameters

          • path: string

            filepath along with the filename to store.

          • data: any

            file data buffer to store.

          Returns Promise<boolean>

          Returns true if store operation is successful otherwise false.

    • publisher: { get2dCSVFile: any; getCSVFile: any; getCSVFileOf: any; getFile: any; getJSONFile: any; getJSONFileOf: any; putFile: any }
      • get2dCSVFile: function
        • get2dCSVFile(path: string, options?: ICSVOptions): Promise<any[][]>
        • Use this ´get2dCSVFile´ method to retrieve a 2 dimensional array of from a CSV file stored at publisher level.

          deprecated

          Use DataPowers.get - See DataPowers documentation for more information.

          Parameters

          • path: string

            filepath filepath along with the filename to retrieve.

          • Optional options: ICSVOptions

            options used by the CSV Parser to generate the 2 dimensional array

          Returns Promise<any[][]>

          Return the JSON object from the file data otherwise null.

      • getCSVFile: function
        • getCSVFile(path: string, options?: ICSVOptions): Promise<any[]>
        • Use this ´getCSVFile´ method to retrieve an array of objects from a CSV file stored at publisher level.

          deprecated

          Use DataPowers.get - See DataPowers documentation for more information.

          Parameters

          • path: string

            filepath filepath along with the filename to retrieve.

          • Optional options: ICSVOptions

            options used by the CSV Parser to generate the 2 dimensional array

          Returns Promise<any[]>

          Return the 2 dimensional array from the file data otherwise null.

      • getCSVFileOf: function
        • getCSVFileOf<T>(path: string, options?: ICSVOptions, autoMapDataTypes?: boolean): Promise<T[]>
        • Use this ´getCSVFileOf´ method to retrieve an array of objects of Type T from a CSV file stored at publisher level.

          deprecated

          Use DataPowers.get - See DataPowers documentation for more information.

          Type parameters

          • T

          Parameters

          • path: string

            filepath filepath along with the filename to retrieve.

          • Optional options: ICSVOptions

            options used by the CSV Parser to generate the array

          • Optional autoMapDataTypes: boolean

            use this boolean flag to auto map data types of a csv value, by default all values are mapped as string type

          Returns Promise<T[]>

          Return the array of objects of type T from the file data otherwise null.

      • getFile: function
        • getFile(path: string): Promise<any>
        • Use this ´getFile´ method to retrieve any file stored at publisher level.

          deprecated

          Use DataPowers.get - See DataPowers documentation for more information.

          Parameters

          • path: string

            filepath along with the filename to retrieve.

          Returns Promise<any>

          Returns the file buffer value if present otherwise null.

      • getJSONFile: function
        • getJSONFile(path: string): Promise<any>
        • Use this ´getJSONFile´ method to retrieve a JSON object from a file stored at publisher level.

          deprecated

          Use DataPowers.get - See DataPowers documentation for more information.

          Parameters

          • path: string

            filepath filepath along with the filename to retrieve.

          Returns Promise<any>

          Return the JSON object from the file data otherwise null.

      • getJSONFileOf: function
        • getJSONFileOf<T>(path: string): Promise<T>
        • Use this ´getJSONFileOfT´ method to retrieve an object from of Type T from a file stored at publisher level.

          deprecated

          Use DataPowers.get - See DataPowers documentation for more information.

          Type parameters

          • T

          Parameters

          • path: string

            filepath filepath along with the filename to retrieve.

          Returns Promise<T>

          Return the object of Type T from the file data otherwise null.

      • putFile: function
        • putFile(path: string, data: any): Promise<boolean>
        • Use this ´putFile´ method to create or update any file at publisher level.

          deprecated

          Use DataPowers.set - See DataPowers documentation for more information.

          Parameters

          • path: string

            filepath along with the filename to store.

          • data: any

            file data buffer to store.

          Returns Promise<boolean>

          Returns true if store operation is successful otherwise false.

core

core: { log: { debug: any } }

Type declaration

  • log: { debug: any }
    • debug: function
      • debug(message: string): void
      • function

        debug

        description

        Use the debug power to log small messages to your debug tab in the Andi Skills Manager. NOTE: The debug power only works when a skill version is in a development workgroup. If in a production workgroup, debug messages will not be saved.

        throws

        Error when all debug messages combined are 1024 characters or larger.

        Parameters

        • message: string

          Short debug message to help troubleshoot your skill.

        Returns void

machineLearning

machineLearning: { currentSkill: { checkForFitFiles: any; checkForPredictFiles: any; fit: any; predict: any }; installer: { checkForFitFiles: any; checkForPredictFiles: any; fit: any; predict: any }; getMLCurrentSkillPowers: any; getMLInstallerPowers: any }

Type declaration

  • currentSkill: { checkForFitFiles: any; checkForPredictFiles: any; fit: any; predict: any }
    • checkForFitFiles: function
      • checkForFitFiles(scriptName: string, dataName: string): Promise<boolean>
      • Use this ´checkForFitFiles´ to check that the script and data files are stored and available. If true, fit is ready to be run.

        Parameters

        • scriptName: string

          Name of the script file to check for.

        • dataName: string

          Name of the data file to check for.

        Returns Promise<boolean>

        IShouldIRunResponse result of true if files exist, false otherwise.

    • checkForPredictFiles: function
      • checkForPredictFiles(scriptName: string, modelName: string): Promise<boolean>
      • Use this ´checkForPredictFiles´ to check that the script and model files are stored and available. If true, predict is ready to be run.

        Parameters

        • scriptName: string

          Name of the script file to check for.

        • modelName: string

          Name of the model file to check for.

        Returns Promise<boolean>

        IShouldIRunResponse result of true if files exist, false otherwise.

    • fit: function
      • fit(scriptName: string, dataName: string, modelName: string, customData?: any): Promise<ISkillActivity>
      • Use this ´fit´ to run fit using the script and data files.

        Parameters

        • scriptName: string

          Name of the script file to use.

        • dataName: string
        • modelName: string

          Name that will be used to store the output of the fit execution.

        • Optional customData: any

          An object containing any custom data to be used during the fit execution.

        Returns Promise<ISkillActivity>

        A promise.

    • predict: function
      • predict(scriptName: string, modelName?: string, customData?: any): Promise<any>
      • Use this ´predict´ to run predict using the script and model files.

        Parameters

        • scriptName: string

          Name of the script file to use.

        • Optional modelName: string

          Name of the model file to use, if there is one. This should be the model output by the fit execution.

        • Optional customData: any

          An object containing any custom data to be used during the predict execution.

        Returns Promise<any>

        Response result with data to use to be used in skill.

  • installer: { checkForFitFiles: any; checkForPredictFiles: any; fit: any; predict: any }
    • checkForFitFiles: function
      • checkForFitFiles(scriptName: string, dataName: string): Promise<boolean>
      • Use this ´checkForFitFiles´ to check that the script and data files are stored and available. If true, fit is ready to be run.

        Parameters

        • scriptName: string

          Name of the script file to check for.

        • dataName: string

          Name of the data file to check for.

        Returns Promise<boolean>

        IShouldIRunResponse result of true if files exist, false otherwise.

    • checkForPredictFiles: function
      • checkForPredictFiles(scriptName: string, modelName: string): Promise<boolean>
      • Use this ´checkForPredictFiles´ to check that the script and model files are stored and available. If true, predict is ready to be run.

        Parameters

        • scriptName: string

          Name of the script file to check for.

        • modelName: string

          Name of the model file to check for.

        Returns Promise<boolean>

        IShouldIRunResponse result of true if files exist, false otherwise.

    • fit: function
      • fit(scriptName: string, dataName: string, modelName: string, customData?: any): Promise<ISkillActivity>
      • Use this ´fit´ to run fit using the script and data files.

        Parameters

        • scriptName: string

          Name of the script file to use.

        • dataName: string
        • modelName: string

          Name that will be used to store the output of the fit execution

        • Optional customData: any

          An object containing any custom data to be used during the fit execution.

        Returns Promise<ISkillActivity>

        A promise.

    • predict: function
      • predict(scriptName: string, modelName?: string, customData?: any): Promise<any>
      • Use this ´predict´ to run predict using the script and model files.

        Parameters

        • scriptName: string

          Name of the script file to use.

        • Optional modelName: string

          Name of the model file to use. This should be the model output by the fit execution.

        • Optional customData: any

          An object containing any custom data to be used during the predict execution.

        Returns Promise<any>

        Response result with data to use to be used in skill.

  • getMLCurrentSkillPowers: function
    • getMLCurrentSkillPowers(): IPowerSet["machineLearning"]["currentSkill"]
    • Use this ´getMLCurrentSkillPowers´ method to get the power collection to use for machine learning with current skill level data. The power collection returned will utilize current skill level storage when accessing/storing files needed for writing a skill with this power.

      Returns IPowerSet["machineLearning"]["currentSkill"]

      Current skill level power set collection to use.

  • getMLInstallerPowers: function
    • getMLInstallerPowers(): IPowerSet["machineLearning"]["installer"]
    • Use this ´getMLInstallerPowers´ method to get the power collection to use for machine learning with installed skill level data. The power collection returned will utilize installed skill level storage when accessing/storing files needed for writing a skill with this power.

      Returns IPowerSet["machineLearning"]["installer"]

      Installed skill level power set collection to use.

precisionLender

precisionLender: { api: { delayGet: any; get: any }; engine: { assumptionSet: { getAssumptionSet: any }; commitment: { getCalculationEngine: any; recalculate: any }; deposit: { getCalculationEngine: any; recalculate: any }; loan: { getCalculationEngine: any; getCustomerLoanAmortization: any; recalculate: any; solveForRoe: any }; opportunity: { getCalculationEngine: any; recalculate: any }; other: { getCalculationEngine: any; recalculate: any }; scenario: { getCalculationEngine: any; recalculate: any } }; opportunity: { api: { v2: { getOpportunityRelationshipImpactResponse: any; getOpportunityResponse: any; getRelationshipForOpportunity: any } }; getCurrentOpportunityModel: any; getDepositAccounts: any; getLoanAccounts: any; getMasterCommitment: any; getOpportunityChangeEventData: any; getOtherFeesAccounts: any; getSavedOpportunityModel: any; getTrancheLoans: any; getTranches: any; hasMasterCommitment: any; isDepositAccountChangeEvent: any; isLoanAccountChangeEvent: any; isOpportunityChangeEvent: any; isOpportunitySavedClickEvent: any; isOtherAccountChangeEvent: any }; relationship: { api: { v2: { getFullRelationshipResponse: any; getRelationshipAccountSummariesResponse: any; getRelationshipSummaryResponse: any } } }; skills: { getHelpContent: { run: any; shouldIRun: any }; appendDefaultDefinition: any; getSearchResults: any; sendSupportTicket: any } }

precisionLender powers

Type declaration

  • api: { delayGet: any; get: any }

    Use this power to query precisionLender api endpoints. This power will use precisionLender service username and password secret keys which can be configure and stored as a secret from Andi Gallery.

    • delayGet: function
      • delayGet(skillContext: ISkillContext, url: string, delayInSeconds: number, requestTimeout?: number): Promise<any>
      • Use this ´delayGet´ method to get data from api endpoints with a delayed timeout. This delayed timeout in seconds will help in avoiding any request throttling for PL endpoints.

        throws

        Will throw an error if the service user has not been configured.

        Parameters

        • skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        • url: string

          api endpoint url to query.

        • delayInSeconds: number

          delay in seconds that will be used to wait before sending the get request.

        • Optional requestTimeout: number

          request timeout in milliseconds, optional parameter

        Returns Promise<any>

        Returns response result from api endpoint when successful otherwise returns null.

    • get: function
      • get(skillContext: ISkillContext, url: string, requestTimeout?: number): Promise<any>
      • Use this ´get´ method to get data from api endpoints.

        throws

        Will throw an error if the service user has not been configured.

        Parameters

        • skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        • url: string

          api endpoint url to query.

        • Optional requestTimeout: number

          request timeout in milliseconds, optional parameter

        Returns Promise<any>

        Returns response result from api endpoint when successful otherwise returns null.

  • engine: { assumptionSet: { getAssumptionSet: any }; commitment: { getCalculationEngine: any; recalculate: any }; deposit: { getCalculationEngine: any; recalculate: any }; loan: { getCalculationEngine: any; getCustomerLoanAmortization: any; recalculate: any; solveForRoe: any }; opportunity: { getCalculationEngine: any; recalculate: any }; other: { getCalculationEngine: any; recalculate: any }; scenario: { getCalculationEngine: any; recalculate: any } }

    Use this power the take advantage of the PrecisionLender calculation engines.

  • opportunity: { api: { v2: { getOpportunityRelationshipImpactResponse: any; getOpportunityResponse: any; getRelationshipForOpportunity: any } }; getCurrentOpportunityModel: any; getDepositAccounts: any; getLoanAccounts: any; getMasterCommitment: any; getOpportunityChangeEventData: any; getOtherFeesAccounts: any; getSavedOpportunityModel: any; getTrancheLoans: any; getTranches: any; hasMasterCommitment: any; isDepositAccountChangeEvent: any; isLoanAccountChangeEvent: any; isOpportunityChangeEvent: any; isOpportunitySavedClickEvent: any; isOtherAccountChangeEvent: any }

    Use this power to examine an application event for opportunity specific data.

    • api: { v2: { getOpportunityRelationshipImpactResponse: any; getOpportunityResponse: any; getRelationshipForOpportunity: any } }

      Use this power to get opportunity related details from PrecisionLender API endpoints.

      • v2: { getOpportunityRelationshipImpactResponse: any; getOpportunityResponse: any; getRelationshipForOpportunity: any }
        • getOpportunityRelationshipImpactResponse: function
          • Use this ´getOpportunityRelationshipImpactResponse´ method to get v2 OpportunityRelationshipImpactResponse object from PrecisionLender API endpoint.

            Parameters

            • opportunityId: string

              opportunity Id to use when PrecisionLender API endpoint is called.

            • Optional relationshipId: string
            • Optional scenarioId: string
            • Optional calcParams: string

            Returns Promise<OpportunityRelationshipImpactResponse>

            Returns the OpportunityRelationshipImpactResponse object. Returns null if the call fails or the opportunity does not exist.

        • getOpportunityResponse: function
          • getOpportunityResponse(opportunityId: string, calcParams?: string): Promise<OpportunityResponse>
          • Use this ´getOpportunityResponse´ method to get v2 OpportunityResponse object from PrecisionLender API endpoint.

            Parameters

            • opportunityId: string

              opportunity Id to use when PrecisionLender API endpoint is called.

            • Optional calcParams: string

            Returns Promise<OpportunityResponse>

            Returns the OpportunityResponse object. Returns null if the call fails or the opportunity does not exist.

        • getRelationshipForOpportunity: function
          • Use this getRelationshipForOpportunity method to get v2 FullRelationshipResponse object associated with an Opportunity from PrecisionLender API endpoint.

            Parameters

            • opportunityId: string

              opportunity Id to use when PrecisionLender API endpoint is called.

            Returns Promise<FullRelationshipResponse>

            Returns the FullRelationshipResponse object for the given opportunityId if there is an associated Relationship otherwise null.

    • getCurrentOpportunityModel: function
      • Use this ´getCurrentOpportunityModel´ method to get Opportunity model if available within the conversation.

        Returns Promise<OpportunityModel>

        Returns a Promise that will return a PrecisionLender.OpportunityModel if available otherwise null.

    • getDepositAccounts: function
      • Use this ´getDepositAccounts´ method to get deposit accounts from the event data.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns any[]

        Returns deposit accounts as an array if it is an opportunity change event otherwise returns null.

    • getLoanAccounts: function
      • Use this ´getLoanAccounts´ method to get loan accounts from the event data.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns any[]

        Returns loan accounts as an array if it is an opportunity change event otherwise returns null.

    • getMasterCommitment: function
      • Use this ´getMasterCommitment´ method to get the Master Commitment from the current skillContext if it exists

        Returns Promise<MasterCommitment>

        Returns the Master Commitment object if it exists otherwise returns null

    • getOpportunityChangeEventData: function
      • getOpportunityChangeEventData(skillContext?: ISkillContext): any
      • Use this ´getOpportunityChangeEventData´ method to get opportunity change data from the event.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns any

        Returns event data as an object if it is an opportunity change event otherwise returns null.

    • getOtherFeesAccounts: function
      • Use this ´getOtherFeesAccounts´ method to get other/fees accounts from the event data.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns any[]

        Returns other/fees accounts as an array if it is an opportunity change event otherwise returns null.

    • getSavedOpportunityModel: function
      • Use this ´getSavedOpportunityModel´ method to get Saved Opportunity model if available.

        Returns Promise<SavedOpportunity>

        Returns a Promise that will return a PrecisionLender.Opportunity.OpportunityResponseModel.SavedOpportunity if available otherwise returns null

    • getTrancheLoans: function
      • Use this ´getMasterCommitment´ method to get Tranches LoanAccount object from the Master Commitment

        Parameters

        Returns Promise<LoanAccount[]>

        Returns an array of the Tranche Loan Accounts.

    • getTranches: function
      • Use this ´getTranches´ method to get an array of Tranche Entries for the Master Commitment

        Parameters

        Returns Promise<TrancheEntry[]>

        Return an array of Tranche Entries.

    • hasMasterCommitment: function
      • hasMasterCommitment(): boolean
      • Use this ´hasMasterCommitment´ method to determine if the current skillContext has a Master Commitment

        Returns boolean

        true if it exists or false if it does not exist.

    • isDepositAccountChangeEvent: function
      • isDepositAccountChangeEvent(skillContext?: ISkillContext): boolean
      • Use this ´isDepositAccountChangeEvent´ method to check if an incoming event is a deposit account change event.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns boolean

        Returns true or false.

    • isLoanAccountChangeEvent: function
      • isLoanAccountChangeEvent(skillContext?: ISkillContext): boolean
      • Use this ´isLoanAccountChangeEvent´ method to check if an incoming event is a loan change event.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns boolean

        Returns true or false.

    • isOpportunityChangeEvent: function
      • isOpportunityChangeEvent(skillContext?: ISkillContext): boolean
      • Use this ´isOpportunityChangeEvent´ method to check if an incoming event is an opportunity change event.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns boolean

        Returns true or false.

    • isOpportunitySavedClickEvent: function
      • isOpportunitySavedClickEvent(skillContext?: ISkillContext): boolean
      • Use this ´isOpportunitySavedClickEvent´ method to check if an incoming event is an opportunity saved click event.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns boolean

        Returns true or false. Returns null if the call fails or the opportunity does not exist.

    • isOtherAccountChangeEvent: function
      • isOtherAccountChangeEvent(skillContext?: ISkillContext): boolean
      • Use this ´isOtherAccountChangeEvent´ method to check if an incoming event is an other account change event.

        Parameters

        • Optional skillContext: ISkillContext

          current skill context - i.e. the passed in parameter to shouldIRun or run method.

        Returns boolean

        Returns true or false.

  • relationship: { api: { v2: { getFullRelationshipResponse: any; getRelationshipAccountSummariesResponse: any; getRelationshipSummaryResponse: any } } }

    Use this power to get relationship specific data.

    • api: { v2: { getFullRelationshipResponse: any; getRelationshipAccountSummariesResponse: any; getRelationshipSummaryResponse: any } }

      Use this power to get relationship related details from PrecisionLender API endpoints.

      • v2: { getFullRelationshipResponse: any; getRelationshipAccountSummariesResponse: any; getRelationshipSummaryResponse: any }
        • getFullRelationshipResponse: function
          • Use this ´getFullRelationshipResponse´ method to get v2 FullRelationshipResponse object from PrecisionLender API endpoint.

            Parameters

            • relationshipId: string

              relationship Id to use when PrecisionLender API endpoint is called.

            Returns Promise<FullRelationshipResponse>

            Returns the FullRelationshipResponse object.

        • getRelationshipAccountSummariesResponse: function
          • Use this ´getRelationshipAccountSummaryResponse´ method to get v2 RelationshipAccountSummaryResponse object from PrecisionLender API endpoint.

            Parameters

            • relationshipId: string

              relationship Id to use when PrecisionLender API endpoint is called.

            • accountType: PrecisionLender.V2.AccountTypes

              account type (i.e. Loan, Deposit, Other ) to use when PrecisionLender API endpoint is called.

            Returns Promise<RelationshipAccountSummaryResponse[]>

            Returns the RelationshipAccountSummaryResponse object. Returns null if the call fails or the relationship does not exist.

        • getRelationshipSummaryResponse: function
          • Use this ´getRelationshipSummaryResponse´ method to get v2 RelationshipSummaryResponse object from PrecisionLender API endpoint.

            Parameters

            • relationshipId: string

              relationship Id to use when PrecisionLender API endpoint is called.

            Returns Promise<RelationshipSummaryResponse>

            Returns the RelationshipSummaryResponse object. Returns null if the call fails or the relationship does not exist.

  • skills: { getHelpContent: { run: any; shouldIRun: any }; appendDefaultDefinition: any; getSearchResults: any; sendSupportTicket: any }

    Use this power to call any PrecisionLender overridable skills.

    • getHelpContent: { run: any; shouldIRun: any }
    • appendDefaultDefinition: function
      • Use this ´appendDefaultDefinition´ method to add any existing PrecisionLender definition found using the nlp request (i.e. raw query text).

        Parameters

        • response: ISkillActivity

          current ISkillActivity response containing nlp results.

        Returns Promise<ISkillActivity>

        Returns ISkillActivity response with the default definition appended, if no definition is found, it will simply return the ISkillActivity response.

    • getSearchResults: function
      • getSearchResults(query: string, filter?: string, top?: number): Promise<ISearchResult[]>
      • Use this ´getSearchResults´ method to query the PrecisionLender article and definitions Knowledge Base.

        Parameters

        • query: string

          Azure Search query string

        • Optional filter: string

          optional Azure Search filter

        • Optional top: number

          optional number of results to return (default is 4)

        Returns Promise<ISearchResult[]>

        Returns an array of search results

    • sendSupportTicket: function
      • sendSupportTicket(subject?: string, body?: string): Promise<any>
      • Sends a Support ticket to PrecisionLenders (ZenDesk). The properties of the ticket are drawn from the calling event.

        Parameters

        • Optional subject: string

          optional subject. Will be backfilled by default if undefined.

        • Optional body: string

          optional body . Will be backfilled by default if undefined.

        Returns Promise<any>

Generated using TypeDoc