<?xml version="1.0" encoding="UTF-8"?>
<LoyaltyProgramSetup xmlns="http://soap.sforce.com/2006/04/metadata">
    <label>Just Shop</label>
    <programProcesses>
        <executionType>RealTime</executionType>
        <journalType>Manual Points Adjustment</journalType>
        <processName>Manual Points Adjustments</processName>
        <processType>TransactionJournal</processType>
        <status>Active</status>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EA_PerAdjustmentRewardTracking</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EA_RewardsTracking</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EventType</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>GeneratedOrderCode</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>LineItemTotalVoucherFaceValue</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>LineItemTotalVoucherToIssue</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>PointsAdjusted</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>PointsToDebitForVoucherIssue</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>PositiveBalanceCurrency</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>VoucherDefinitionName</parameterName>
            <parameterType>Formula</parameterType>
            <value>{!TransactionJournal.Voucher_Definition_Name__c}</value>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>VoucherFaceValue</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>VoucherTargetPoints</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <rules>
            <actions>
                <actionName>Issue Voucher by Definition Name</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherDefinitionName</parameterName>
                    <value>{!VoucherDefinitionName}</value>
                    <valueType>Parameter</valueType>
                </actionParameters>
                <actionType>IssueVoucher</actionType>
            </actions>
            <actions>
                <actionName>Update Journal VoucherDefinition to TBD</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_action</parameterName>
                    <value>update</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_entity</parameterName>
                    <value>TransactionJournal</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Id</parameterName>
                    <value>{!TransactionJournal.Id}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Voucher_Definition_Name__c</parameterName>
                    <value>&quot;TBD&quot;</value>
                </actionParameters>
                <actionType>Crud</actionType>
                <crudActionType>update</crudActionType>
                <entityApiName>TransactionJournal</entityApiName>
            </actions>
            <actions>
                <actionName>Update Journal VoucherDefinition to TBD for deletion</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_action</parameterName>
                    <value>update</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_entity</parameterName>
                    <value>TransactionJournal</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Id</parameterName>
                    <value>{!TransactionJournal.Id}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Voucher_Definition_Name__c</parameterName>
                    <value>&quot;TBD&quot;</value>
                </actionParameters>
                <actionType>Crud</actionType>
                <crudActionType>update</crudActionType>
                <entityApiName>TransactionJournal</entityApiName>
            </actions>
            <conditions>
                <conditionCriteria>1 AND 2 AND 3</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>NotEquals</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>TransactionJournal.Voucher_Definition_Name__c</sourceFieldName>
                    <value>&apos;&apos;</value>
                    <valueType>Formula</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>NotEquals</operator>
                    <sequence>2</sequence>
                    <sourceFieldName>TransactionJournal.Voucher_Definition_Name__c</sourceFieldName>
                    <value>NULL</value>
                    <valueType>Formula</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>NotEquals</operator>
                    <sequence>3</sequence>
                    <sourceFieldName>TransactionJournal.Voucher_Definition_Name__c</sourceFieldName>
                    <value>NonAdHoc</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>IF VoucherDefinitonName is NOT BLANK and Not Equal &apos;NonAdHoc&apos;</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>Equals</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>TransactionJournal.Voucher_Definition_Name__c</sourceFieldName>
                    <value>NonAdHoc</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>IF VoucherDefinitonName is NOT BLANK and EQUAL &apos;NonAdHoc&apos;</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <isProcessEligibilityRule>false</isProcessEligibilityRule>
            <ruleName>Bulk Voucher Upload</ruleName>
            <startDate>2024-03-01</startDate>
            <status>Active</status>
            <stepMappings>
                <associatedStep>IF VoucherDefinitonName is NOT BLANK and Not Equal &apos;NonAdHoc&apos;</associatedStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>IF VoucherDefinitonName is NOT BLANK and EQUAL &apos;NonAdHoc&apos;</associatedStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Issue Voucher by Definition Name</associatedStep>
                <parentStep>IF VoucherDefinitonName is NOT BLANK and Not Equal &apos;NonAdHoc&apos;</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Update Journal VoucherDefinition to TBD</associatedStep>
                <parentStep>IF VoucherDefinitonName is NOT BLANK and Not Equal &apos;NonAdHoc&apos;</parentStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Update Journal VoucherDefinition to TBD for deletion</associatedStep>
                <parentStep>IF VoucherDefinitonName is NOT BLANK and EQUAL &apos;NonAdHoc&apos;</parentStep>
                <sequence>1</sequence>
            </stepMappings>
        </rules>
        <rules>
            <actions>
                <actionName>GET Positive Balance Currency</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Positive Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsBalance</parameterName>
                    <value>PositiveBalanceCurrency</value>
                </actionParameters>
                <actionType>GetMemberPointBalance</actionType>
            </actions>
            <actions>
                <actionName>Update Status Points</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_action</parameterName>
                    <value>update</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_entity</parameterName>
                    <value>LoyaltyProgramMember</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Id</parameterName>
                    <value>{!TransactionJournal.MemberId}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Status_Points__c</parameterName>
                    <value>{!PositiveBalanceCurrency}</value>
                </actionParameters>
                <actionType>Crud</actionType>
                <crudActionType>update</crudActionType>
                <entityApiName>LoyaltyProgramMember</entityApiName>
            </actions>
            <isProcessEligibilityRule>false</isProcessEligibilityRule>
            <previousRule>Set Up Step</previousRule>
            <ruleName>Finalize</ruleName>
            <startDate>2024-03-01</startDate>
            <status>Active</status>
            <stepMappings>
                <associatedStep>GET Positive Balance Currency</associatedStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Update Status Points</associatedStep>
                <sequence>2</sequence>
            </stepMappings>
        </rules>
        <rules>
            <actions>
                <actionName>Retrieve Points for Adjustment from Ledgers</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberId</parameterName>
                    <value>{!TransactionJournal.MemberId}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>JournalId</parameterName>
                    <value>{!TransactionJournal.Id}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>LedgerPoints</parameterName>
                    <value>PointsAdjusted</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EventType</parameterName>
                    <value>EventType</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Get_Points_for_Manual_Adjustments</flowDefinition>
            </actions>
            <actions>
                <actionName>GET Runtime VoucherDefinition Values</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherRewardTargetPoints</parameterName>
                    <value>VoucherTargetPoints</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherRewardFaceValue</parameterName>
                    <value>VoucherFaceValue</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Get_Runtime_Configuration</flowDefinition>
            </actions>
            <actions>
                <actionName>Credit Adjustment Points</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Positive Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsToCredit</parameterName>
                    <value>CEILING({!TransactionJournal.TransactionAmount} )</value>
                </actionParameters>
                <actionType>CreditPoints</actionType>
            </actions>
            <actions>
                <actionName>Debit Adjustment Points</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Positive Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsToDebit</parameterName>
                    <value>ABS(CEILING({!TransactionJournal.TransactionAmount} ))</value>
                </actionParameters>
                <actionType>DebitPoints</actionType>
            </actions>
            <actions>
                <actionName>GET Positive Balance Currency [After Adjustment ]</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Positive Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsBalance</parameterName>
                    <value>PositiveBalanceCurrency</value>
                </actionParameters>
                <actionType>GetMemberPointBalance</actionType>
            </actions>
            <actions>
                <actionName>Assign Values for Vouchers Issuance</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsToDebitForVoucherIssue</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>FLOOR({!PositiveBalanceCurrency}   / {!VoucherTargetPoints} )*{!VoucherTargetPoints}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>LineItemTotalVoucherToIssue</parameterName>
                    <sequenceNumber>2</sequenceNumber>
                    <value>FLOOR({!PositiveBalanceCurrency}   / {!VoucherTargetPoints} )</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>LineItemTotalVoucherFaceValue</parameterName>
                    <sequenceNumber>3</sequenceNumber>
                    <value>FLOOR({!PositiveBalanceCurrency}   / {!VoucherTargetPoints} )*{!VoucherFaceValue}</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>Generate OrderID Code</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherDefinitionName</parameterName>
                    <value>&quot;Reward&quot;</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCount</parameterName>
                    <value>1</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCodesToGenerate</parameterName>
                    <value>1</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCodes</parameterName>
                    <value>GeneratedOrderCode</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Generate_Voucher_Codes</flowDefinition>
            </actions>
            <actions>
                <actionName>Update Journal OrderId field</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_action</parameterName>
                    <value>update</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_entity</parameterName>
                    <value>TransactionJournal</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Id</parameterName>
                    <value>{!TransactionJournal.Id}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Order_ID__c</parameterName>
                    <value>{!GeneratedOrderCode}</value>
                </actionParameters>
                <actionType>Crud</actionType>
                <crudActionType>update</crudActionType>
                <entityApiName>TransactionJournal</entityApiName>
            </actions>
            <actions>
                <actionName>Publish PE to Issue Actual Vouchers</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberId</parameterName>
                    <value>{!TransactionJournal.MemberId}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>TotalVouchersToIssue</parameterName>
                    <value>{!LineItemTotalVoucherToIssue}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OrderId</parameterName>
                    <value>{!GeneratedOrderCode}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramId</parameterName>
                    <value>{!TransactionJournal.LoyaltyProgramId}</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Publish_Event_Process_Rewards</flowDefinition>
            </actions>
            <actions>
                <actionName>Run Debit Points and Journals for Voucher Issuance</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ActivityDate</parameterName>
                    <value>{!TransactionJournal.ActivityDate}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Order_ID__c</parameterName>
                    <value>{!GeneratedOrderCode}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Voucher_Count__c</parameterName>
                    <value>{!LineItemTotalVoucherToIssue}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberId</parameterName>
                    <value>{!TransactionJournal.MemberId}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>JournalDate</parameterName>
                    <value>{!TransactionJournal.JournalDate}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>TransactionAmount</parameterName>
                    <value>{!PointsToDebitForVoucherIssue}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Channel_Name__c</parameterName>
                    <value>{!TransactionJournal.Channel}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Channel</parameterName>
                    <value>{!TransactionJournal.Channel}</value>
                </actionParameters>
                <actionType>RunProgramProcess</actionType>
                <loyaltyProgramProcess>Rewards Redemption Process</loyaltyProgramProcess>
            </actions>
            <conditions>
                <conditionCriteria>(1 OR 2 ) AND 3 AND 4</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>Equals</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>TransactionJournal.TransactionAmount</sourceFieldName>
                    <value>NULL</value>
                    <valueType>Formula</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>Equals</operator>
                    <sequence>2</sequence>
                    <sourceFieldName>TransactionJournal.TransactionAmount</sourceFieldName>
                    <value>0</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>Equals</operator>
                    <sequence>3</sequence>
                    <sourceFieldName>TransactionJournal.Order_Item_ID__c</sourceFieldName>
                    <value>&apos;&apos;</value>
                    <valueType>Formula</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>Equals</operator>
                    <sequence>4</sequence>
                    <sourceFieldName>TransactionJournal.Voucher_Definition_Name__c</sourceFieldName>
                    <value>&apos;&apos;</value>
                    <valueType>Formula</valueType>
                </conditionFilterCriteria>
                <conditionName>IF Transaction Amount = zero/null AND OrderItemID = Blank AND VoucherDef = Blank</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionName>IF Transaction Amount NOT NULL</conditionName>
                <conditionType>ConditionGroup</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>GreaterThan</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>TransactionJournal.TransactionAmount</sourceFieldName>
                    <value>0</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>And Amount &gt; 0</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>LessThan</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>TransactionJournal.TransactionAmount</sourceFieldName>
                    <value>0</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>And Amount &lt; 0</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>GreaterThanOrEquals</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>PositiveBalanceCurrency</sourceFieldName>
                    <value>VoucherTargetPoints</value>
                    <valueType>Parameter</valueType>
                </conditionFilterCriteria>
                <conditionName>IF Positive Balance Currency is POSITIVE and Greater than Voucher Target Points</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <isProcessEligibilityRule>false</isProcessEligibilityRule>
            <previousRule>Bulk Voucher Upload</previousRule>
            <ruleName>Set Up Step</ruleName>
            <startDate>2024-03-01</startDate>
            <status>Active</status>
            <stepMappings>
                <associatedStep>IF Transaction Amount = zero/null AND OrderItemID = Blank AND VoucherDef = Blank</associatedStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>IF Transaction Amount NOT NULL</associatedStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>And Amount &gt; 0</associatedStep>
                <parentStep>IF Transaction Amount NOT NULL</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>And Amount &lt; 0</associatedStep>
                <parentStep>IF Transaction Amount NOT NULL</parentStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>IF Positive Balance Currency is POSITIVE and Greater than Voucher Target Points</associatedStep>
                <sequence>5</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Retrieve Points for Adjustment from Ledgers</associatedStep>
                <parentStep>IF Transaction Amount = zero/null AND OrderItemID = Blank AND VoucherDef = Blank</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>GET Runtime VoucherDefinition Values</associatedStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Credit Adjustment Points</associatedStep>
                <parentStep>And Amount &gt; 0</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Debit Adjustment Points</associatedStep>
                <parentStep>And Amount &lt; 0</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>GET Positive Balance Currency [After Adjustment ]</associatedStep>
                <sequence>4</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Assign Values for Vouchers Issuance</associatedStep>
                <parentStep>IF Positive Balance Currency is POSITIVE and Greater than Voucher Target Points</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Generate OrderID Code</associatedStep>
                <parentStep>IF Positive Balance Currency is POSITIVE and Greater than Voucher Target Points</parentStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Update Journal OrderId field</associatedStep>
                <parentStep>IF Positive Balance Currency is POSITIVE and Greater than Voucher Target Points</parentStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Publish PE to Issue Actual Vouchers</associatedStep>
                <parentStep>IF Positive Balance Currency is POSITIVE and Greater than Voucher Target Points</parentStep>
                <sequence>4</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Run Debit Points and Journals for Voucher Issuance</associatedStep>
                <parentStep>IF Positive Balance Currency is POSITIVE and Greater than Voucher Target Points</parentStep>
                <sequence>5</sequence>
            </stepMappings>
        </rules>
    </programProcesses>
    <programProcesses>
        <description>Process to award points to new member enrolled into the program</description>
        <executionType>RealTime</executionType>
        <journalSubType>Member Enrollment</journalSubType>
        <journalType>Accrual</journalType>
        <processName>Member Enrollment Process</processName>
        <processType>TransactionJournal</processType>
        <status>Active</status>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>PointsBalance</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <rules>
            <actions>
                <actionName>GET Positive Points Balance</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Positive Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsBalance</parameterName>
                    <value>PointsBalance</value>
                </actionParameters>
                <actionType>GetMemberPointBalance</actionType>
            </actions>
            <actions>
                <actionName>SYNC Rewards Tracking EA with PointsBalance</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>Rewards Tracking</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>OverwriteCurrentValue</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>{!PointsBalance}</value>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <isProcessEligibilityRule>false</isProcessEligibilityRule>
            <previousRule>New Enrolment Bonus</previousRule>
            <ruleName>Enrolment Reward Points Sync</ruleName>
            <startDate>2024-03-01</startDate>
            <status>Active</status>
            <stepMappings>
                <associatedStep>GET Positive Points Balance</associatedStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>SYNC Rewards Tracking EA with PointsBalance</associatedStep>
                <sequence>2</sequence>
            </stepMappings>
        </rules>
        <rules>
            <actions>
                <actionName>Credit Bonus Points</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Positive Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsToCredit</parameterName>
                    <value>50</value>
                </actionParameters>
                <actionType>CreditPoints</actionType>
            </actions>
            <actions>
                <actionName>Update Member - Status Points</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_action</parameterName>
                    <value>update</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_entity</parameterName>
                    <value>LoyaltyProgramMember</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Id</parameterName>
                    <value>{!TransactionJournal.MemberId}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Status_Points__c</parameterName>
                    <value>50</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>LastActivityDate</parameterName>
                    <value>DATEVALUE({!TransactionJournal.ActivityDate} )</value>
                </actionParameters>
                <actionType>Crud</actionType>
                <crudActionType>update</crudActionType>
                <entityApiName>LoyaltyProgramMember</entityApiName>
            </actions>
            <isProcessEligibilityRule>false</isProcessEligibilityRule>
            <promotion>Member Enrolment Promotion</promotion>
            <ruleName>New Enrolment Bonus</ruleName>
            <startDate>2024-03-01</startDate>
            <status>Active</status>
            <stepMappings>
                <associatedStep>Credit Bonus Points</associatedStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Update Member - Status Points</associatedStep>
                <sequence>2</sequence>
            </stepMappings>
        </rules>
    </programProcesses>
    <programProcesses>
        <description>This process is to Update the currency balance and Engagement Attribute points</description>
        <executionType>BatchAndRealTime</executionType>
        <journalSubType>Member Migration</journalSubType>
        <journalType>Accrual</journalType>
        <processName>Member Migration Process</processName>
        <processType>TransactionJournal</processType>
        <status>Active</status>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>TransactionAmount</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>UpdatedPositiveBalanceTrackingEA</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>UpdatedRewardsTrackingEA</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Boolean</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>isNegative</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <rules>
            <actions>
                <actionName>Set Parameters For Transaction Amount</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>TransactionAmount</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>CEILING({!TransactionJournal.TransactionAmount} )</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>Update Member Attribute Negative Tracking Value</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>OverwriteCurrentValue</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>{!TransactionAmount} *(-1)</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>Negative Balance Tracking</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <actions>
                <actionName>Update Currency Negative Balance</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Negative Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsToCredit</parameterName>
                    <value>{!TransactionAmount} *(-1)</value>
                </actionParameters>
                <actionType>CreditPoints</actionType>
            </actions>
            <actions>
                <actionName>Update Member Status Point Balance</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_action</parameterName>
                    <value>update</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Id</parameterName>
                    <value>{!TransactionJournal.MemberId}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Status_Points__c</parameterName>
                    <value>{!TransactionAmount}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_entity</parameterName>
                    <value>LoyaltyProgramMember</value>
                </actionParameters>
                <actionType>Crud</actionType>
                <crudActionType>update</crudActionType>
                <entityApiName>LoyaltyProgramMember</entityApiName>
            </actions>
            <actions>
                <actionName>Update Currency Positive Balance</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Positive Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsToCredit</parameterName>
                    <value>{!TransactionAmount}</value>
                </actionParameters>
                <actionType>CreditPoints</actionType>
            </actions>
            <actions>
                <actionName>Update Positive Balance in Member Status Point Balance Field</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_action</parameterName>
                    <value>update</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_entity</parameterName>
                    <value>LoyaltyProgramMember</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Status_Points__c</parameterName>
                    <value>{!TransactionAmount}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Id</parameterName>
                    <value>{!TransactionJournal.MemberId}</value>
                </actionParameters>
                <actionType>Crud</actionType>
                <crudActionType>update</crudActionType>
                <entityApiName>LoyaltyProgramMember</entityApiName>
            </actions>
            <actions>
                <actionName>Update Member Attribute Positive Tracking Value</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>Positive Balance Tracking</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>OverwriteCurrentValue</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>{!TransactionAmount}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberAttributeCurrentValue</parameterName>
                    <value>UpdatedPositiveBalanceTrackingEA</value>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <actions>
                <actionName>Update Member Attribute Rewards Tracking Value</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>Rewards Tracking</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>{!TransactionAmount}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberAttributeCurrentValue</parameterName>
                    <value>UpdatedRewardsTrackingEA</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>OverwriteCurrentValue</value>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>LessThan</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>TransactionAmount</sourceFieldName>
                    <value>0</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>Check if Transaction Amount is Negative</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>GreaterThanOrEquals</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>TransactionAmount</sourceFieldName>
                    <value>0</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>Check if Transaction Amount is Positive</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <isProcessEligibilityRule>false</isProcessEligibilityRule>
            <ruleName>Getting Transaction Amount From Journal</ruleName>
            <startDate>1970-01-01</startDate>
            <status>Active</status>
            <stepMappings>
                <associatedStep>Check if Transaction Amount is Negative</associatedStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Check if Transaction Amount is Positive</associatedStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Set Parameters For Transaction Amount</associatedStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Update Member Attribute Negative Tracking Value</associatedStep>
                <parentStep>Check if Transaction Amount is Negative</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Update Currency Negative Balance</associatedStep>
                <parentStep>Check if Transaction Amount is Negative</parentStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Update Member Status Point Balance</associatedStep>
                <parentStep>Check if Transaction Amount is Negative</parentStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Update Currency Positive Balance</associatedStep>
                <parentStep>Check if Transaction Amount is Positive</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Update Positive Balance in Member Status Point Balance Field</associatedStep>
                <parentStep>Check if Transaction Amount is Positive</parentStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Update Member Attribute Positive Tracking Value</associatedStep>
                <parentStep>Check if Transaction Amount is Positive</parentStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Update Member Attribute Rewards Tracking Value</associatedStep>
                <parentStep>Check if Transaction Amount is Positive</parentStep>
                <sequence>4</sequence>
            </stepMappings>
        </rules>
    </programProcesses>
    <programProcesses>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>CurrentEngagementAttributeValue</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>debitpointsForNegativeBalance</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>debitpointsForPositiveBalance</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Date</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>setLastActivityDatetoNull</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Negative Point Balance Variable</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>storeMemberNegativePointBalanceValue</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Store Positive Point Balance</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>storeMemberPositivePointBalanceValue</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Date</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>todaysDate</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <description>Process to reset and expire points</description>
        <executionType>Batch</executionType>
        <journalType>Points Expiration</journalType>
        <processName>Points Expiration Process</processName>
        <processType>TransactionJournal</processType>
        <status>Active</status>
        <rules>
            <actions>
                <actionName>Get Member&apos;s Negative Point Balance</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Negative Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsBalance</parameterName>
                    <value>storeMemberNegativePointBalanceValue</value>
                </actionParameters>
                <actionType>GetMemberPointBalance</actionType>
            </actions>
            <actions>
                <actionName>Get Member&apos;s Positive Point Balance</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Positive Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsBalance</parameterName>
                    <value>storeMemberPositivePointBalanceValue</value>
                </actionParameters>
                <actionType>GetMemberPointBalance</actionType>
            </actions>
            <actions>
                <actionName>Debit Point From Negative Balance</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Negative Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsToDebit</parameterName>
                    <value>{!storeMemberNegativePointBalanceValue}</value>
                </actionParameters>
                <actionType>DebitPoints</actionType>
            </actions>
            <actions>
                <actionName>Reset Positive Point Balance to 0</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Positive Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsToDebit</parameterName>
                    <value>{!storeMemberPositivePointBalanceValue}</value>
                </actionParameters>
                <actionType>DebitPoints</actionType>
            </actions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>NotEquals</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>storeMemberNegativePointBalanceValue</sourceFieldName>
                    <value>0</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>Check if Member Negative Point Balance Value &lt; 0</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>NotEquals</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>storeMemberPositivePointBalanceValue</sourceFieldName>
                    <value>0</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>Check if Positive Point Balance Value &gt; 0</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <isProcessEligibilityRule>false</isProcessEligibilityRule>
            <previousRule>Reset Member Engagement Attributes</previousRule>
            <ruleName>Reset Member Currencies</ruleName>
            <startDate>2024-04-04</startDate>
            <status>Active</status>
            <stepMappings>
                <associatedStep>Check if Member Negative Point Balance Value &lt; 0</associatedStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Check if Positive Point Balance Value &gt; 0</associatedStep>
                <sequence>4</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Get Member&apos;s Negative Point Balance</associatedStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Get Member&apos;s Positive Point Balance</associatedStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Debit Point From Negative Balance</associatedStep>
                <parentStep>Check if Member Negative Point Balance Value &lt; 0</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Reset Positive Point Balance to 0</associatedStep>
                <parentStep>Check if Positive Point Balance Value &gt; 0</parentStep>
                <sequence>1</sequence>
            </stepMappings>
        </rules>
        <rules>
            <actions>
                <actionName>Current Engagement Attribute Value</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>Rewards Tracking</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberAttributeCurrentValue</parameterName>
                    <value>CurrentEngagementAttributeValue</value>
                </actionParameters>
                <actionType>GetMemberAttributesValues</actionType>
            </actions>
            <actions>
                <actionName>Set Engagement Value = 0</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>Rewards Tracking</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>OverwriteCurrentValue</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>0</value>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>GreaterThan</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>CurrentEngagementAttributeValue</sourceFieldName>
                    <value>0</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>Check if Current Engagement Value &gt; 0</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <isProcessEligibilityRule>false</isProcessEligibilityRule>
            <ruleName>Reset Member Engagement Attributes</ruleName>
            <startDate>2024-04-04</startDate>
            <status>Active</status>
            <stepMappings>
                <associatedStep>Check if Current Engagement Value &gt; 0</associatedStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Current Engagement Attribute Value</associatedStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Set Engagement Value = 0</associatedStep>
                <parentStep>Check if Current Engagement Value &gt; 0</parentStep>
                <sequence>1</sequence>
            </stepMappings>
        </rules>
        <rules>
            <actions>
                <actionName>Update Member Status Point Balance to 0</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_action</parameterName>
                    <value>update</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_entity</parameterName>
                    <value>LoyaltyProgramMember</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Id</parameterName>
                    <value>{!TransactionJournal.Member.Id}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Status_Points__c</parameterName>
                    <value>0</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>LastActivityDate</parameterName>
                    <value>TODAY()</value>
                </actionParameters>
                <actionType>Crud</actionType>
                <crudActionType>update</crudActionType>
                <entityApiName>LoyaltyProgramMember</entityApiName>
            </actions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>GreaterThan</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>TransactionJournal.Member.Status_Points__c</sourceFieldName>
                    <value>0</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>Check if Member Status Point Value &gt; 0</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <isProcessEligibilityRule>false</isProcessEligibilityRule>
            <previousRule>Reset Member Currencies</previousRule>
            <ruleName>Reset Member Status Points</ruleName>
            <startDate>2024-04-04</startDate>
            <status>Active</status>
            <stepMappings>
                <associatedStep>Check if Member Status Point Value &gt; 0</associatedStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Update Member Status Point Balance to 0</associatedStep>
                <parentStep>Check if Member Status Point Value &gt; 0</parentStep>
                <sequence>1</sequence>
            </stepMappings>
        </rules>
    </programProcesses>
    <programProcesses>
        <parameters>
            <dataType>DateTime</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>ActivityDate</parameterName>
            <parameterType>Formula</parameterType>
            <value>{!TransactionJournal.ActivityDate}</value>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>BasePointMultiplier</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Used to store transaction amount as &apos;Ceiling&apos; ie rounded number.</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>BasePointsEarned</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Used in a Accrual-Purchase process in IF block, check if previous balance is negative, which impacts on whether new voucher will be generated</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>BeginningNegativeBalance</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>BeginningTotalRewards</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>BrandMultiplier</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Date</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>CurrentDate</parameterName>
            <parameterType>Formula</parameterType>
            <value>TODAY()</value>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Used to limit only a single lineitem will Dummy voucher node in API response</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>CurrentLineItemCount</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>CurrentMemberStatusPoints</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>CurrentReturnTracking</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>CurrentReversedVoucherTotalFV</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>CurrentTotalRewards</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>Output from Decision Table which is used to multiply the Transaction Amount for &apos;effective points&apos;, eg. $1 x 1 = 1 point, $1 x 2 = 2 points</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>DT_Multiplier</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Sobject</dataType>
            <description>to define what format will be the output from Decision Table</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <objectName>Accrual_Purchase_Multiplier__c</objectName>
            <parameterName>DT_Outcome</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Count of how many times to execute direct voucher issue</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>DirectIssueTotalCount</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Counter to track how many voucher issued directly in Process</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>DirectIssueVoucherCounter</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>this multiplier is &apos;delta&apos; on top of Base. Eg. if Base =1 and promotion is to give 2x , then this multiplier is 2 - 1 = 1 (being the delta)</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>DoublePointsPromo_DELTA_Multiplier</parameterName>
            <parameterType>Constant</parameterType>
            <value>1</value>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>store beginning balance in its own dedicated EA, (snapshot store), because the running balance will change due to new Order</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EA_BeginningRewardsTracking</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Boolean</dataType>
            <description>this is flag to indicate whether we need to generate new voucher due to new order</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EA_IsRewardsTargetMet</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>to track on LINEITEM level, how much if redeem voucher amount, used to ensure Transaction Amount for Purchase journal with VoucherCode will be &apos;zero-ized&apos; ie. Transaction amount - this LineItemVoucherFaceValue amount</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EA_LineItemRedeemVoucherFaceValue</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>stores cumulative value of pro rata apportionment of reduction in negative balance by lineitems&apos; points</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EA_NegativeBalanceApportionment</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>this always equal to Negative Currency value, used for LINEITEM level context in our calculation of change to Currency (debit or credit)</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EA_NegativeBalanceTracking</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>tracks at lineitem level the rewards earned within this single Order</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EA_PerLIneItemOrderRewardsTracking</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>for a new Order with Redemption of Vouchers, which could be multiple, we use this to total them up (total facevalue)</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EA_PerOrderRedeemVoucherFaceValue</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>to track on a Per Order basis, ie single Order API call, how many &apos;new&apos; points for that Order</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EA_PerOrderRewardsTracking</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>this always equal to Positive Currency value, used for LINEITEM level context in our calculation of change to Currency (debit or credit)</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EA_PositiveBalanceTracking</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>this keeps whatever is &apos;left&apos; after using points that qualify for new voucher (ie meeting target voucher points), eg. 250 points - 200 points is used for new voucher, what is left = 50</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EA_RemainderRewardsBalance</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>this is &apos;piggy bank&apos; level tracking, how many points collected so far and whether the &apos;target&apos; is reached yet</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EA_RewardsTracking</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>store vouchercode generated by Flow for use in Direct Issue Voucher</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>GeneratedVoucherCode</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Boolean</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>IsNonMerchanisedItem</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Boolean</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>IsTargetMet</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>this is the Single lineitem Dummy voucher face amount</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>LineItemTotalVoucherFaceValue</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>this is the count of total number of vouchers to issue , used in generate voucher flow to create voucher records</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>LineItemTotalVoucherToIssue</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>this stores the value retrieved from the Negative Currency &apos;get&apos;</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>MC_NegativeCurrencyPointsBalance</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>this stores the value retrieved from the Positive Currency &apos;get&apos;</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>MC_PositiveCurrencyPointsBalance</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>{!TransactionJournal.MemberId}</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>MemberID</parameterName>
            <parameterType>Formula</parameterType>
            <value>{!TransactionJournal.MemberId}</value>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>2</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>Multiplier</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>actual vouchers to issue after deducting 3 vouchers issued directly via Process</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>NettTotalVoucherToIssue</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>{!TransactionJournal.Order_ID__c}</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>OrderID</parameterName>
            <parameterType>Formula</parameterType>
            <value>{!TransactionJournal.Order_ID__c}</value>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>stores currency balance whenever needed for calculations</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>PointsBalance</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>PointsDebited</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>CEILING({!DT_Outcome.Multiplier__c} *{!BasePointsEarned})</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>PointsForPurchase</parameterName>
            <parameterType>Formula</parameterType>
            <value>CEILING({!DT_Outcome.Multiplier__c} *{!BasePointsEarned})</value>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>stores the total of points that qualifies for voucher (can be multiple of voucherTargetPoints), in single Order</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>PointsToDebitForVoucherIssue</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>{!TransactionJournal.LoyaltyProgramId}</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>ProgramID</parameterName>
            <parameterType>Formula</parameterType>
            <value>{!TransactionJournal.LoyaltyProgramId}</value>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>NOT USED except v5</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>PurchasePointsAdjustedRemainder</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>parameter used in calculations, stores the total per Order points &apos;earned&apos; by a new Order</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>TotalOrderPurchasePoints</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>DateTime</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>TransactionJournalActivityDate</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>VoucherCodeIssued</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>2</decimalPlaces>
            <description>stores the value of a single voucher , eg $10 per voucher</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>VoucherFaceValue</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>the &apos;threshold&apos; of how many points needed to meet &apos;goal&apos; ie. qualify for voucher issuance</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>VoucherTargetPoints</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <description>Latest Version 6 - Only of Accrual process</description>
        <executionType>RealTime</executionType>
        <journalSubType>Purchase</journalSubType>
        <journalType>Accrual</journalType>
        <processName>Purchase Accrual Process</processName>
        <processType>TransactionJournal</processType>
        <status>Active</status>
        <rules>
            <actions>
                <actionName>Run Redeem Voucher Process</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ActivityDate</parameterName>
                    <value>{!TransactionJournal.ActivityDate}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Channel_Name__c</parameterName>
                    <value>{!TransactionJournal.Channel}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Order_ID__c</parameterName>
                    <value>{!TransactionJournal.Order_ID__c}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Brand</parameterName>
                    <value>{!TransactionJournal.Brand}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Order_Item_ID__c</parameterName>
                    <value>{!TransactionJournal.VoucherCode}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberId</parameterName>
                    <value>{!MemberID}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCode</parameterName>
                    <value>{!TransactionJournal.VoucherCode}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>LoyaltyProgramId</parameterName>
                    <value>{!ProgramID}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>JournalDate</parameterName>
                    <value>{!TransactionJournal.JournalDate}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>TransactionAmount</parameterName>
                    <value>{!TransactionJournal.TransactionAmount}</value>
                </actionParameters>
                <actionType>RunProgramProcess</actionType>
                <loyaltyProgramProcess>Redeem Voucher Process</loyaltyProgramProcess>
            </actions>
            <actions>
                <actionName>GET LineItem Redeem Voucher FaceValue</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberAttributeCurrentValue</parameterName>
                    <value>EA_LineItemRedeemVoucherFaceValue</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>Redeem Voucher FaceValueTracking</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionType>GetMemberAttributesValues</actionType>
            </actions>
            <actions>
                <actionName>Set the EA_LineItemRedeemVoucherFaceValue to Zero.</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EA_LineItemRedeemVoucherFaceValue</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>0</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>Credit PositiveBalance Currency ADD Promo EA_PerLineItemOrderRewardsTracking [if voucherCode lineitem; less voucher FV]</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Positive Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsToCredit</parameterName>
                    <value>{!EA_PerLIneItemOrderRewardsTracking} +  {!PointsForPurchase} - {!EA_LineItemRedeemVoucherFaceValue}</value>
                </actionParameters>
                <actionType>CreditPoints</actionType>
            </actions>
            <actions>
                <actionName>GET RedeemVoucher FaceValue Consolidated</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>RedeemVoucherFaceValue Consolidated</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberAttributeCurrentValue</parameterName>
                    <value>EA_PerOrderRedeemVoucherFaceValue</value>
                </actionParameters>
                <actionType>GetMemberAttributesValues</actionType>
            </actions>
            <actions>
                <actionName>GET Positive Balance Currency after Credits</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Positive Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsBalance</parameterName>
                    <value>MC_PositiveCurrencyPointsBalance</value>
                </actionParameters>
                <actionType>GetMemberPointBalance</actionType>
            </actions>
            <actions>
                <actionName>A. Initialize LineItemCount</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>0</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberAttributeCurrentValue</parameterName>
                    <value>CurrentLineItemCount</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>LineItemCount</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>OverwriteCurrentValue</value>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <actions>
                <actionName>A. Increment LineItemCount</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>1</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberAttributeCurrentValue</parameterName>
                    <value>CurrentLineItemCount</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>LineItemCount</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>IncreaseCurrentValue</value>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <actions>
                <actionName>Assign Values to IssueVoucher Params (whole order basis) &amp; Initialize DirectIssueVoucherCounter = 0</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsToDebitForVoucherIssue</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>FLOOR({!MC_PositiveCurrencyPointsBalance}   / {!VoucherTargetPoints} )*{!VoucherTargetPoints}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>LineItemTotalVoucherToIssue</parameterName>
                    <sequenceNumber>2</sequenceNumber>
                    <value>FLOOR({!MC_PositiveCurrencyPointsBalance}  / {!VoucherTargetPoints} )</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>LineItemTotalVoucherFaceValue</parameterName>
                    <sequenceNumber>3</sequenceNumber>
                    <value>FLOOR({!MC_PositiveCurrencyPointsBalance}   / {!VoucherTargetPoints} )*{!VoucherFaceValue}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>DirectIssueVoucherCounter</parameterName>
                    <sequenceNumber>4</sequenceNumber>
                    <value>0</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>1. Set DirectIssueTotalCount Value to 3</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>DirectIssueTotalCount</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>3</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>2. Set DirectIssueTotalCount Value = [LineItemTotalVoucherToIssue]</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>DirectIssueTotalCount</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>{!LineItemTotalVoucherToIssue}</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>1. Generate Voucher Code</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherDefinitionName</parameterName>
                    <value>&quot;Reward&quot;</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCount</parameterName>
                    <value>1</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCodesToGenerate</parameterName>
                    <value>1</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCodes</parameterName>
                    <value>GeneratedVoucherCode</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Generate_Voucher_Codes</flowDefinition>
            </actions>
            <actions>
                <actionName>IssueVoucher Count 1</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCode</parameterName>
                    <value>{!GeneratedVoucherCode}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherDefinitionName</parameterName>
                    <value>Reward</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionType>IssueVoucher</actionType>
            </actions>
            <actions>
                <actionName>Set Counter = 1</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>DirectIssueVoucherCounter</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>1</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>Publish Direct Issue Voucher Event 1</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OrderIdIssuedChannel</parameterName>
                    <value>{!TransactionJournal.Channel}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCode</parameterName>
                    <value>{!GeneratedVoucherCode}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberId</parameterName>
                    <value>{!MemberID}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OrderIdIssued</parameterName>
                    <value>{!OrderID}</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Publish_Direct_Issue_Voucher_Event</flowDefinition>
            </actions>
            <actions>
                <actionName>Generate Voucher Code 2</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCount</parameterName>
                    <value>1</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCodes</parameterName>
                    <value>GeneratedVoucherCode</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherDefinitionName</parameterName>
                    <value>&quot;Reward&quot;</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCodesToGenerate</parameterName>
                    <value>1</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Generate_Voucher_Codes</flowDefinition>
            </actions>
            <actions>
                <actionName>IssueVoucher Count 2</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherDefinitionName</parameterName>
                    <value>Reward</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCode</parameterName>
                    <value>{!GeneratedVoucherCode}</value>
                </actionParameters>
                <actionType>IssueVoucher</actionType>
            </actions>
            <actions>
                <actionName>Set Counter = 2</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>DirectIssueVoucherCounter</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>2</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>Publish Direct Issue Voucher Event 2</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OrderIdIssued</parameterName>
                    <value>{!OrderID}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberId</parameterName>
                    <value>{!MemberID}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OrderIdIssuedChannel</parameterName>
                    <value>{!TransactionJournal.Channel}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCode</parameterName>
                    <value>{!GeneratedVoucherCode}</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Publish_Direct_Issue_Voucher_Event</flowDefinition>
            </actions>
            <actions>
                <actionName>Generate Voucher Code 3</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCodesToGenerate</parameterName>
                    <value>1</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCount</parameterName>
                    <value>1</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCodes</parameterName>
                    <value>GeneratedVoucherCode</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherDefinitionName</parameterName>
                    <value>&quot;Reward&quot;</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Generate_Voucher_Codes</flowDefinition>
            </actions>
            <actions>
                <actionName>IssueVoucher Count 3</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherDefinitionName</parameterName>
                    <value>Reward</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCode</parameterName>
                    <value>{!GeneratedVoucherCode}</value>
                </actionParameters>
                <actionType>IssueVoucher</actionType>
            </actions>
            <actions>
                <actionName>Set Counter = 3</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>DirectIssueVoucherCounter</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>3</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>Publish Direct Issue Voucher Event 3</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OrderIdIssuedChannel</parameterName>
                    <value>{!TransactionJournal.Channel}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCode</parameterName>
                    <value>{!GeneratedVoucherCode}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberId</parameterName>
                    <value>{!MemberID}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OrderIdIssued</parameterName>
                    <value>{!OrderID}</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Publish_Direct_Issue_Voucher_Event</flowDefinition>
            </actions>
            <actions>
                <actionName>Set Nett TotalVouchersToIssue</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>NettTotalVoucherToIssue</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>{!LineItemTotalVoucherToIssue} - {!DirectIssueVoucherCounter}</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>Publish PE to Issue Actual Vouchers</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OrderId</parameterName>
                    <value>{!OrderID}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>TotalVouchersToIssue</parameterName>
                    <value>{!NettTotalVoucherToIssue}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramId</parameterName>
                    <value>{!ProgramID}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Channel</parameterName>
                    <value>{!TransactionJournal.Channel}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberId</parameterName>
                    <value>{!MemberID}</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Publish_Event_Process_Rewards</flowDefinition>
            </actions>
            <actions>
                <actionName>Run Debit Points</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ActivityDate</parameterName>
                    <value>{!TransactionJournal.ActivityDate}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PartnerId</parameterName>
                    <value>{!TransactionJournal.PartnerId}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Channel_Name__c</parameterName>
                    <value>{!TransactionJournal.Channel}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Order_ID__c</parameterName>
                    <value>{!OrderID}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Voucher_Count__c</parameterName>
                    <value>{!LineItemTotalVoucherToIssue}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Channel</parameterName>
                    <value>{!TransactionJournal.Channel}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Order_Item_ID__c</parameterName>
                    <value>{!TransactionJournal.Order_Item_ID__c}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberId</parameterName>
                    <value>{!MemberID}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>JournalDate</parameterName>
                    <value>{!TransactionJournal.JournalDate}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>TransactionAmount</parameterName>
                    <value>{!PointsToDebitForVoucherIssue}</value>
                </actionParameters>
                <actionType>RunProgramProcess</actionType>
                <loyaltyProgramProcess>Rewards Redemption Process</loyaltyProgramProcess>
            </actions>
            <actions>
                <actionName>RESET PerOrder Rewards Tracking</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>OverwriteCurrentValue</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>0</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>PerOrder Rewards Tracking</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <actions>
                <actionName>RESET PerLineItemOrderRewards Tracking</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>PerLineItemOrderRewards Tracking</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>0</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>OverwriteCurrentValue</value>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <actions>
                <actionName>RESET RedeemVoucherFaceValueTracking</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>OverwriteCurrentValue</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>Redeem Voucher FaceValueTracking</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>0</value>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <actions>
                <actionName>RESET RedeemVoucherFaceValue Consolidated Tracking</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>0</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>RedeemVoucherFaceValue Consolidated</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>OverwriteCurrentValue</value>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <actions>
                <actionName>RESET LineItemCount to Zero</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>LineItemCount</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>OverwriteCurrentValue</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>0</value>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>NotEquals</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>TransactionJournal.VoucherCode</sourceFieldName>
                    <value>NULL</value>
                    <valueType>Formula</valueType>
                </conditionFilterCriteria>
                <conditionName>PreCheck : IF VoucherCode EXIST</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>Equals</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>PointsForPurchase</sourceFieldName>
                    <value>0</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>If the Brand value is null</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1 AND 2</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>GreaterThanOrEquals</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>MC_PositiveCurrencyPointsBalance</sourceFieldName>
                    <value>VoucherTargetPoints</value>
                    <valueType>Parameter</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>NotEquals</operator>
                    <sequence>2</sequence>
                    <sourceFieldName>DT_Outcome.Multiplier__c</sourceFieldName>
                    <value>0</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>A. IF Updated Currency Balance  &gt;= VoucherPointsTarget</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>Equals</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>CurrentLineItemCount</sourceFieldName>
                    <value>1</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>A.IF LineItemCount = 1</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionName>Set Counter Value based on [LineItemTotalVouchersToIssue] based on scenario</conditionName>
                <conditionType>ConditionGroup</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>GreaterThan</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>LineItemTotalVoucherToIssue</sourceFieldName>
                    <value>3</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>LineItemTotalVouchersToIssue &gt; 3</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>LessThanOrEquals</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>LineItemTotalVoucherToIssue</sourceFieldName>
                    <value>3</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>LineItemTotalVouchersToIssue &lt;= 3</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>LessThan</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>DirectIssueVoucherCounter</sourceFieldName>
                    <value>DirectIssueTotalCount</value>
                    <valueType>Parameter</valueType>
                </conditionFilterCriteria>
                <conditionName>Count 1 : If     [DirectIssueVoucherCounter] &lt; DirectIssueTotalCount</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>LessThan</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>DirectIssueVoucherCounter</sourceFieldName>
                    <value>DirectIssueTotalCount</value>
                    <valueType>Parameter</valueType>
                </conditionFilterCriteria>
                <conditionName>Count 2 : If    [DirectIssueVoucherCounter] &lt; DirectIssueTotalCount</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>LessThan</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>DirectIssueVoucherCounter</sourceFieldName>
                    <value>DirectIssueTotalCount</value>
                    <valueType>Parameter</valueType>
                </conditionFilterCriteria>
                <conditionName>Count 3 : If    [DirectIssueVoucherCounter] &lt; DirectIssueTotalCount</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>GreaterThan</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>LineItemTotalVoucherToIssue</sourceFieldName>
                    <value>3</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>If TotalVouchers to Issuse &gt; 3</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <description>Base rule execution step</description>
            <isProcessEligibilityRule>false</isProcessEligibilityRule>
            <previousRule>Double Points Promo</previousRule>
            <ruleName>Base Rule Execution</ruleName>
            <startDate>2024-03-01</startDate>
            <status>Active</status>
            <stepMappings>
                <associatedStep>PreCheck : IF VoucherCode EXIST</associatedStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>If the Brand value is null</associatedStep>
                <parentStep>PreCheck : IF VoucherCode EXIST</parentStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>A. IF Updated Currency Balance  &gt;= VoucherPointsTarget</associatedStep>
                <sequence>5</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>A.IF LineItemCount = 1</associatedStep>
                <parentStep>A. IF Updated Currency Balance  &gt;= VoucherPointsTarget</parentStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Set Counter Value based on [LineItemTotalVouchersToIssue] based on scenario</associatedStep>
                <parentStep>A.IF LineItemCount = 1</parentStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>LineItemTotalVouchersToIssue &gt; 3</associatedStep>
                <parentStep>Set Counter Value based on [LineItemTotalVouchersToIssue] based on scenario</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>LineItemTotalVouchersToIssue &lt;= 3</associatedStep>
                <parentStep>Set Counter Value based on [LineItemTotalVouchersToIssue] based on scenario</parentStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Count 1 : If     [DirectIssueVoucherCounter] &lt; DirectIssueTotalCount</associatedStep>
                <parentStep>A.IF LineItemCount = 1</parentStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Count 2 : If    [DirectIssueVoucherCounter] &lt; DirectIssueTotalCount</associatedStep>
                <parentStep>A.IF LineItemCount = 1</parentStep>
                <sequence>4</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Count 3 : If    [DirectIssueVoucherCounter] &lt; DirectIssueTotalCount</associatedStep>
                <parentStep>A.IF LineItemCount = 1</parentStep>
                <sequence>5</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>If TotalVouchers to Issuse &gt; 3</associatedStep>
                <parentStep>A.IF LineItemCount = 1</parentStep>
                <sequence>6</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Run Redeem Voucher Process</associatedStep>
                <parentStep>PreCheck : IF VoucherCode EXIST</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>GET LineItem Redeem Voucher FaceValue</associatedStep>
                <parentStep>PreCheck : IF VoucherCode EXIST</parentStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Set the EA_LineItemRedeemVoucherFaceValue to Zero.</associatedStep>
                <parentStep>If the Brand value is null</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Credit PositiveBalance Currency ADD Promo EA_PerLineItemOrderRewardsTracking [if voucherCode lineitem; less voucher FV]</associatedStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>GET RedeemVoucher FaceValue Consolidated</associatedStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>GET Positive Balance Currency after Credits</associatedStep>
                <sequence>4</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>A. Initialize LineItemCount</associatedStep>
                <parentStep>A. IF Updated Currency Balance  &gt;= VoucherPointsTarget</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>A. Increment LineItemCount</associatedStep>
                <parentStep>A. IF Updated Currency Balance  &gt;= VoucherPointsTarget</parentStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Assign Values to IssueVoucher Params (whole order basis) &amp; Initialize DirectIssueVoucherCounter = 0</associatedStep>
                <parentStep>A.IF LineItemCount = 1</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>1. Set DirectIssueTotalCount Value to 3</associatedStep>
                <parentStep>LineItemTotalVouchersToIssue &gt; 3</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>2. Set DirectIssueTotalCount Value = [LineItemTotalVoucherToIssue]</associatedStep>
                <parentStep>LineItemTotalVouchersToIssue &lt;= 3</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>1. Generate Voucher Code</associatedStep>
                <parentStep>Count 1 : If     [DirectIssueVoucherCounter] &lt; DirectIssueTotalCount</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>IssueVoucher Count 1</associatedStep>
                <parentStep>Count 1 : If     [DirectIssueVoucherCounter] &lt; DirectIssueTotalCount</parentStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Set Counter = 1</associatedStep>
                <parentStep>Count 1 : If     [DirectIssueVoucherCounter] &lt; DirectIssueTotalCount</parentStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Publish Direct Issue Voucher Event 1</associatedStep>
                <parentStep>Count 1 : If     [DirectIssueVoucherCounter] &lt; DirectIssueTotalCount</parentStep>
                <sequence>4</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Generate Voucher Code 2</associatedStep>
                <parentStep>Count 2 : If    [DirectIssueVoucherCounter] &lt; DirectIssueTotalCount</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>IssueVoucher Count 2</associatedStep>
                <parentStep>Count 2 : If    [DirectIssueVoucherCounter] &lt; DirectIssueTotalCount</parentStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Set Counter = 2</associatedStep>
                <parentStep>Count 2 : If    [DirectIssueVoucherCounter] &lt; DirectIssueTotalCount</parentStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Publish Direct Issue Voucher Event 2</associatedStep>
                <parentStep>Count 2 : If    [DirectIssueVoucherCounter] &lt; DirectIssueTotalCount</parentStep>
                <sequence>4</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Generate Voucher Code 3</associatedStep>
                <parentStep>Count 3 : If    [DirectIssueVoucherCounter] &lt; DirectIssueTotalCount</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>IssueVoucher Count 3</associatedStep>
                <parentStep>Count 3 : If    [DirectIssueVoucherCounter] &lt; DirectIssueTotalCount</parentStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Set Counter = 3</associatedStep>
                <parentStep>Count 3 : If    [DirectIssueVoucherCounter] &lt; DirectIssueTotalCount</parentStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Publish Direct Issue Voucher Event 3</associatedStep>
                <parentStep>Count 3 : If    [DirectIssueVoucherCounter] &lt; DirectIssueTotalCount</parentStep>
                <sequence>4</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Set Nett TotalVouchersToIssue</associatedStep>
                <parentStep>If TotalVouchers to Issuse &gt; 3</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Publish PE to Issue Actual Vouchers</associatedStep>
                <parentStep>If TotalVouchers to Issuse &gt; 3</parentStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Run Debit Points</associatedStep>
                <parentStep>A.IF LineItemCount = 1</parentStep>
                <sequence>7</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>RESET PerOrder Rewards Tracking</associatedStep>
                <sequence>6</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>RESET PerLineItemOrderRewards Tracking</associatedStep>
                <sequence>7</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>RESET RedeemVoucherFaceValueTracking</associatedStep>
                <sequence>8</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>RESET RedeemVoucherFaceValue Consolidated Tracking</associatedStep>
                <sequence>9</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>RESET LineItemCount to Zero</associatedStep>
                <sequence>10</sequence>
            </stepMappings>
        </rules>
        <rules>
            <actions>
                <actionName>PositiveBalanceCurrency - Points Balance</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Positive Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsBalance</parameterName>
                    <value>MC_PositiveCurrencyPointsBalance</value>
                </actionParameters>
                <actionType>GetMemberPointBalance</actionType>
            </actions>
            <actions>
                <actionName>Update Member - Status Points</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_action</parameterName>
                    <value>update</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_entity</parameterName>
                    <value>LoyaltyProgramMember</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Id</parameterName>
                    <value>{!MemberID}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Status_Points__c</parameterName>
                    <value>{!MC_PositiveCurrencyPointsBalance} - {!MC_NegativeCurrencyPointsBalance}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>LastActivityDate</parameterName>
                    <value>DATEVALUE({!TransactionJournal.ActivityDate} )</value>
                </actionParameters>
                <actionType>Crud</actionType>
                <crudActionType>update</crudActionType>
                <entityApiName>LoyaltyProgramMember</entityApiName>
            </actions>
            <isProcessEligibilityRule>false</isProcessEligibilityRule>
            <previousRule>Base Rule Execution</previousRule>
            <ruleName>Base Rule Final</ruleName>
            <startDate>2024-03-01</startDate>
            <status>Active</status>
            <stepMappings>
                <associatedStep>PositiveBalanceCurrency - Points Balance</associatedStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Update Member - Status Points</associatedStep>
                <sequence>2</sequence>
            </stepMappings>
        </rules>
        <rules>
            <actions>
                <actionName>GET Positive Balance Currency</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Positive Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsBalance</parameterName>
                    <value>MC_PositiveCurrencyPointsBalance</value>
                </actionParameters>
                <actionType>GetMemberPointBalance</actionType>
            </actions>
            <actions>
                <actionName>Assign Beginning Negative Balance</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>BeginningNegativeBalance</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>ABS({!MC_PositiveCurrencyPointsBalance} )</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>Set Parameter</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>BasePointsEarned</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>CEILING({!TransactionJournal.TransactionAmount} )</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherFaceValue</parameterName>
                    <sequenceNumber>2</sequenceNumber>
                    <value>VALUE(&quot;10.0&quot;)</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherTargetPoints</parameterName>
                    <sequenceNumber>3</sequenceNumber>
                    <value>200</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>Set BasePoints to Zero</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>BasePointsEarned</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>0</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>Run Flow - Get Runtime Configuration</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherRewardTargetPoints</parameterName>
                    <value>VoucherTargetPoints</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Get_Runtime_Configuration</flowDefinition>
            </actions>
            <actions>
                <actionName>Get Decision Table Outcome</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Brand__c</parameterName>
                    <value>{!TransactionJournal.Brand}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>DecisionTableOutcomeType</parameterName>
                    <value>DT_Multiplier</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>DecisionTableSingleOutcome</parameterName>
                    <value>DT_Outcome</value>
                </actionParameters>
                <actionType>GetOutputsFromDecisionTable</actionType>
                <decisionTable>Accrual_Purchase_Multiplier</decisionTable>
            </actions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>LessThan</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>MC_PositiveCurrencyPointsBalance</sourceFieldName>
                    <value>0</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>IF Positive Balance is NEGATIVE</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1 OR 2</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>Equals</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>TransactionJournal.Is_Non_Merchanised_Item__c</sourceFieldName>
                    <value>true</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>Equals</operator>
                    <sequence>2</sequence>
                    <sourceFieldName>TransactionJournal.Product_Category_Name__c</sourceFieldName>
                    <value>Non-Merchandised</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>If Non Merchandise</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <isProcessEligibilityRule>false</isProcessEligibilityRule>
            <ruleName>Base Rule Setup</ruleName>
            <startDate>2024-03-01</startDate>
            <status>Active</status>
            <stepMappings>
                <associatedStep>IF Positive Balance is NEGATIVE</associatedStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>If Non Merchandise</associatedStep>
                <sequence>4</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>GET Positive Balance Currency</associatedStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Assign Beginning Negative Balance</associatedStep>
                <parentStep>IF Positive Balance is NEGATIVE</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Set Parameter</associatedStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Set BasePoints to Zero</associatedStep>
                <parentStep>If Non Merchandise</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Run Flow - Get Runtime Configuration</associatedStep>
                <sequence>5</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Get Decision Table Outcome</associatedStep>
                <sequence>6</sequence>
            </stepMappings>
        </rules>
        <rules>
            <actions>
                <actionName>Overwrite for PerLineItemOrder Rewards Tracking</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>PerLineItemOrderRewards Tracking</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberAttributeCurrentValue</parameterName>
                    <value>EA_PerLIneItemOrderRewardsTracking</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>OverwriteCurrentValue</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>{!DoublePointsPromo_DELTA_Multiplier} * {!PointsForPurchase}</value>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <conditions>
                <conditionCriteria>1 AND (2 OR 3 OR 4 OR 5 OR 6 OR 7 OR 8 OR 9 OR 10 OR (11 AND 12))</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>Equals</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>TransactionJournal.VoucherCode</sourceFieldName>
                    <value>NULL</value>
                    <valueType>Formula</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>Contains</operator>
                    <sequence>2</sequence>
                    <sourceFieldName>TransactionJournal.Product.ProductCode</sourceFieldName>
                    <value>EJNZ:528012</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>Contains</operator>
                    <sequence>3</sequence>
                    <sourceFieldName>TransactionJournal.Product.ProductCode</sourceFieldName>
                    <value>EJNZ:515241</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>Contains</operator>
                    <sequence>4</sequence>
                    <sourceFieldName>TransactionJournal.Product.ProductCode</sourceFieldName>
                    <value>EJNZ:417062</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>Contains</operator>
                    <sequence>5</sequence>
                    <sourceFieldName>TransactionJournal.Product.ProductCode</sourceFieldName>
                    <value>EJNZ:286043</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>Contains</operator>
                    <sequence>6</sequence>
                    <sourceFieldName>TransactionJournal.Product.ProductCode</sourceFieldName>
                    <value>EJNZ:488147</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>Contains</operator>
                    <sequence>7</sequence>
                    <sourceFieldName>TransactionJournal.Product.ProductCode</sourceFieldName>
                    <value>EJ:353507</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>Contains</operator>
                    <sequence>8</sequence>
                    <sourceFieldName>TransactionJournal.Product.ProductCode</sourceFieldName>
                    <value>EJ:752195</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>Contains</operator>
                    <sequence>9</sequence>
                    <sourceFieldName>TransactionJournal.Product.ProductCode</sourceFieldName>
                    <value>JJ:688155</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>Contains</operator>
                    <sequence>10</sequence>
                    <sourceFieldName>TransactionJournal.Product.ProductCode</sourceFieldName>
                    <value>JJ:667473</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>Equals</operator>
                    <sequence>11</sequence>
                    <sourceFieldName>TransactionJournal.Brand</sourceFieldName>
                    <value>Portmans</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>Equals</operator>
                    <sequence>12</sequence>
                    <sourceFieldName>TransactionJournal.Product.Country__c</sourceFieldName>
                    <value>Australia</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>IF product code qualifies</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <isProcessEligibilityRule>false</isProcessEligibilityRule>
            <previousRule>Base Rule Setup</previousRule>
            <promotion>Double Points Promo</promotion>
            <ruleName>Double Points Promo</ruleName>
            <startDate>2024-03-01</startDate>
            <status>Active</status>
            <stepMappings>
                <associatedStep>IF product code qualifies</associatedStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Overwrite for PerLineItemOrder Rewards Tracking</associatedStep>
                <parentStep>IF product code qualifies</parentStep>
                <sequence>1</sequence>
            </stepMappings>
        </rules>
    </programProcesses>
    <programProcesses>
        <parameters>
            <dataType>Text</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>Channel</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>CurrentRedeemVoucherFaceValue</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EA_RedeemVoucherFaceValueTracking</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>VoucherId</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <description>Create a Loyalty Process for Type = Accrual and Sub Type = Voucher.</description>
        <executionType>RealTime</executionType>
        <journalSubType>Voucher</journalSubType>
        <journalType>Accrual</journalType>
        <processName>Redeem Voucher Process</processName>
        <processType>TransactionJournal</processType>
        <status>Active</status>
        <rules>
            <actions>
                <actionName>Redeem Voucher Using Voucher Code</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCode</parameterName>
                    <value>{!TransactionJournal.VoucherCode}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>AmountToRedeem</parameterName>
                    <value>{!TransactionJournal.TransactionAmount}</value>
                </actionParameters>
                <actionType>RedeemVoucher</actionType>
            </actions>
            <actions>
                <actionName>Increment Face Value of voucher redemption</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>{!TransactionJournal.TransactionAmount}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberAttributeCurrentValue</parameterName>
                    <value>CurrentRedeemVoucherFaceValue</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>Redeem Voucher FaceValueTracking</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>IncreaseCurrentValue</value>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <actions>
                <actionName>GET RedeemVoucherFaceValueTracking EA</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>Redeem Voucher FaceValueTracking</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberAttributeCurrentValue</parameterName>
                    <value>EA_RedeemVoucherFaceValueTracking</value>
                </actionParameters>
                <actionType>GetMemberAttributesValues</actionType>
            </actions>
            <actions>
                <actionName>Overwrite RedeemVoucherFaceValue Consolidated EA</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>RedeemVoucherFaceValue Consolidated</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>OverwriteCurrentValue</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>{!EA_RedeemVoucherFaceValueTracking}</value>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <actions>
                <actionName>Debug RVFV_RedeemProcess</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message1</parameterName>
                    <value>&quot;&apos;Debug RVFV_RedeemProcess&apos;&quot;</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message4</parameterName>
                    <value>&apos;OrderId : &apos; + {!TransactionJournal.Order_ID__c}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message3</parameterName>
                    <value>&apos;ChannelName :  &apos; + {!TransactionJournal.Channel_Name__c}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message2</parameterName>
                    <value>&apos;Debug RVFV_RedeemProcess RVFV :  &apos; + TEXT({!CurrentRedeemVoucherFaceValue} )</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Debug_Process</flowDefinition>
            </actions>
            <actions>
                <actionName>Publish Voucher Redeem Event</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherCode</parameterName>
                    <value>{!TransactionJournal.VoucherCode}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Channel</parameterName>
                    <value>{!TransactionJournal.Channel_Name__c}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OrderNo</parameterName>
                    <value>{!TransactionJournal.Order_ID__c}</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Publish_Voucher_Redeem_Event</flowDefinition>
            </actions>
            <description>Redeem Voucher and associate Order via PE</description>
            <isProcessEligibilityRule>false</isProcessEligibilityRule>
            <ruleName>RedeemVoucherAndUpdateOrderUsingPE</ruleName>
            <startDate>2024-04-01</startDate>
            <status>Active</status>
            <stepMappings>
                <associatedStep>Redeem Voucher Using Voucher Code</associatedStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Increment Face Value of voucher redemption</associatedStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>GET RedeemVoucherFaceValueTracking EA</associatedStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Overwrite RedeemVoucherFaceValue Consolidated EA</associatedStep>
                <sequence>4</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Debug RVFV_RedeemProcess</associatedStep>
                <sequence>5</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Publish Voucher Redeem Event</associatedStep>
                <sequence>6</sequence>
            </stepMappings>
        </rules>
    </programProcesses>
    <programProcesses>
        <executionType>RealTime</executionType>
        <journalSubType>Admin Adjustment</journalSubType>
        <journalType>Accrual</journalType>
        <processName>Reset Return Tracking Attribute Value</processName>
        <processType>TransactionJournal</processType>
        <status>Active</status>
        <rules>
            <actions>
                <actionName>Reset Return Tracking Value to 0</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>Return Tracking</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>OverwriteCurrentValue</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>0</value>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <isProcessEligibilityRule>false</isProcessEligibilityRule>
            <ruleName>Reset Return Tracking Attribute</ruleName>
            <startDate>2024-04-01</startDate>
            <status>Active</status>
            <stepMappings>
                <associatedStep>Reset Return Tracking Value to 0</associatedStep>
                <sequence>1</sequence>
            </stepMappings>
        </rules>
    </programProcesses>
    <programProcesses>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>This Stores Transaction Amount from Journal</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>BasePointsToReverse</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>BeginningTotalRewards</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>ConcatenatedOriginalOrderAmount</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>ConcatenatedPointsCreditedOutput</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>ConcatenatedTotalReturnAmount</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>ConcatenatedreturnChannelValue</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>keeps track of Count for each journal entry passed in via a Single API</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>CurrentLineItemCount</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Variable to store output of current Return Tracking Engagement Attribute Value after Increment</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>CurrentReturnTrackingValue</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>CurrentTotalRewards</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>Variable to store Output from Decision Table</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>DT_Multiplier</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Sobject</dataType>
            <description>Variable to store Brand Multiplier from Decision Table</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <objectName>Accrual_Purchase_Multiplier__c</objectName>
            <parameterName>DT_Outcome</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Variable to store Current Negative Balance Tracking Engagement Attribute</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EA_NegativeBalanceTracking</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Variable to store Current Positive Balance Tracking Engagement Attribute</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EA_PositiveBalanceTracking</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Variable to store current value from Return Tracking Engagement Attribute</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EA_ReturnTrackingOutPut</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EachLineItemPointsToReverse</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Variable to store Positive Tracking Engagement attribute current value before debit</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>GetPositiveEAValueBeforeDebit</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Boolean</dataType>
            <description>Parameter to store Boolean value (True) if return is full return</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>IsFullReturn</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Boolean</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>JournalsNotFound</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>LineItemPointsCredited</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Variable to store Current Negative Balance Currency</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>MC_NegativeCurrencyPointsBalance</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Variable to store Current Positive Balance Currency</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>MC_PositiveCurrencyPointsBalance</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Variable to store Current Negative Balance points of members</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>MemberNegativeBalance</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Variable to store Current Positive Balance points of members</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>MemberPositiveBalance</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>OrderIdItemChannelKey</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>OriginalOrderAmountKey</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>Variable to store Original Order Id from Transaction Journal</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>OriginalOrderId</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>OriginalOrderIdOuput</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Points to Reverse</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>PointsToReverse</parameterName>
            <parameterType>Formula</parameterType>
            <value>{!TotalAmountCreditedForPurchase}</value>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Variable to store output from flow - Get points for which voucher was Issued</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>Points_for_which_Voucher_was_Issued</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Output variable to store total amount credited for purchase on Original Order</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>TotalAmountCreditedForPurchase</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Output variable to store total original amount of original order from Transaction journal. (Output from flow)</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>TotalAmountOfOriginalOrderIdFromTJ</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Parameter to store total amount of original order ; in order to compare whether full or partial refund</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>TotalOriginalOrderAmt</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>store found redeemed vouchers and their sum total value, being reversed to be &apos;issued&apos; again</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>TotalVoucherFaceValueReversed</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Output variable to store total voucher count for Order Issued Voucher</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>VoucherCountForOrderIdIssued</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Boolean</dataType>
            <description>Variable to store output from flow - to get voucher details</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>VoucherIssuedOnOrder</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Boolean</dataType>
            <description>Variable to store output from flow - to get voucher details</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>VoucherRedeemedForOrder</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>perOrderReturnAmount</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>returnPerOrderChannel</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>returnPerOrderChannelKey</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>returnPerOrderTotalAmountKey</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <executionType>RealTime</executionType>
        <journalSubType>Reversal</journalSubType>
        <journalType>Accrual</journalType>
        <processName>Reversal for Return Process</processName>
        <processType>TransactionJournal</processType>
        <status>Active</status>
        <rules>
            <actions>
                <actionName>PositiveBalanceCurrency - Points Balance</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Positive Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsBalance</parameterName>
                    <value>MC_PositiveCurrencyPointsBalance</value>
                </actionParameters>
                <actionType>GetMemberPointBalance</actionType>
            </actions>
            <actions>
                <actionName>NegativeBalanceCurrency - Points Balance</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Negative Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsBalance</parameterName>
                    <value>MC_NegativeCurrencyPointsBalance</value>
                </actionParameters>
                <actionType>GetMemberPointBalance</actionType>
            </actions>
            <actions>
                <actionName>Sync Rewards Tracking with Positive Currency Balance</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>Rewards Tracking</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>OverwriteCurrentValue</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>{!MC_PositiveCurrencyPointsBalance}</value>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <actions>
                <actionName>Sync Rewards Tracking to ZERO</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>Rewards Tracking</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>OverwriteCurrentValue</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>0</value>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <actions>
                <actionName>Update Member - Status Points</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_action</parameterName>
                    <value>update</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_entity</parameterName>
                    <value>LoyaltyProgramMember</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Id</parameterName>
                    <value>{!TransactionJournal.Member.Id}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Status_Points__c</parameterName>
                    <value>{!MC_PositiveCurrencyPointsBalance} - {!MC_NegativeCurrencyPointsBalance}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>LastActivityDate</parameterName>
                    <value>DATEVALUE({!TransactionJournal.ActivityDate} )</value>
                </actionParameters>
                <actionType>Crud</actionType>
                <crudActionType>update</crudActionType>
                <entityApiName>LoyaltyProgramMember</entityApiName>
            </actions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>GreaterThanOrEquals</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>MC_PositiveCurrencyPointsBalance</sourceFieldName>
                    <value>0</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>If Positive Balance</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>LessThan</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>MC_PositiveCurrencyPointsBalance</sourceFieldName>
                    <value>0</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>If Negative Balance</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <isProcessEligibilityRule>false</isProcessEligibilityRule>
            <previousRule>Reversal Rule</previousRule>
            <ruleName>Final Rule</ruleName>
            <startDate>2024-04-01</startDate>
            <status>Active</status>
            <stepMappings>
                <associatedStep>If Positive Balance</associatedStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>If Negative Balance</associatedStep>
                <sequence>4</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>PositiveBalanceCurrency - Points Balance</associatedStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>NegativeBalanceCurrency - Points Balance</associatedStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Sync Rewards Tracking with Positive Currency Balance</associatedStep>
                <parentStep>If Positive Balance</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Sync Rewards Tracking to ZERO</associatedStep>
                <parentStep>If Negative Balance</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Update Member - Status Points</associatedStep>
                <sequence>5</sequence>
            </stepMappings>
        </rules>
        <rules>
            <actions>
                <actionName>Set Parameters</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>BasePointsToReverse</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>CEILING({!TransactionJournal.TransactionAmount} )</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OriginalOrderId</parameterName>
                    <sequenceNumber>2</sequenceNumber>
                    <value>{!TransactionJournal.Original_Order_ID__c}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>CurrentLineItemCount</parameterName>
                    <sequenceNumber>3</sequenceNumber>
                    <value>0</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>IsFullReturn</parameterName>
                    <sequenceNumber>4</sequenceNumber>
                    <value>false</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>TotalVoucherFaceValueReversed</parameterName>
                    <sequenceNumber>5</sequenceNumber>
                    <value>0</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>Get Decision Table Outcome</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Brand__c</parameterName>
                    <value>{!TransactionJournal.Brand}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>DecisionTableOutcomeType</parameterName>
                    <value>DT_Multiplier</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>DecisionTableSingleOutcome</parameterName>
                    <value>DT_Outcome</value>
                </actionParameters>
                <actionType>GetOutputsFromDecisionTable</actionType>
                <decisionTable>Accrual_Purchase_Multiplier</decisionTable>
            </actions>
            <actions>
                <actionName>Assign ZERO to BasePoints</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>BasePointsToReverse</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>0</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>Return Tracking EA Current Value</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>Return Tracking</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberAttributeCurrentValue</parameterName>
                    <value>EA_ReturnTrackingOutPut</value>
                </actionParameters>
                <actionType>GetMemberAttributesValues</actionType>
            </actions>
            <actions>
                <actionName>Get Original Points Credited for Purchase perLineItem and perOrder</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OriginalOrderItemId</parameterName>
                    <value>{!TransactionJournal.Original_Order_Item_ID__c}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OriginalOrderId</parameterName>
                    <value>{!TransactionJournal.Original_Order_ID__c}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ReturnChannel</parameterName>
                    <value>{!TransactionJournal.Channel}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OriginalChannel</parameterName>
                    <value>{!TransactionJournal.Original_Channel__c}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>TransactionAmount</parameterName>
                    <value>{!BasePointsToReverse}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ReturnOrderId</parameterName>
                    <value>{!TransactionJournal.Order_ID__c}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ReturnOrderItemId</parameterName>
                    <value>{!TransactionJournal.Order_Item_ID__c}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>memberId</parameterName>
                    <value>{!TransactionJournal.MemberId}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ConcatenatedOutput</parameterName>
                    <value>ConcatenatedPointsCreditedOutput</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ConcatenatedReturnChannelValue</parameterName>
                    <value>ConcatenatedreturnChannelValue</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ConcatenatedTotalReturnAmount</parameterName>
                    <value>ConcatenatedTotalReturnAmount</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Return_total_points_credited</flowDefinition>
            </actions>
            <actions>
                <actionName>Assign PerOrderReturnChannelKey</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>returnPerOrderChannelKey</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>{!TransactionJournal.Order_ID__c} &amp; &apos;@&apos;</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>Extract PerOrderReturnChannel value</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>returnPerOrderChannel</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>MID(    {!ConcatenatedreturnChannelValue}  ,    
                                FIND({!returnPerOrderChannelKey}   , {!ConcatenatedreturnChannelValue}  ) + LEN({!returnPerOrderChannelKey} ), 
                                FIND(&apos;@&apos; , RIGHT({!ConcatenatedreturnChannelValue} ,  LEN({!ConcatenatedreturnChannelValue} )  - (FIND({!returnPerOrderChannelKey} ,{!ConcatenatedreturnChannelValue} ) +LEN({!returnPerOrderChannelKey} )) ))  
                                )</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>Debug Channel Value</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message2</parameterName>
                    <value>&apos;returnPerOrderChannel = &apos; &amp; {!returnPerOrderChannel}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message1</parameterName>
                    <value>&quot;&apos;debug Channel Value&apos;&quot;</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Debug_Process</flowDefinition>
            </actions>
            <actions>
                <actionName>Assign OrderIdItemChannelKey@</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OrderIdItemChannelKey</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>{!TransactionJournal.Order_ID__c} &amp;
                                {!TransactionJournal.Order_Item_ID__c} &amp;
                                {!returnPerOrderChannel} &amp;
                                {!TransactionJournal.Original_Order_ID__c} &amp;{!TransactionJournal.Original_Order_Item_ID__c} &amp; {!TransactionJournal.Original_Channel__c} &amp; &apos;@&apos;</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>returnPerOrderTotalAmountKey</parameterName>
                    <sequenceNumber>2</sequenceNumber>
                    <value>{!TransactionJournal.Order_ID__c} &amp;{!TransactionJournal.Order_Item_ID__c} &amp;{!returnPerOrderChannel}  &amp; &apos;@&apos;</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>Assign EachLineItemPointsToReverse = BasePointsToReverse</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EachLineItemPointsToReverse</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>{!BasePointsToReverse}</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>Assign per LineItem Points to Reverse &amp; perOrder ReturnTotalAmount</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EachLineItemPointsToReverse</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>VALUE(
                                  MID(
                                    {!ConcatenatedPointsCreditedOutput} , 
                                    FIND({!OrderIdItemChannelKey}  , {!ConcatenatedPointsCreditedOutput} ) + LEN({!OrderIdItemChannelKey} ), 
                                    FIND(&apos;@&apos; , RIGHT({!ConcatenatedPointsCreditedOutput} ,
                                               LEN({!ConcatenatedPointsCreditedOutput})  - (FIND({!OrderIdItemChannelKey},{!ConcatenatedPointsCreditedOutput} )
                                                +LEN({!OrderIdItemChannelKey}))  ))
                                    )
                                  )</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>perOrderReturnAmount</parameterName>
                    <sequenceNumber>2</sequenceNumber>
                    <value>VALUE(
                                  MID(
                                    {!ConcatenatedTotalReturnAmount} , 
                                    FIND({!returnPerOrderTotalAmountKey}   , {!ConcatenatedTotalReturnAmount}  ) + LEN({!returnPerOrderTotalAmountKey}  ), 
                                    FIND(&apos;@&apos; , RIGHT({!ConcatenatedTotalReturnAmount}  ,
                                               LEN({!ConcatenatedTotalReturnAmount} )  - (FIND({!returnPerOrderTotalAmountKey} ,{!ConcatenatedTotalReturnAmount}  )
                                                +LEN({!returnPerOrderTotalAmountKey} ))  ))
                                    )
                                  )</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>Debug Original Points Credited</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message5</parameterName>
                    <value>&apos;Starting position of digit =&apos; &amp;
                                TEXT(FIND({!returnPerOrderChannelKey}  , {!ConcatenatedreturnChannelValue} ) + LEN({!returnPerOrderChannelKey}  )) &amp; &apos; ; &apos; &amp;
                                &apos;Ending position digit =&apos; &amp;
                                 TEXT(   FIND(&apos;@&apos; , RIGHT({!ConcatenatedreturnChannelValue}   ,
                                               LEN({!ConcatenatedreturnChannelValue} )  - (FIND({!returnPerOrderChannelKey} ,{!ConcatenatedreturnChannelValue}   )
                                                +LEN({!returnPerOrderChannelKey}  ))  ))
                                )</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message4</parameterName>
                    <value>&apos;returnPerOrderChannel = &apos;  &amp; {!returnPerOrderChannel}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message3</parameterName>
                    <value>&apos;EachLineItemPointsToReverse = &apos; &amp; TEXT( {!EachLineItemPointsToReverse} )</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message2</parameterName>
                    <value>&apos;TransactionJournal.Order_ID__c = &apos; &amp; {!TransactionJournal.Order_ID__c}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message1</parameterName>
                    <value>&quot;&apos;Debug Original Points Credited&apos;&quot;</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Debug_Process</flowDefinition>
            </actions>
            <actions>
                <actionName>Positive Balance Tracking EA Current Value</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberAttributeCurrentValue</parameterName>
                    <value>EA_PositiveBalanceTracking</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>Positive Balance Tracking</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionType>GetMemberAttributesValues</actionType>
            </actions>
            <actions>
                <actionName>Positive Balance</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Positive Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsBalance</parameterName>
                    <value>MemberPositiveBalance</value>
                </actionParameters>
                <actionType>GetMemberPointBalance</actionType>
            </actions>
            <actions>
                <actionName>Get Original Transaction Amount of Order</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OriginalOrderID</parameterName>
                    <value>{!OriginalOrderId}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>memberId</parameterName>
                    <value>{!TransactionJournal.Member.Id}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ConcatenatedOriOrderAmount</parameterName>
                    <value>ConcatenatedOriginalOrderAmount</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OriginalTotalAmount</parameterName>
                    <value>TotalAmountOfOriginalOrderIdFromTJ</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Handle_Return_Process_TJ</flowDefinition>
            </actions>
            <actions>
                <actionName>Assign OriginalOrderId Key</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OriginalOrderAmountKey</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>{!TransactionJournal.Original_Order_ID__c} &amp;&apos;@&apos;</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>Extract Total Orginal Order Amount per OriginalOrderId</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>TotalOriginalOrderAmt</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>VALUE(  MID(    {!ConcatenatedOriginalOrderAmount}  ,     FIND({!OriginalOrderAmountKey}   , {!ConcatenatedOriginalOrderAmount}   ) + LEN({!OriginalOrderAmountKey}   ),     FIND(&apos;@&apos; , RIGHT({!ConcatenatedOriginalOrderAmount}   ,               LEN({!ConcatenatedOriginalOrderAmount} )  - (FIND({!OriginalOrderAmountKey} ,{!ConcatenatedOriginalOrderAmount}  )                +LEN({!OriginalOrderAmountKey}  ))  ))    )  )</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>Debug Return Amt vs Original</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message5</parameterName>
                    <value>&apos;TotalOriginalOrderAmt = &apos; &amp; TEXT({!TotalOriginalOrderAmt} ) &amp; &apos; ; &apos; &amp;
                                &apos;TotalAmountOfOriginalOrderIdFromTJ = &apos; &amp; TEXT({!TotalAmountOfOriginalOrderIdFromTJ} )</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message4</parameterName>
                    <value>&apos;OriginalOrderId = &apos; &amp; {!OriginalOrderId} &amp;
                                &apos;TotalOriginalOrderAmt = &apos; &amp;  TEXT({!TotalOriginalOrderAmt} )</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message3</parameterName>
                    <value>&apos;perOrderReturnAmount  = &apos;  &amp; TEXT({!perOrderReturnAmount} )</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message2</parameterName>
                    <value>&apos;EachLineItemPointsToReverse = &apos; &amp; TEXT( {!EachLineItemPointsToReverse} )</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message1</parameterName>
                    <value>&quot;&apos;Debug Return Amt vs Original&apos;&quot;</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Debug_Process</flowDefinition>
            </actions>
            <actions>
                <actionName>Full Return Flag = TRUE</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>IsFullReturn</parameterName>
                    <sequenceNumber>1</sequenceNumber>
                    <value>True</value>
                </actionParameters>
                <actionType>AssignParameterValues</actionType>
            </actions>
            <actions>
                <actionName>Debug if Full Return</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message3</parameterName>
                    <value>&apos;CurrentLineItemCount = &apos; &amp; TEXT({!CurrentLineItemCount} )</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message2</parameterName>
                    <value>&apos;IsFullReturn = &apos; &amp; IF( {!IsFullReturn} , &apos;True&apos;, &apos;False&apos;)</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message1</parameterName>
                    <value>&quot;&apos;Debug if full Return&apos;&quot;</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Debug_Process</flowDefinition>
            </actions>
            <actions>
                <actionName>Get Reversed Redeemed Vouchers Total FaceValue Amount</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberId</parameterName>
                    <value>{!TransactionJournal.MemberId}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OriginalOrderId</parameterName>
                    <value>{!TransactionJournal.Original_Order_ID__c}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OriginalChannel</parameterName>
                    <value>{!TransactionJournal.Original_Channel__c}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>TotalVoucherFaceValueReversed</parameterName>
                    <value>TotalVoucherFaceValueReversed</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Transaction_Journal_Reversal_VoucherReversal_Value</flowDefinition>
            </actions>
            <actions>
                <actionName>Debug input for Voucher Reverse</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message5</parameterName>
                    <value>&apos;TotalVoucherFaceValueReversed = &apos; &amp; TEXT( {!TotalVoucherFaceValueReversed} )</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message4</parameterName>
                    <value>&apos;TransactionJournal.Original_Order_ID__c} = &apos; &amp; {!TransactionJournal.Original_Order_ID__c}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message3</parameterName>
                    <value>&apos;TransactionJournal.MemberId = &apos; &amp; {!TransactionJournal.MemberId}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message2</parameterName>
                    <value>&apos;TransactionJournal.Original_Channel__c = &apos;  &amp; {!TransactionJournal.Original_Channel__c}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message1</parameterName>
                    <value>&quot;&apos;Debug Voucher Reverse&apos;&quot;</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Debug_Process</flowDefinition>
            </actions>
            <actions>
                <actionName>Publish Event to Reverse Redeemed Voucher Status to Issued</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberId</parameterName>
                    <value>{!TransactionJournal.MemberId}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OriginalOrderId</parameterName>
                    <value>{!TransactionJournal.Original_Order_ID__c}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OriginalChannel</parameterName>
                    <value>{!TransactionJournal.Original_Channel__c}</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Publish_Event_for_Reversal_of_Redeemed_Vouchers</flowDefinition>
            </actions>
            <actions>
                <actionName>Overwrite ReversedVoucherFaceValue EA</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>ReversedVoucherTotalFaceValue</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>OverwriteCurrentValue</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>{!TotalVoucherFaceValueReversed}</value>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <actions>
                <actionName>Debit Points</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Positive Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsToDebit</parameterName>
                    <value>{!EachLineItemPointsToReverse}</value>
                </actionParameters>
                <actionType>DebitPoints</actionType>
            </actions>
            <actions>
                <actionName>RESET LineItemCount</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>0</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>LineItemCount</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>OverwriteCurrentValue</value>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <actions>
                <actionName>RESET Return Tracking EA</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>0</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>OverwriteCurrentValue</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>Return Tracking</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <conditions>
                <conditionCriteria>1 OR 2 OR 3</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>Equals</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>TransactionJournal.Is_Non_Merchanised_Item__c</sourceFieldName>
                    <value>true</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>Equals</operator>
                    <sequence>2</sequence>
                    <sourceFieldName>TransactionJournal.Product_Category_Name__c</sourceFieldName>
                    <value>Non-Merchandised</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>Equals</operator>
                    <sequence>3</sequence>
                    <sourceFieldName>DT_Outcome.Multiplier__c</sourceFieldName>
                    <value>0</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>If Non Merchandise</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>NotEquals</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>TransactionJournal.Original_Order_ID__c</sourceFieldName>
                    <value>NULL</value>
                    <valueType>Formula</valueType>
                </conditionFilterCriteria>
                <conditionName>IF Original OrderID Exist</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>Equals</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>TransactionJournal.Original_Order_ID__c</sourceFieldName>
                    <value>NULL</value>
                    <valueType>Formula</valueType>
                </conditionFilterCriteria>
                <conditionName>IF Original OrderID is NULL</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1 AND 2 AND 3</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>Equals</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>perOrderReturnAmount</sourceFieldName>
                    <value>TotalOriginalOrderAmt</value>
                    <valueType>Parameter</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>NotEquals</operator>
                    <sequence>2</sequence>
                    <sourceFieldName>BasePointsToReverse</sourceFieldName>
                    <value>0</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionFilterCriteria>
                    <operator>NotEquals</operator>
                    <sequence>3</sequence>
                    <sourceFieldName>TransactionJournal.Original_Order_ID__c</sourceFieldName>
                    <value>NULL</value>
                    <valueType>Formula</valueType>
                </conditionFilterCriteria>
                <conditionName>Check if perOrderReturnAmount  = Original Amount [Full Return]</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>Equals</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>IsFullReturn</sourceFieldName>
                    <value>true</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>If Returned Order&apos;s Original Order is full return (scenario 7A) AND LineItemCount  = 1</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <isProcessEligibilityRule>false</isProcessEligibilityRule>
            <ruleName>Reversal Rule</ruleName>
            <startDate>2024-04-01</startDate>
            <status>Active</status>
            <stepMappings>
                <associatedStep>If Non Merchandise</associatedStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>IF Original OrderID Exist</associatedStep>
                <sequence>5</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>IF Original OrderID is NULL</associatedStep>
                <sequence>6</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Check if perOrderReturnAmount  = Original Amount [Full Return]</associatedStep>
                <sequence>15</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>If Returned Order&apos;s Original Order is full return (scenario 7A) AND LineItemCount  = 1</associatedStep>
                <parentStep>Check if perOrderReturnAmount  = Original Amount [Full Return]</parentStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Set Parameters</associatedStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Get Decision Table Outcome</associatedStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Assign ZERO to BasePoints</associatedStep>
                <parentStep>If Non Merchandise</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Return Tracking EA Current Value</associatedStep>
                <sequence>4</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Get Original Points Credited for Purchase perLineItem and perOrder</associatedStep>
                <parentStep>IF Original OrderID Exist</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Assign PerOrderReturnChannelKey</associatedStep>
                <parentStep>IF Original OrderID Exist</parentStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Extract PerOrderReturnChannel value</associatedStep>
                <parentStep>IF Original OrderID Exist</parentStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Debug Channel Value</associatedStep>
                <parentStep>IF Original OrderID Exist</parentStep>
                <sequence>4</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Assign OrderIdItemChannelKey@</associatedStep>
                <parentStep>IF Original OrderID Exist</parentStep>
                <sequence>5</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Assign EachLineItemPointsToReverse = BasePointsToReverse</associatedStep>
                <parentStep>IF Original OrderID is NULL</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Assign per LineItem Points to Reverse &amp; perOrder ReturnTotalAmount</associatedStep>
                <sequence>7</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Debug Original Points Credited</associatedStep>
                <sequence>8</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Positive Balance Tracking EA Current Value</associatedStep>
                <sequence>9</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Positive Balance</associatedStep>
                <sequence>10</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Get Original Transaction Amount of Order</associatedStep>
                <sequence>11</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Assign OriginalOrderId Key</associatedStep>
                <sequence>12</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Extract Total Orginal Order Amount per OriginalOrderId</associatedStep>
                <sequence>13</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Debug Return Amt vs Original</associatedStep>
                <sequence>14</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Full Return Flag = TRUE</associatedStep>
                <parentStep>Check if perOrderReturnAmount  = Original Amount [Full Return]</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Debug if Full Return</associatedStep>
                <parentStep>Check if perOrderReturnAmount  = Original Amount [Full Return]</parentStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Get Reversed Redeemed Vouchers Total FaceValue Amount</associatedStep>
                <parentStep>If Returned Order&apos;s Original Order is full return (scenario 7A) AND LineItemCount  = 1</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Debug input for Voucher Reverse</associatedStep>
                <parentStep>If Returned Order&apos;s Original Order is full return (scenario 7A) AND LineItemCount  = 1</parentStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Publish Event to Reverse Redeemed Voucher Status to Issued</associatedStep>
                <parentStep>If Returned Order&apos;s Original Order is full return (scenario 7A) AND LineItemCount  = 1</parentStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Overwrite ReversedVoucherFaceValue EA</associatedStep>
                <parentStep>If Returned Order&apos;s Original Order is full return (scenario 7A) AND LineItemCount  = 1</parentStep>
                <sequence>4</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Debit Points</associatedStep>
                <sequence>16</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>RESET LineItemCount</associatedStep>
                <sequence>17</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>RESET Return Tracking EA</associatedStep>
                <sequence>18</sequence>
            </stepMappings>
        </rules>
    </programProcesses>
    <programProcesses>
        <parameters>
            <dataType>Text</dataType>
            <description>Channel associated with the Order ID. Must use channel name formula field</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>Channel</parameterName>
            <parameterType>Formula</parameterType>
            <value>{!TransactionJournal.Channel_Name__c}</value>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Store total number of accrual items being processed so far</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EA_AccrualItemTracking</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Store to current Positive Balance engagement attribute</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EA_PositiveBalanceTracking</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>NOT BEING USED</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EA_RedemptionTracking</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>Set Event Type = Redemption</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>EventType</parameterName>
            <parameterType>Constant</parameterType>
            <value>Redemption</value>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>This is the loyalty member ID to process the journal</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>MemberID</parameterName>
            <parameterType>Formula</parameterType>
            <value>{!TransactionJournal.MemberId}</value>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>Order ID associated with this Redemption</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>OrderID</parameterName>
            <parameterType>Formula</parameterType>
            <value>{!TransactionJournal.Order_ID__c}</value>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>Order Item ID associated with this Redemption</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>OrderItemID</parameterName>
            <parameterType>Formula</parameterType>
            <value>{!TransactionJournal.Order_Item_ID__c}</value>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Store the current Positive Balance Currency</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>PositiveBalanceCurrency</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>Loyalty Program ID</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>ProgramID</parameterName>
            <parameterType>Formula</parameterType>
            <value>{!TransactionJournal.LoyaltyProgram.Id}</value>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>Loyalty Program Name</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>ProgramName</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>This is the per-calculated points to deduct. from the currency. Since each accrual journal will attempt to deduct points we need to divide the points to deduct based on # of accrual items being processed.</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>TotalPointsToDebit</parameterName>
            <parameterType>Formula</parameterType>
            <value>{!TotalVouchersToIssue} * {!VoucherTargetPoints}</value>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Total # of vouchers to issue</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>TotalVouchersToIssue</parameterName>
            <parameterType>Formula</parameterType>
            <value>{!TransactionJournal.Voucher_Count__c}</value>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>2</decimalPlaces>
            <description>Face value of reward vouchers being issued</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>VoucherFaceValue</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>Voucher Definition Name being used to issue reward vouchers</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>VoucherRewardDefinition</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Numeric</dataType>
            <decimalPlaces>0</decimalPlaces>
            <description>Target points to issue reward vouchers</description>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>false</isOutput>
            <parameterName>VoucherTargetPoints</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <description>Handle rewards redemption by debiting points</description>
        <executionType>RealTime</executionType>
        <journalSubType>Reward</journalSubType>
        <journalType>Redemption</journalType>
        <processName>Rewards Redemption Process</processName>
        <processType>TransactionJournal</processType>
        <status>Active</status>
        <rules>
            <actions>
                <actionName>Run Flow - Get Runtime Configuration</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherRewardDefinitionName</parameterName>
                    <value>VoucherRewardDefinition</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherRewardTargetPoints</parameterName>
                    <value>VoucherTargetPoints</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>LoyaltyProgramName</parameterName>
                    <value>ProgramName</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>VoucherRewardFaceValue</parameterName>
                    <value>VoucherFaceValue</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Get_Runtime_Configuration</flowDefinition>
            </actions>
            <actions>
                <actionName>Get PositiveBalanceCurrency</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Positive Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsBalance</parameterName>
                    <value>PositiveBalanceCurrency</value>
                </actionParameters>
                <actionType>GetMemberPointBalance</actionType>
            </actions>
            <actions>
                <actionName>Run Flow - Debug</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message5</parameterName>
                    <value>TEXT( {!EA_AccrualItemTracking}  )</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message3</parameterName>
                    <value>TEXT( {!EA_PositiveBalanceTracking} )</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message2</parameterName>
                    <value>TEXT( {!PositiveBalanceCurrency} )</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message1</parameterName>
                    <value>TEXT( {!TotalPointsToDebit} )</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Message4</parameterName>
                    <value>{!TransactionJournal.Channel_Name__c}</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Debug_Process</flowDefinition>
            </actions>
            <actions>
                <actionName>Debit Positive Balance Currency</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Positive Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsToDebit</parameterName>
                    <value>{!TotalPointsToDebit}</value>
                </actionParameters>
                <actionType>DebitPoints</actionType>
            </actions>
            <actions>
                <actionName>GET Positive Balance Currency</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramCurrencyName</parameterName>
                    <value>Positive Balance</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>PointsBalance</parameterName>
                    <value>PositiveBalanceCurrency</value>
                </actionParameters>
                <actionType>GetMemberPointBalance</actionType>
            </actions>
            <actions>
                <actionName>Update Member - Status Points</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_action</parameterName>
                    <value>update</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_entity</parameterName>
                    <value>LoyaltyProgramMember</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Id</parameterName>
                    <value>{!MemberID}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Status_Points__c</parameterName>
                    <value>{!PositiveBalanceCurrency}</value>
                </actionParameters>
                <actionType>Crud</actionType>
                <crudActionType>update</crudActionType>
                <entityApiName>LoyaltyProgramMember</entityApiName>
            </actions>
            <actions>
                <actionName>Overwrite RewardTracking EA with Current Positive Balance</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EngagementAttributeName</parameterName>
                    <value>Rewards Tracking</value>
                    <valueType>Literal</valueType>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>UpdateType</parameterName>
                    <value>OverwriteCurrentValue</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Value</parameterName>
                    <value>{!PositiveBalanceCurrency}</value>
                </actionParameters>
                <actionType>UpdateCurrentValueForMemberAttribute</actionType>
            </actions>
            <actions>
                <actionName>Run Flow - Handle Redemption Journal</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EventType</parameterName>
                    <value>{!EventType}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Channel</parameterName>
                    <value>{!TransactionJournal.Channel_Name__c}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>TotalPointsToDebit</parameterName>
                    <value>{!TotalPointsToDebit}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>TotalRewards</parameterName>
                    <value>{!TotalPointsToDebit}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OrderID</parameterName>
                    <value>{!OrderID}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>ProgramID</parameterName>
                    <value>{!ProgramID}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>OrderItemID</parameterName>
                    <value>{!OrderItemID}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MemberID</parameterName>
                    <value>{!MemberID}</value>
                </actionParameters>
                <actionType>RunFlow</actionType>
                <flowDefinition>Loyalty_Process_Process_Rewards</flowDefinition>
            </actions>
            <conditions>
                <conditionCriteria>1</conditionCriteria>
                <conditionFilterCriteria>
                    <operator>GreaterThan</operator>
                    <sequence>1</sequence>
                    <sourceFieldName>PositiveBalanceCurrency</sourceFieldName>
                    <value>0</value>
                    <valueType>Literal</valueType>
                </conditionFilterCriteria>
                <conditionName>If Positive Balance &gt; 0</conditionName>
                <conditionType>Condition</conditionType>
            </conditions>
            <isProcessEligibilityRule>false</isProcessEligibilityRule>
            <ruleName>Base Rule</ruleName>
            <startDate>2024-04-01</startDate>
            <status>Active</status>
            <stepMappings>
                <associatedStep>If Positive Balance &gt; 0</associatedStep>
                <sequence>7</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Run Flow - Get Runtime Configuration</associatedStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Get PositiveBalanceCurrency</associatedStep>
                <sequence>2</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Run Flow - Debug</associatedStep>
                <sequence>3</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Debit Positive Balance Currency</associatedStep>
                <sequence>4</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>GET Positive Balance Currency</associatedStep>
                <sequence>5</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Update Member - Status Points</associatedStep>
                <sequence>6</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Overwrite RewardTracking EA with Current Positive Balance</associatedStep>
                <parentStep>If Positive Balance &gt; 0</parentStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Run Flow - Handle Redemption Journal</associatedStep>
                <sequence>8</sequence>
            </stepMappings>
        </rules>
    </programProcesses>
    <programProcesses>
        <parameters>
            <dataType>Text</dataType>
            <description>Update Apple Wallet Link field on Loyalty Member record</description>
            <isCollection>false</isCollection>
            <isInput>true</isInput>
            <isOutput>false</isOutput>
            <parameterName>AppleWalletLink</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Date</dataType>
            <description>Update Birthdate on Person Account record</description>
            <isCollection>false</isCollection>
            <isInput>true</isInput>
            <isOutput>false</isOutput>
            <parameterName>Birthdate</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>Identifier of the contact that&apos;s associated with the loyalty program member.</description>
            <isCollection>false</isCollection>
            <isInput>true</isInput>
            <isOutput>true</isOutput>
            <parameterName>ContactId</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>Update country field on Loyalty Member record</description>
            <isCollection>false</isCollection>
            <isInput>true</isInput>
            <isOutput>false</isOutput>
            <parameterName>Country</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>Email address of the member.</description>
            <isCollection>false</isCollection>
            <isInput>true</isInput>
            <isOutput>false</isOutput>
            <parameterName>Email</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>Name of the channel used for enrolling in the loyalty program.</description>
            <isCollection>false</isCollection>
            <isInput>true</isInput>
            <isOutput>false</isOutput>
            <parameterName>EnrollmentChannel</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Date</dataType>
            <description>Date on which the member enrolled in the loyalty program.</description>
            <isCollection>false</isCollection>
            <isInput>true</isInput>
            <isOutput>false</isOutput>
            <parameterName>EnrollmentDate</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>A given name of the member.</description>
            <isCollection>false</isCollection>
            <isInput>true</isInput>
            <isOutput>false</isOutput>
            <parameterName>FirstName</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>Update Google Wallet Link field on Loyalty Member record</description>
            <isCollection>false</isCollection>
            <isInput>true</isInput>
            <isOutput>false</isOutput>
            <parameterName>GoogleWalletLink</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>Surname or the family name of the member.</description>
            <isCollection>false</isCollection>
            <isInput>true</isInput>
            <isOutput>false</isOutput>
            <parameterName>LastName</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>The identifier of the loyalty program member.</description>
            <isCollection>false</isCollection>
            <isInput>true</isInput>
            <isOutput>true</isOutput>
            <parameterName>MemberId</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>Update Member Status field to re-enrol Loyalty Member</description>
            <isCollection>false</isCollection>
            <isInput>true</isInput>
            <isOutput>false</isOutput>
            <parameterName>MemberStatus</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>The membership number of the loyalty program member.</description>
            <isCollection>false</isCollection>
            <isInput>true</isInput>
            <isOutput>false</isOutput>
            <parameterName>MembershipNumber</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>Mobile phone number of the member.</description>
            <isCollection>false</isCollection>
            <isInput>true</isInput>
            <isOutput>false</isOutput>
            <parameterName>MobilePhone</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Boolean</dataType>
            <description>Update Staff field on Loyalty Member record</description>
            <isCollection>false</isCollection>
            <isInput>true</isInput>
            <isOutput>false</isOutput>
            <parameterName>Staff</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <description>Update State field on Loyalty Member record</description>
            <isCollection>false</isCollection>
            <isInput>true</isInput>
            <isOutput>false</isOutput>
            <parameterName>State</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <parameters>
            <dataType>Text</dataType>
            <isCollection>false</isCollection>
            <isInput>false</isInput>
            <isOutput>true</isOutput>
            <parameterName>TransactionJournalId</parameterName>
            <parameterType>Variable</parameterType>
        </parameters>
        <rules>
            <actions>
                <actionName>Update Member Record</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_entity</parameterName>
                    <value>LoyaltyProgramMember</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Id</parameterName>
                    <value>{!MemberId}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>State__c</parameterName>
                    <value>{!State}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EnrollmentChannel</parameterName>
                    <value>{!EnrollmentChannel}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Google_Wallet_Link__c</parameterName>
                    <value>{!GoogleWalletLink}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MembershipNumber</parameterName>
                    <value>{!MembershipNumber}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>EnrollmentDate</parameterName>
                    <value>{!EnrollmentDate}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Country__c</parameterName>
                    <value>{!Country}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Staff__c</parameterName>
                    <value>{!Staff}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Apple_Wallet_Link__c</parameterName>
                    <value>{!AppleWalletLink}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_outputId</parameterName>
                    <value>MemberId</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_action</parameterName>
                    <value>update</value>
                </actionParameters>
                <actionType>Crud</actionType>
                <crudActionType>update</crudActionType>
                <entityApiName>LoyaltyProgramMember</entityApiName>
            </actions>
            <actions>
                <actionName>Update Member&apos;s Contact Record</actionName>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_action</parameterName>
                    <value>update</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_entity</parameterName>
                    <value>Contact</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Id</parameterName>
                    <value>{!ContactId}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Email</parameterName>
                    <value>{!Email}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>MobilePhone</parameterName>
                    <value>{!MobilePhone}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>LastName</parameterName>
                    <value>{!LastName}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>FirstName</parameterName>
                    <value>{!FirstName}</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>_outputId</parameterName>
                    <value>ContactId</value>
                </actionParameters>
                <actionParameters>
                    <operator>Equals</operator>
                    <parameterName>Birthdate</parameterName>
                    <value>{!Birthdate}</value>
                </actionParameters>
                <actionType>Crud</actionType>
                <crudActionType>update</crudActionType>
                <entityApiName>Contact</entityApiName>
            </actions>
            <description>Modifies the member record and the associated contact record.</description>
            <isProcessEligibilityRule>false</isProcessEligibilityRule>
            <ruleName>Update Member Details</ruleName>
            <startDate>2024-03-14</startDate>
            <status>Active</status>
            <stepMappings>
                <associatedStep>Update Member Record</associatedStep>
                <sequence>1</sequence>
            </stepMappings>
            <stepMappings>
                <associatedStep>Update Member&apos;s Contact Record</associatedStep>
                <sequence>2</sequence>
            </stepMappings>
        </rules>
        <description>Updates member details such as first name, last name, email ID, and mobile phone number.</description>
        <executionType>RealTime</executionType>
        <processName>UpdateMemberDetails</processName>
        <processType>UpdateMemberDetails</processType>
        <status>Active</status>
    </programProcesses>
</LoyaltyProgramSetup>