Name

sn_rf.RFEvaluatorSNC

Description

No description available

Script

var RFEvaluatorSNC = Class.create();
RFEvaluatorSNC.prototype = {
  __identifier: "RFEvaluatorSNC",

  /**********
   * Generates output schema for current evaluation type and returns the expected output structure of getEvaluationOutputs()
   * 
   * @param param.inputs JSON containing evaluation type input name:value pairs
   * @return JSON containing list of output's metadata
   **********/
  getEvaluationOutputSchema: function(param) {
      /*********
      For success scenario this function should return result in below format:
      {
          'status': 'success',
          'schema': [ 
              // List of records to show in pill picker
              {
                  'name': '', -- of type string
                  'label': '', -- of type string
                  'type': '' -- value should be either 'string' or 'reference'
                  //if type is reference
                  'referenceTable': '' -- non-null valid table name. Eg. 'incident'.
              },
              {}
          ]
          'metaData': {
              'uniqueKey': [], -- name of the records from schema json. Set of one or more than one fields.
              'confidence': '' -- name of the record from schema json which will have confidence
          }
      }
          
      For error scenario this function should return result in below format:
      {
          'status': 'error',
          'errorCode': '',
          'errorMessage': ''
      }
      **********/
  },

  /**********
   * Generates evaluation outputs for given record and inputs
   * 
   * @param param.contextRecord Current record for which we are evaluating
   * @param param.inputs JSON containing evaluation type input name:value pairs
   * @return JSON containing list of evaluation outputs
   **********/
  getEvaluationOutputs: function(param) {
      /**********
      For success scenario this function should return result in below format:
      {
          'status': 'success',
          'evaluationOutputs': [
               // List of key value pair
               {
                   'name': 'value'
               }
          ]
      }
      
      For error scenario this function should return result in below format:
      {
          'status': 'error',
          'errorCode': '',
          'errorMessage': ''
      }
      **********/
  },

  type: 'RFEvaluatorSNC'
};

Sys ID

99c9e92253723010e530ddeeff7b125b

Offical Documentation

Official Docs: