New SectionURL NameBayRewards-API-Understanding-reward-eligibility-in-Order-Create-UpdateTitleBayRewards API: Understanding reward_eligibility in Order Create/UpdateOwnerGayatriArticle DetailsContentHelp ContentThe reward_eligibility field in the Order Create/Update API controls whether an order should be evaluated for earning loyalty points. It works together with your Order Rules and Order Settings in the BayRewards admin panel. What reward_eligibility Means Default Behavior If you do not include reward_eligibility in the API request, BayRewards automatically sets it to false. This means: The system assumes the customer should not earn points for this order. No Order Rules will be evaluated unless you explicitly set reward_eligibility: true. This prevents points from being awarded accidentally for orders you did not intend to reward, especially during migrations or test environments. When reward_eligibility is Set to true When you set reward_eligibility: true: BayRewards will evaluate the order against all active Order Rules (like "Points for Order Amount", "Points for Purchase", etc.). If the order qualifies based on the rule settings, the system prepares to award points. However, points are actually awarded only after the order meets the required system conditions listed below. Conditions Required for Assigning Points Points are awarded only when all of the following conditions are satisfied: 1. completed_at must be today’s date This is a key requirement. BayRewards checks the order’s completed_at timestamp. Points will be awarded only on the day the order is marked as completed. If the completed_at date is older than today (e.g., past order updates), points will NOT be assigned. Why do we use completed_at? Because it reflects the actual moment the order is considered “finalized” and ready for rewards — more accurate than updated_at. 2. Points must not have been awarded earlier BayRewards prevents double crediting. If points were already issued for the order, the system will skip assigning them again. This ensures duplicate API calls or order updates do not lead to multiple point entries. 3. Inside BayRewards → Settings → Order Settings, customers choose how points should be awarded: Financial Status (Selectable Rule) Customers can explicitly choose a financial_status (e.g., paid) Allowed Options : paid, pending, failed.When selected, points will be awarded only when the order’s financial_status matches the chosen value. Order Status (Exclusion Rule Only) For order_status customers can exclude an order status from earning rewards. Currently, the only exclusion available is: Exclude order_status = “cancelled”When this is selected: Points will not be awarded for orders in “cancelled”. For all other status (e.g., open, completed ), points will be awarded as long as all other reward rules are met. Example If the customer excludes order_status = cancelled in UI, then: Points will not be issued when the order is “cancelled”. For any other order_status, points will be awarded once all other conditions (like reward_eligibility and rule conditions) are satisfied. Important Behavior for Existing Orders An order that was created earlier without awarding points can still get points later if: You update the order with reward_eligibility: true The order now meets all requirements (completed_at, status, no previous points) The UI setting criteria is satisfied This is useful for systems that update order status in multiple steps. Handling Historical Orders (Imports/Migrations) For orders imported from past data or for bulk migration: You must set reward_eligibility = false Historical orders should not earn points automatically via the Order API Instead: Use the Adjust Customer Points API to manually assign or reconcile points for past orders.This ensures complete control and avoids accidental mass point awards for old orders. Handling Cancellations (Point Revocation) If: reward_eligibility = true, Points were awarded earlier, and The order is later updated to cancelled Then BayRewards will: Automatically revoke the points issued for that order. But only if the customer has not redeemed those points.If the points were already redeemed, the system will not revoke them to prevent negative balances or inconsistencies. This protects customers from abuse (customers earning points and then cancelling orders).