---
schema_version: "1"
id: 8ef48c6cc34e28978288bed233d7a8a75e1331a73e8537c8f917aa226a7ab86f
title: Create a Formula in Loyalty Program Process
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/promotion_setup_rule_formula.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.promotion_setup_rule_formula.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: de65d5eae3320b38c365607ca7ff12cd6d2973a598cf7cd58ab8159111e73931
description: You can use a formula to determine either the value of a parameter, the resource or value of a condition, or an input field of an action.
products:
  - Loyalty Management
release: "264"
---
# Create a Formula in Loyalty Program Process

You can use a formula to determine either the value of a parameter, the resource or value of a condition, or an input field of an action.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>,&nbsp;<strong>Performance</strong>, <strong>Unlimited</strong>, and&nbsp;<strong>Developer</strong>&nbsp;Editions with Loyalty Management</td></tr></tbody></table>

When you define a Formula type parameter, a condition, or an action, click ![Formula builder icon.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-loyalty_management-264-0-0-production-enus/0590ce3e-5a09-45ab-8e5e-68f359c35886/loyalty_management/images/promotion_setup_formula.png) to create a formula. Use a combination of supported functions, object fields and its related fields, Sobject data type parameters, and values for your formula.

You can select fields from these objects.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
      <colgroup>
        <col style="width:50%">
        <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="d12062e81">Object</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d12062e84">Context</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="Object" class="slds-cell-wrap" style="vertical-align:top;" headers="d12062e81 ">Transaction Journal</td>

          <td data-label="Context" class="slds-cell-wrap" style="vertical-align:top;" headers="d12062e84 ">Value of the field is determined by the transaction journal that’s being
            processed.</td>

        </tr>
        <tr class="">
          <td data-label="Object" class="slds-cell-wrap" style="vertical-align:top;" headers="d12062e81 ">Promotion</td>

          <td data-label="Context" class="slds-cell-wrap" style="vertical-align:top;" headers="d12062e84 ">
            <p>Value of the field is determined by the promotion associated with the rule that's
              processing the transaction journal.</p>
            <p style="margin-bottom:0;">Use a formula that contains a Promotion field in only
              the rules that are associated with promotions.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Object" class="slds-cell-wrap" style="vertical-align:top;" headers="d12062e81 ">Loyalty Program Member Promotion</td>

          <td data-label="Context" class="slds-cell-wrap" style="vertical-align:top;" headers="d12062e84 ">
            <p>Value of the field is determined by the Loyalty Program Member Promotion record that's
              associated with: </p>
            <ul>
              <li>The member associated with the transaction journal that’s being processed </li>
              <li>The promotion associated with the rule that’s processing the transaction journal</li>
            </ul>
            <p style="margin-bottom:0;">Use a formula that contains a Loyalty Program Member Promotion field in only the
              rules that are associated with promotions.</p>
          </td>

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

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-loyalty_management-264-0-0-production-enus/0590ce3e-5a09-45ab-8e5e-68f359c35886/images/icon_note.png)

Note You can’t use the TimeOnly data type attribute when you define the formula.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-loyalty_management-264-0-0-production-enus/0590ce3e-5a09-45ab-8e5e-68f359c35886/images/icon_example.png)

Example Here are a few example formulas.

 
| Use Case | Formula |
| --- | --- |
| To figure out the 10% of the Transaction Amount field in the Transaction Journal object. | {!TransactionJournal.TransactionAmount} \* 0.10 |
| To specify an expiration date that's two months after the activity date for issued vouchers. | ADDMONTHS({!TransactionJournal.ActivityDate}, 2) |
| Verifies whether an existing member has referred a new member | ISNULL({!TransactionJournal.ReferredMemberId}) |

#### See Also

- [_Salesforce Help_: Calculate Field Values with Formulas](https://help.salesforce.com/s/articleView?id=platform.customize_formuladef.htm&language=en_US)