---
schema_version: "1"
id: 226aba78572b7b4bfea7ba652e8c778fda8251a6225102f6a3a9dd7d2248329c
title: Omniscript Functions (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_omniscript_functions.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_omniscript_functions.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e0bfbe4f1cf7ffc67e6887887e459ca508990baa08c17a8d03bd11396bfc2ce2
description: For the managed package runtime, you can add functions to the Aggregate and Formula elements in Omniscripts.
products:
  - Omnistudio
release: "264"
---
# Omniscript Functions (Managed Package)

For the managed package runtime, you can add functions to the Aggregate and Formula elements in Omniscripts.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

For a list of functions for Omnistudio Data Mappers and Integration Procedures, see [Function Reference (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_function_reference.htm&release=264.0.0&type=5 "For the managed package runtime, use these operators and functions in Omnistudio Data Mappers and Integration Procedures, and in Vlocity Intelligence, eligibility rules, underwriting rules, state rules, and calculation procedures.").

For information on adding Formula or Aggregate elements to your Omniscript, see [Create a Formula or Aggregate in an Omniscript (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_create_a_formula_or_aggregate_in_an_omniscript.htm&release=264.0.0&type=5 "For the managed package runtime, run functions against element data with the Formula and Aggregate elements."). To view a list of supported formula operators that can be used with the Formula element, see [Supported Formula Operators (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_supported_formula_operators.htm&release=264.0.0&type=5 "For the managed package runtime, formula fields in Omniscript support the following operators:").

The tables below detail the different available Omniscript functions and how they work.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small " summary="Conversion Functions">
        <colgroup>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d331205e81">
              <p style="margin-bottom:0;">Function Name</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d331205e87">
              <p style="margin-bottom:0;">Example</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d331205e93">
              <p style="margin-bottom:0;">Details</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e81 ">
              <p style="margin-bottom:0;">ABS(number)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e87 ">
              <p style="margin-bottom:0;">ABS(%Friends%) == 6.52534</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e93 ">
              <p style="margin-bottom:0;">Returns the absolute value.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e81 ">
              <p style="margin-bottom:0;">BOOLEAN(value)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e87 ">&nbsp;</td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e93 ">
              <p style="margin-bottom:0;">Returns true or false.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e81 ">
              <p style="margin-bottom:0;">CURRENCY(value)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e87 ">&nbsp;</td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e93 ">
              <p style="margin-bottom:0;">Returns value formatted for currency. 12345 would display as 12,345.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e81 ">
              <p style="margin-bottom:0;">INTEGER(value)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e87 ">
              <p>INTEGER(%Friends%) == 6</p>
              <p style="margin-bottom:0;">INTEGER("12.5") == 12</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e93 ">
              <p style="margin-bottom:0;">Converts the number given into an integer with no decimal places. Does
                not round the number up. Also accepts a string.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e81 ">
              <p style="margin-bottom:0;">NULL</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e87 ">&nbsp;</td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e93 ">
              <p style="margin-bottom:0;">Renders an object's value null.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e81 ">
              <p style="margin-bottom:0;">NUMBER(value)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e87 ">
              <p style="margin-bottom:0;">NUMBER(%Friends%) == 128</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e93 ">
              <p style="margin-bottom:0;">Converts a string into a number.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e81 ">
              <p style="margin-bottom:0;">POW(number, exponent)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e87 ">
              <p style="margin-bottom:0;">POW(%Friends%, 3) == 274.625</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e93 ">
              <p style="margin-bottom:0;">Returns exponent value.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e81 ">
              <p style="margin-bottom:0;">RANDOM()</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e87 ">
              <p style="margin-bottom:0;">RANDOM()</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e93 ">
              <p style="margin-bottom:0;">Returns a random number between zero and one. This function is commonly
                used in A/B testing. The RANDOM() function does not accept
                parameters.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e81 ">
              <p style="margin-bottom:0;">ROUND(number, decimalPlaces)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e87 ">
              <p style="margin-bottom:0;">ROUND(%Friends%, 3) == 6.525</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e93 ">
              <p style="margin-bottom:0;">Rounds number to certain defined number of decimal places.</p>
            </td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small " summary="Conditional Functions">
        <colgroup>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d331205e301">
              <p style="margin-bottom:0;">Function Name</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d331205e307">
              <p style="margin-bottom:0;">Example</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d331205e313">
              <p style="margin-bottom:0;">Details</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e301 ">
              <p style="margin-bottom:0;">AND();</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e307 ">
              <p style="margin-bottom:0;">IF((%reset%="Yes" AND( %reboot%="Yes")), "Closed", "Escalated")</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e313 ">
              <p style="margin-bottom:0;">Logical operator that performs a function if all conditions are both
                met.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e301 ">
              <p style="margin-bottom:0;">COUNTIF(values, expression_or_value)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e307 ">
              <p style="margin-bottom:0;">COUNTIF(%MyArray%, &gt;10)</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e313 ">
              <p style="margin-bottom:0;">Returns a count of the number of repeated elements if a condition is
                met.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e301 ">
              <p style="margin-bottom:0;">EQUALS( Field_Name, 'Condition')</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e307 ">
              <p>IF(</p>
              <p>EQUALS(%Department%,'401(k)'),</p>
              <p>"Then Result",</p>
              <p>"Else Result"</p>
              <p style="margin-bottom:0;">)</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e313 ">
              <p style="margin-bottom:0;">The EQUALS function is used when comparing a field to a particular value
                or another field.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e301 ">
              <p style="margin-bottom:0;">IF(EXPRESSION,THEN, ELSE)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e307 ">
              <p style="margin-bottom:0;">IF((%reset%="Yes" || %reboot%="Yes"), "Closed", "Escalated")</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e313 ">
              <p style="margin-bottom:0;">If EXPRESSION evaluates to True, THEN is returned, otherwise ELSE is
                returned.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e301 ">
              <p style="margin-bottom:0;">OR()</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e307 ">
              <p style="margin-bottom:0;">IF((%reset%="Yes" OR( %reboot%="Yes")), "Closed", "Escalated")</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e313 ">&nbsp;</td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e301 ">
              <p style="margin-bottom:0;">SUMIF(values, expression_or_value)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e307 ">
              <p style="margin-bottom:0;">SUMIF(%MyArray%, &gt;5)</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e313 ">
              <p style="margin-bottom:0;">Returns the sum of all comma-separated elements and value if a condition
                is met.</p>
            </td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small " summary="Text Functions">
        <colgroup>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d331205e476">
              <p style="margin-bottom:0;">Function Name</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d331205e482">
              <p style="margin-bottom:0;">Example</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d331205e488">
              <p style="margin-bottom:0;">Details</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e476 ">
              <p style="margin-bottom:0;">CASE(value, $CASE)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e482 ">
              <p>CASE(%Name%, UPPER) == "TONY JONES"</p>
              <p>CASE(%Name%, LOWER) == "tony jones"</p>
              <p>CASE(%Name%, SENTENCE) == "Tony jones"</p>
              <p style="margin-bottom:0;">CASE(%Name%, TITLE) == "Tony Jones"</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e488 ">
              <p style="margin-bottom:0;">Changes case based on $CASE type. $CASE must be LOWER, UPPER, SENTENCE,
                or TITLE.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e476 ">
              <p style="margin-bottom:0;">CONCATENATE(value1, value2, ..., valueN)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e482 ">
              <p style="margin-bottom:0;">CONCATENATE(%FirstName%, " ", %LastName%) == "Tony Jones"</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e488 ">
              <p style="margin-bottom:0;">Concatenates the elements/strings together into a single string.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e476 ">
              <p style="margin-bottom:0;">CONTAINS(input_string,value)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e482 ">
              <p style="margin-bottom:0;">CONTAINS(%FirstName%, "Tony") == True</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e488 ">
              <p style="margin-bottom:0;">Evaluates if a value is contained within a string.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e476 ">
              <p style="margin-bottom:0;">SPLIT(text, splitToken, limit);</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e482 ">
              <p style="margin-bottom:0;">SPLIT("Tony Jones", " ", 2) == "Tony", "Jones"</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e488 ">&nbsp;</td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e476 ">
              <p style="margin-bottom:0;">STRING(value)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e482 ">
              <p style="margin-bottom:0;">STRING(%Friends%) == "6.5"</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e488 ">
              <p style="margin-bottom:0;">Converts any value into a String.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e476 ">
              <p style="margin-bottom:0;">SUBSTRING(text, startIndex, endIndex)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e482 ">
              <p style="margin-bottom:0;">SUBSTRING("Substring!", 3, 9) == "string"</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e488 ">
              <p style="margin-bottom:0;">Extracts the characters from a string between two specified indexes and
                returns the value.</p>
            </td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small " summary="Date Functions">
        <colgroup>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d331205e647">
              <p style="margin-bottom:0;">Function Name</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d331205e653">
              <p style="margin-bottom:0;">Example</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d331205e659">
              <p style="margin-bottom:0;">Details</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e647 ">
              <p style="margin-bottom:0;">AGE(dateOfBirth)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e653 ">
              <p style="margin-bottom:0;">AGE(%Birthdate%) == 7</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e659 ">
              <p style="margin-bottom:0;">Returns an age (in years) with the given date of birth on today's date.
                Use the Date element.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e647 ">
              <p style="margin-bottom:0;">AGEON(dateOfBirth, futureDate)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e653 ">
              <p style="margin-bottom:0;">AGEON(%Birthdate%,"07-09-2024") == 16</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e659 ">
              <p style="margin-bottom:0;">The age of someone (in years) with the given date of birth on a future
                date. Use the Date element.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e647 ">
              <p style="margin-bottom:0;">DATE(value)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e653 ">
              <p style="margin-bottom:0;">DATE(%DOB%) == Wed Jul 19 1978 16:00:00 GMT-0700 (PDT)</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e659 ">
              <p style="margin-bottom:0;">Use a Date element. Returns full JavaScript format.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e647 ">
              <p style="margin-bottom:0;">DATEDIFF(date1, date2)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e653 ">
              <p style="margin-bottom:0;">DATEDIFF(%DOB%,%TODAY%) == 13559</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e659 ">
              <p style="margin-bottom:0;">The difference between 2 dates in days. The value will always be a
                positive integer. Use the Date element.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e647 ">
              <p style="margin-bottom:0;">DAYOFMONTH(date)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e653 ">
              <p style="margin-bottom:0;">DAYOFMONTH(%TODAY%) == 2</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e659 ">
              <p style="margin-bottom:0;">Returns the day of the month. Use the Date element.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e647 ">
              <p style="margin-bottom:0;">DAYOFWEEK(date)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e653 ">
              <p style="margin-bottom:0;">DAYOFWEEK(%TODAY%) == 4</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e659 ">
              <p style="margin-bottom:0;">Returns the day of the week as an integer. Monday is 1, Sunday is 7.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e647 ">
              <p style="margin-bottom:0;">HOUR(date)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e653 ">&nbsp;</td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e659 ">
              <p style="margin-bottom:0;">Return the current hour according to local time.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e647 ">
              <p style="margin-bottom:0;">MINUTE(date)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e653 ">&nbsp;</td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e659 ">
              <p style="margin-bottom:0;">Return the current minute according to local time.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e647 ">
              <p style="margin-bottom:0;">MOMENT()</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e653 ">
              <p style="margin-bottom:0;">MOMENT(%policyStartDate%).add(1, 'year').subtract(1, 'day')</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e659 ">
              <p>Returns the moment object of <a href="https://momentjs.com/" target="_blank">Moment.js</a>
              </p>
              <p style="margin-bottom:0;">This can be used to perform complex date formatting, calculations,
                manipulation, comparisons, <em>etc.</em> The MOMENT() function must contain
                parameters, for example, MOMENT(NOW()). Appending .calendar() to this
                function is a recommended best practice.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e647 ">
              <p style="margin-bottom:0;">MONTH(date)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e653 ">
              <p style="margin-bottom:0;">MONTH(%TODAY%) == 9</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e659 ">
              <p style="margin-bottom:0;">The month of the year as an integer. Use the Date element.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e647 ">
              <p style="margin-bottom:0;" id="os_omniscript_functions__UUID-10002a7b-820d-4b59-dbb0-668ac997df14_para-idm693140123515966"><a name="os_omniscript_functions__UUID-10002a7b-820d-4b59-dbb0-668ac997df14_para-idm693140123515966"><!-- --></a>NOW()</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e653 ">
              <p style="margin-bottom:0;">NOW() == Thu Aug 27 2019 16:32:00 GMT -0700 (PDT)</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e659 ">
              <p>Returns current date and time in full JavaScript format. Milliseconds
                are always set to 0.</p>
              <p style="margin-bottom:0;">The $Vlocity.NOW environment variable applies
                the user or org time zone, while the NOW() function applies UTC
                time.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e647 ">
              <p style="margin-bottom:0;">TODAY()</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e653 ">
              <p style="margin-bottom:0;">TODAY() == Thu Aug 27 2019 00:00:00 GMT -0700 (PDT)</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e659 ">
              <p>Returns today's date. The time is always set to midnight</p>
              <p style="margin-bottom:0;">Known issue: When the TODAY() function is used in Set Values, it returns the
                previous date. Two workarounds exist: Use TODAY() + "", or use MOMENT()
                or TIMESTAMP() instead of TODAY().</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e647 ">
              <p style="margin-bottom:0;">YEAR(date)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e653 ">
              <p style="margin-bottom:0;">YEAR(%TODAY%) == 2019</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e659 ">
              <p style="margin-bottom:0;">Returns the year of the date as an integer. Use the Date element.</p>
            </td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small " summary="Aggregate Functions">
        <colgroup>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d331205e969">
              <p style="margin-bottom:0;">Function Name</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d331205e975">
              <p style="margin-bottom:0;">Example</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d331205e981">
              <p style="margin-bottom:0;">Details</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e969 ">
              <p style="margin-bottom:0;">ARRAY(value1, value2, ..., valueN)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e975 ">
              <p>ARRAY(%Child1%,%Child2%,</p>
              <p style="margin-bottom:0;">%Child3%,%Child4%) == [4,3,1,2]</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e981 ">
              <p style="margin-bottom:0;">Returns an array of the value of the elements.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e969 ">
              <p style="margin-bottom:0;">AVERAGE(array)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e975 ">
              <p style="margin-bottom:0;">AVERAGE(%Age%) == 2.5</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e981 ">
              <p style="margin-bottom:0;">Aggregate: returns the average mean value of the numbers provided. Use a
                repeating element.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e969 ">
              <p style="margin-bottom:0;">AVERAGE(value1, value2, ..., valueN)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e975 ">
              <p>AVERAGE(%Child1%,%Child2%,</p>
              <p style="margin-bottom:0;">%Child3%,%Child4%) == 2.5</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e981 ">
              <p style="margin-bottom:0;">Returns the average mean value of the numbers provided.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e969 ">
              <p style="margin-bottom:0;">COUNT(array)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e975 ">
              <p style="margin-bottom:0;">COUNT(%Age%) == 4</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e981 ">
              <p style="margin-bottom:0;">Aggregate: Returns a count of the number of repeated elements.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e969 ">
              <p style="margin-bottom:0;">EXISTS(array_or_value, expression_or_value)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e975 ">
              <p style="margin-bottom:0;">EXISTS([%FirstName%,%LastName%], "Tony") == true</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e981 ">
              <p style="margin-bottom:0;">Returns true if the given value exists in one or more elements. For
                Aggregate, enter the name of a repeating element—for example
                EXISTS(%FirstName%,"Tony"), where FirstName is repeatable.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e969 ">
              <p style="margin-bottom:0;">MAX(array)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e975 ">
              <p style="margin-bottom:0;">MAX(%AGE%) == 4</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e981 ">
              <p style="margin-bottom:0;">Aggregate: Returns the largest value in the numbers provided. Use a
                repeating element.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e969 ">
              <p style="margin-bottom:0;">MAX((value1, value2, ..., valueN)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e975 ">
              <p>MAX(%Child1%,%Child2%,</p>
              <p style="margin-bottom:0;">%Child3%,%Child4%) == 4</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e981 ">
              <p style="margin-bottom:0;">Returns the largest value in the group of elements provided.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e969 ">
              <p style="margin-bottom:0;">MIN(array)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e975 ">
              <p style="margin-bottom:0;">MIN(%AGE%) == 1</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e981 ">
              <p style="margin-bottom:0;">Aggregate: returns the smallest value in the numbers provided. Use a
                repeating element.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e969 ">
              <p style="margin-bottom:0;">MIN((value1, value2, ..., valueN)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e975 ">
              <p>MIN(%Child1%,%Child2%,</p>
              <p style="margin-bottom:0;">%Child3%,%Child4%) == 1</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e981 ">
              <p style="margin-bottom:0;">Returns the smallest value in the group of elements provided.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e969 ">
              <p style="margin-bottom:0;">SUM(array)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e975 ">
              <p style="margin-bottom:0;">SUM(%AGE%) == 10</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e981 ">
              <p style="margin-bottom:0;">Aggregate: returns the sum of all values in the repeatable element.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e969 ">
              <p style="margin-bottom:0;">SUM(value1, value2, ..., valueN)</p>
            </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e975 ">
              <p>SUM(%Child1%,%Child2%,</p>
              <p style="margin-bottom:0;">%Child3%,%Child4%) == 10</p>
            </td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d331205e981 ">
              <p>Returns the sum of all comma-separated elements and values.</p>
              <p style="margin-bottom:0;">Note that when you use a Formula input in an Omniscript with the SUM formula, the
                Expression text box defaults the precision of decimal values to two. This occurs
                even if you specify the desired number of decimal values in your formula. For
                instance, if you use the formula
                <code>ROUND(SUM(4.216546546,5.55463551),7)</code>, the result is 9.77
                instead of 9.7711821. To get precise decimal points, use the ROUND formula with a
                + (plus) sign instead. For instance, you can use the formula
                <code>ROUND(4.216546546+5.55463551,7)</code> instead of the one in the
                previous example to get the desired precision.
              </p>
            </td>

          </tr>
        </tbody>
      </table>