---
schema_version: "1"
id: 9817402e8cde2d3d130d384a98cc08447eb3047fefeaa49a43759948aaa87529
title: Create a Flow to Credit Points to Members
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/create_accrual_flow.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.create_accrual_flow.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 4d6d1254b305f8d825b86ac2ff50e5038675cc18f4097493506c6cc68fca2f74
description: For example, admins of an airline can set up a batch job to credit points to loyalty program members based on the class of ticket purchased or promotion.
products:
  - Loyalty Management
release: "264"
---
# Create a Flow to Credit Points to Members

For example, admins of an airline can set up a batch job to credit points to loyalty program members based on the class of ticket purchased or promotion.

### 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 in&nbsp;<strong>Enterprise</strong>,&nbsp;<strong>Performance</strong>, <strong>Developer</strong>, and&nbsp;<strong>Unlimited</strong>&nbsp;Editions that have Loyalty Management enabled.</td></tr></tbody></table>

Let’s say members of the Corporate Loyalty program who purchase an economy class ticket are credited with 300 non-qualifying points. Members who purchase business class tickets are credited 500 non-qualifying points.

1. From Setup, in the Quick Find box, enter Flows, and then select **Flows**.
2. Click **New Flow**.
3. Select **Autolaunched Flow (No Trigger)**, and click **Next**.
4. Click +.
5. Select **Get Records** and provide these details.
    
    - Label: Get Transaction Journals
    - Object: Transaction Journal
    - Condition Requirements: All Conditions Are Met
        - **Field:** Id
        - **Operator:** Equals
        - **Value:** Create a Variable type resource, and select the data type as Text. Name the variable as RecordID, and make it available as an input outside the flow.This input variable helps the batch job identify each unique record that it must process.
6. Click **Done** | **Done**.
7. Click +.
8. Select **Decision** and provide these details.
    
    - Define the decision for the economy class ticket purchases: 
        - Label: Economy Class
        - When to Execute Outcome: All Conditions Are Met
        - Condition Requirements: 
            - **Resource:**{!Get\_Transaction\_Journals.BookedFareClass}
            - **Operator:** Equals
            - **Value:** Economy
    - Add another outcome.
    - Define the decision for the business class ticket purchases:
        - **Resource:** {!Get\_Transaction\_Journals.BookedFareClass}
        - **Operator:** Equals
        - **Value:** Business
9. Click **Done**.
10. Click +.
11. Select **Action**.
12. Search and select **Credit Points**, and provide these details:
    
     
    | Field | Value |
    | --- | --- |
    | Label | Credit Points for Economy Class |
    | Program | Corporate Loyalty Program |
    | Currency Type | Points |
    | Recipient Member ID | {!Get\_Transaction\_Journals.Member.Id} |
    | Number of Points to Credit | 300 |
    | Journal ID | {!Get\_Transaction\_Journals.Id} |
    | Promotion ID | Double Points |
13. Click **Done**.
14. Click +.
15. Select **Action**.
16. Search and select **Credit Points**, and provide these details:
    
     
    | Field | Value |
    | --- | --- |
    | Label | Credit Points for Business Class |
    | Program | Corporate Loyalty Program |
    | Currency Type | Points |
    | Recipient Member ID | {!Get\_Transaction\_Journals.Member.Id} |
    | Number of Points to Credit | 500 |
    | Journal ID | {!Get\_Transaction\_Journals.Id} |
    | Promotion ID | Double Points |
17. Click **Done**.
18. Save the changes.
19. Name the flow Credit Points to Members, and save the changes.
20. Activate the flow.
    
    **Credit Points to Members based on Promotion**
    
    Here’s an example, if you want to credit points for members based on a promotion (For example, the promotion criteria: Members age is greater than 20, Interests is Outdoor, and Loyalty Enrollment Channel is Web), you can create a subflow and provide the following input parameters in the flow:
    
     
    | Field | Value |
    | --- | --- |
    | JournalId | {!JournalID} |
    | MemberId | {!Get\_Transaction\_Journal\_ID.MemberId} |
    | Date\_of\_Transaction | {Date\_of\_Transaction} |
    | Member\_Age | {!Member\_Age} |
    | Member\_Interests | {!Member\_Interests} |
    | Member\_Enrollment\_Channel | {!Member\_Enrollment\_Channel} |

Create a batch job that processes this flow.