---
schema_version: "1"
id: e3a85a6b8a6b3c3a6490d40075e06328e1fdeec2155c1f4579f055e3cf0575a2
title: Omnistudio Conditional Functions
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_omnistudio_conditional_functions.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_conditional_functions.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 9ce9695fd2177a44f775ad0828487e7b11ee950d220467ce831dce9a2b53e071
description: Functions that perform conditional operations.
products:
  - Omnistudio
release: "264"
---
# Omnistudio Conditional Functions

Functions that perform conditional operations.

- **[Omnistudio IF Function](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_conditional_functions.htm&release=264.0.0&type=5)**  
    Evaluates an expression to determine whether it's true or false and returns the indicated response. If the expression evaluates to true, the function returns the true (first) result. Otherwise, the function returns the false (second) result.
- **[Omnistudio ISBLANK Function](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_conditional_functions.htm&release=264.0.0&type=5)**  
    Returns true if an expression is blank or empty. Otherwise, the function returns false.
- **[Omnistudio ISNOTBLANK Function](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_conditional_functions.htm&release=264.0.0&type=5)**  
    Returns true if an expression is not blank or empty. Otherwise, the function returns false.

## Omnistudio IF Function

Evaluates an expression to determine whether it's true or false and returns the indicated response. If the expression evaluates to true, the function returns the true (first) result. Otherwise, the function returns the false (second) result.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_important.png)

Important

Both the true and false branches are always evaluated and it returns the result of the false branch. This becomes significant when either branch contains operations with side effects (such as `InvokeIP`, , DML operations, or callouts), because actions in the true branch may still execute even when the condition is false.

For example:

```
IF(
    ISNOTBLANK(Account.Id),
    InvokeIP(
        'AccountCreateIP_AccountCreateIP',
        INPUT('SomeKey', 'SomeVal'),
        'OutputKey'
    ),
    'IP Not Called'
)
```

In this example, even if `Account.Id` is blank (which should lead to returning `"IP Not Called"`), the `InvokeIP` function in the true branch is still evaluated.

### Signature

`IF(expression, trueResult, falseResult)`

### Return Value

Any data type

### Parameters

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col style="width:16.666666666666664%">
              <col style="width:16.666666666666664%">
              <col style="width:16.666666666666664%">
              <col style="width:50%">
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d62623e157">
                  <p style="margin-bottom:0;">Parameter</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d62623e163">
                  <p style="margin-bottom:0;">Data Type</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d62623e169">
                  <p style="margin-bottom:0;">Necessity</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d62623e175">
                  <p style="margin-bottom:0;">Description</p>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d62623e157 ">
                  <p style="margin-bottom:0;"><code><var>expression</var></code></p>
                </td>

                <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d62623e163 ">
                  <p style="margin-bottom:0;">Expression</p>
                </td>

                <td data-label="Necessity" class="slds-cell-wrap" style="vertical-align:top;" headers="d62623e169 ">
                  <p style="margin-bottom:0;">Required</p>
                </td>

                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d62623e175 ">
                  <p style="margin-bottom:0;">An expression that resolves to true or false.</p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d62623e157 ">
                  <p style="margin-bottom:0;"><code><var>trueResult</var></code></p>
                </td>

                <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d62623e163 ">
                  <p style="margin-bottom:0;">Expression</p>
                </td>

                <td data-label="Necessity" class="slds-cell-wrap" style="vertical-align:top;" headers="d62623e169 ">
                  <p style="margin-bottom:0;">Required</p>
                </td>

                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d62623e175 ">
                  <p style="margin-bottom:0;">An expression that resolves to the value to be returned if the
                    <var>expression</var> parameter is true.
                  </p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d62623e157 ">
                  <p style="margin-bottom:0;"><code><var>falseResult</var></code></p>
                </td>

                <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d62623e163 ">
                  <p style="margin-bottom:0;">Expression</p>
                </td>

                <td data-label="Necessity" class="slds-cell-wrap" style="vertical-align:top;" headers="d62623e169 ">
                  <p style="margin-bottom:0;">Required</p>
                </td>

                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d62623e175 ">
                  <p style="margin-bottom:0;">An expression that resolves to the value to be returned if the
                    <var>expression</var> parameter is false.
                  </p>
                </td>

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

![String Comparison Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_example.png)

String Comparison Example

Formula: `IF(("abc" LIKE "a"), "true", "false")`

Return value: `"true"`

![String Comparison Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_example.png)

String Comparison Example

Formula: `IF(("a" LIKE "abc"), "true", "false")`

Return value: `"false"`

![Evaluate a Date Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_example.png)

Evaluate a Date Example

Sample data: `InputDate: "1999-07-01"`

Formula: `IF(InputDate < "2000-01-01", "20th Century", "21st Century")`

Return value: `"20th Century"`

![Parse a Substring Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_example.png)

Parse a Substring Example

Sample data: `"Price": "$800.00"`

Formula: `IF(SUBSTRING(Price, 0, 1) == "$", SUBSTRING(Price, 1), Price)`

Return value: `"800.00"`

![Avoid Division by Zero Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_example.png)

Avoid Division by Zero Example

Sample data: `"Amount": 2`

Formula: `IF(Amount > 0, 1 / IF(Amount > 0, Amount, 1), 0)`

Return value: `0.5`

![Avoid Division by Zero Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_example.png)

Avoid Division by Zero Example

Sample data: `"Amount": 0`

Formula: `IF(Amount > 0, 1 / IF(Amount > 0, Amount, 1), 0)`

Return value: `0`

![Alternative Division by Zero Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_example.png)

Alternative Division by Zero Example

Sample data: `"Amount": 0`

Formula: `IF(Amount > 0, 1 / IF(Amount > 0, Amount, 1), "Undefined")`

Return value: `"Undefined"`

## Omnistudio ISBLANK Function

Returns true if an expression is blank or empty. Otherwise, the function returns false.

### Signature

`ISBLANK(expression)`

### Return Value

Boolean

### Parameters

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col style="width:16.666666666666664%">
              <col style="width:16.666666666666664%">
              <col style="width:16.666666666666664%">
              <col style="width:50%">
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d62623e483">
                  <p style="margin-bottom:0;">Parameter</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d62623e489">
                  <p style="margin-bottom:0;">Data Type</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d62623e495">
                  <p style="margin-bottom:0;">Necessity</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d62623e501">
                  <p style="margin-bottom:0;">Description</p>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d62623e483 ">
                  <p style="margin-bottom:0;"><code><var>expression</var></code></p>
                </td>

                <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d62623e489 ">
                  <p style="margin-bottom:0;">String or list</p>
                </td>

                <td data-label="Necessity" class="slds-cell-wrap" style="vertical-align:top;" headers="d62623e495 ">
                  <p style="margin-bottom:0;">Required</p>
                </td>

                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d62623e501 ">
                  <p style="margin-bottom:0;">An expression that resolves to a string or list to determine whether it is empty.</p>
                </td>

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

![String Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_example.png)

String Example

Formula: `ISBLANK("")`

Return value: `true`

![List Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_example.png)

List Example

Formula: `ISBLANK(())`

Return value: `true`

![Array Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_example.png)

Array Example

Formula: `ISBLANK([])`

Return value: `true`

![JSON Array Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_example.png)

JSON Array Example

Sample data: `"EmptyList": []`

Formula: `ISBLANK(%EmptyList%)`

Return value: `true`

## Omnistudio ISNOTBLANK Function

Returns true if an expression is not blank or empty. Otherwise, the function returns false.

### Signature

`ISNOTBLANK(expression)`

### Return Value

Boolean

### Parameters

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col style="width:16.666666666666664%">
              <col style="width:16.666666666666664%">
              <col style="width:16.666666666666664%">
              <col style="width:50%">
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d62623e674">
                  <p style="margin-bottom:0;">Parameter</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d62623e680">
                  <p style="margin-bottom:0;">Data Type</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d62623e686">
                  <p style="margin-bottom:0;">Necessity</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d62623e692">
                  <p style="margin-bottom:0;">Description</p>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d62623e674 ">
                  <p style="margin-bottom:0;"><code><var>expression</var></code></p>
                </td>

                <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d62623e680 ">
                  <p style="margin-bottom:0;">String or list</p>
                </td>

                <td data-label="Necessity" class="slds-cell-wrap" style="vertical-align:top;" headers="d62623e686 ">
                  <p style="margin-bottom:0;">Required</p>
                </td>

                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d62623e692 ">
                  <p style="margin-bottom:0;">An expression that resolves to a string or list to determine whether it is not empty.</p>
                </td>

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

![String Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_example.png)

String Example

Formula: `ISNOTBLANK('Hello world')`

Return value: `true`

![List Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_example.png)

List Example

Formula: `ISNOTBLANK(("a", "b"))`

Return value: `true`

![Array Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_example.png)

Array Example

Formula: `ISNOTBLANK([1, 2])`

Return value: `true`

![JSON Array Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_example.png)

JSON Array Example

Sample data: `"NumberList": [1, 2]`

Formula: `ISNOTBLANK(%NumberList%)`

Return value: `true`