# Set Case Priority from Origin

**Type:** Apex trigger · **Difficulty:** Easy · **Object:** Case · **Topics:** Case, Before Insert, Field Assignment

Practice this problem interactively (write and run your Apex trigger against realistic data): https://www.forcechallenges.com/problems/set-case-priority-from-origin

## Problem

When a Case is created, set Priority to High if Origin is Phone. For all other origins, set Priority to Normal. This helps teams triage phone-reported issues consistently.

## Constraints

Write bulk-safe trigger logic. Do not run SOQL or DML inside a loop.

---
Source: ForceChallenges · last updated 2026-10-13
