PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/System Design/Rippling

Extend rules for trip-level aggregates and outputs

Last updated: Apr 29, 2026

Quick Overview

This question evaluates a candidate's competency in system design for backend rule engines, covering data aggregation and grouping strategies, rules evaluation and explainability, API/schema design, and performance considerations.

  • medium
  • Rippling
  • System Design
  • Software Engineer

Extend rules for trip-level aggregates and outputs

Company: Rippling

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Technical Screen

Extend the same system to support aggregate trip‑level rules. Implement handling for rules like: ( 1) A trip’s total expenses cannot exceed $2000; ( 2) Total meal expenses per trip cannot exceed $200. In the provided sample, trip "002" violates both rules. Update the design and the evaluateRules return type so the output includes per‑trip violations alongside per‑expense violations. Describe grouping/aggregation strategy, evaluation order, explainability for aggregates, performance considerations, and how these results integrate into the expenses API used by many companies.

Quick Answer: This question evaluates a candidate's competency in system design for backend rule engines, covering data aggregation and grouping strategies, rules evaluation and explainability, API/schema design, and performance considerations.

Related Interview Questions

  • Prevent Duplicate Payments Under High Load - Rippling
  • Design a personalized news aggregator - Rippling (medium)
  • Design a Scalable News Feed - Rippling (medium)
  • Design Scalable Expense Violation Processing - Rippling (hard)
  • Design several large-scale systems - Rippling (hard)
Rippling logo
Rippling
Aug 7, 2025, 12:00 AM
Software Engineer
Technical Screen
System Design
12
0

Extend Rules Engine: Aggregate Trip-Level Policies

Context

You previously built an expense policy engine that evaluates per-expense rules (e.g., "a single meal cannot exceed $50"). Extend that system to support aggregate, trip-level rules that operate over groups of expenses for the same trip.

Assume each expense has at least: expenseId, tripId, employeeId, category, amount, currency, incurredAt. Currency normalization to a policy currency (e.g., USD) is available.

Requirements

Add support for aggregate rules including (but not limited to):

  1. A trip’s total expenses cannot exceed $2,000.
  2. Total meal expenses per trip cannot exceed $200.

In the provided sample, trip "002" violates both rules. Update the design and the evaluateRules return type so the output includes per-trip violations alongside per-expense violations.

Describe:

  • Grouping/aggregation strategy (how expenses are grouped and metrics computed)
  • Evaluation order (per-expense vs. per-trip and how updates flow)
  • Explainability for aggregates (what evidence is returned and how it’s human-readable)
  • Performance considerations (throughput, latency, incremental updates)
  • How these results integrate into the expenses API used by many companies

Provide:

  • Updated component design for aggregate rules
  • A precise return type/schema for evaluateRules that includes per-trip violations
  • A short, concrete example showing trip "002" violating both aggregates

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Rippling•More Software Engineer•Rippling Software Engineer•Rippling System Design•Software Engineer System Design
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.