PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/System Design/Rippling

Design expense rules engine and return type

Last updated: May 15, 2026

Quick Overview

This question evaluates a candidate's ability to design a scalable expense policy/rules engine for a corporate card system, testing skills in rule representation, API response modeling, conflict resolution, auditing/explanations, and performance and scalability considerations.

  • medium
  • Rippling
  • System Design
  • Software Engineer

Design expense rules engine and return type

Company: Rippling

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Technical Screen

Design a rules engine for a corporate credit‑card expense system where managers define policies. Implement evaluateRules(rules: list<rule>, expenses: list<expense>) -> ?, given expenses as a list of dictionaries with string keys and values. Support at least these rules: ( 1) No restaurant expense over $75; ( 2) No airfare expenses; ( 3) No entertainment expenses; ( 4) No expense over $250. The system must flag violating expenses. What should the function return to serve as an API response? Explain rule representation, extensibility to hundreds of rules, conflict handling and precedence, auditing/explanations, performance/scalability, and how managers select and manage rules. Discuss assumptions and any product-oriented clarifications you would ask before coding.

Quick Answer: This question evaluates a candidate's ability to design a scalable expense policy/rules engine for a corporate card system, testing skills in rule representation, API response modeling, conflict resolution, auditing/explanations, and performance and scalability considerations.

Related Interview Questions

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

Design a Rules Engine for Corporate Card Expenses

Context

You are building an expense policy engine for a corporate credit-card system. Managers define policies (rules) that must be evaluated against expense transactions. Each expense is represented as a dictionary/map with string keys and string values.

Task

Design and describe an implementation for:

  • A rule representation that supports at least the four sample policies below and scales to hundreds of rules.
  • A function: evaluateRules(rules: list <rule> , expenses: list <expense> ) -> ?
  • Define what the function should return as an API response that downstream services and UIs can consume.
  • Explain conflict handling and precedence, auditing/explanations, performance and scalability, and how managers select and manage rules.
  • State assumptions and product clarifications you would ask before coding.

Given Policies (minimum support)

  1. No restaurant expense over $75.
  2. No airfare expenses.
  3. No entertainment expenses.
  4. No expense over $250.

The system must flag violating expenses.

Solution

Show

Submit Your Answer

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,500+ 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.