PhonePe | SDE2 | Machine Coding Round

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2025-05-07Added By Anonymous
Source: Link

Company: PhonePe
Role: software engineer 2
Interview Stage: Machine Coding Round
Location: unknown
Year: unknown

Original Post Content:

The task is to design a complaint resolution system to manage unsuccessful transactions. Key features include:

  • Customers can log issues for failed or pending transactions by providing details like issue type, subject, description, and email.

Customer Service Agents:

  • Handle only one issue at a time.
  • Can search issues by ID or customer email.
  • Can resolve issues and receive new ones.

Admins:

  • Can onboard agents with specific expertise (issue types).
  • Can view the work history of agents.

System Requirements:

  • Assign issues to free agents using an assignment strategy.
  • Track and filter issues.
  • Maintain resolution history.

Implementation requirements:

  • createIssue(transactionId, issueType, subject, description, email)
  • addAgent(agentEmail, agentName, List<issueType>)
  • assignIssue(issueId) // -> Issue can be assigned to the agents based on different strategies. For now, assign to any one of the free agents.
  • getIssues(filter) // -> issues against the provided filter, e.g.: getIssue({"email": "testUser2@test.com"});
  • updateIssue(issueId, status, resolution)
  • resolveIssue(issueId, resolution)
  • viewAgentsWorkHistory() // -> a list of issues which agents worked on
Comments