useWorkspace.AI
Sign InGet Started

Sort Shape

Learn how to use the Sort shape for sorting operations in ISO 5807 flowcharts

Last updated: January 13, 2025
2 min read read

Sort Shape

The Sort shape represents a sorting operation that arranges data in a specific order. It's shown as a diamond with horizontal lines through the middle.

What is a Sort Shape?

The Sort shape represents:

  • Sorting algorithms
  • Data ordering operations
  • Arranging items by criteria
  • Reordering collections
  • Ranking operations

According to ISO 5807, this shape specifically indicates a sorting or ordering operation.

When to Use

Use the Sort shape for:

  • Sorting: "Sort by price ascending", "Order by date"
  • Ranking: "Rank by score", "Order by priority"
  • Alphabetizing: "Sort names A-Z", "Order products by name"
  • Numerical ordering: "Sort ascending", "Order descending"
  • Custom sorting: "Sort by custom criteria"

Visual Appearance

In DiagramKit.AI, the Sort shape appears as:

  • Dimensions: 120×120 pixels (diamond)
  • Color: Light purple (#fdf4ff)
  • Border: Purple (#a855f7)
  • Shape: Diamond with horizontal division

Best Practices

✅ Good Usage

[Query products from database]
   ↓
[Sort by price ascending]
   ↓
[Display sorted results]
  • Specify sort criteria (by price, by date, etc.)
  • Indicate order (ascending/descending, A-Z)
  • Show what is being sorted
  • Place before display or output

❌ Avoid

  • ❌ Decisions: "Is sorted?" (use Decision)
  • ❌ Too vague: "Sort" (sort by what?)
  • ❌ Processing: "Calculate" (use Process)
  • ❌ Without criteria

Common Examples

Example 1: Product Listing

[Fetch products]
   ↓
<Sort preference?>
  ↙     ↓      ↘
Price  Name  Rating
 ↓      ↓      ↓
[Sort] [Sort] [Sort]
 by     by     by
 price] name]  rating]
   ↓      ↓      ↓
[Display results]

Example 2: Search Results

[Execute search]
   ↓
[Calculate relevance scores]
   ↓
[Sort by relevance descending]
   ↓
[Paginate results]
   ↓
[Display first page]

Example 3: Report Generation

[Query sales data]
   ↓
[Sort by date ascending]
   ↓
[Group by month]
   ↓
[Generate report]

AI Prompt Tips

add sort operation by price
insert sort step for alphabetical order
create sort shape by date descending

Related Shapes

Pro Tip: Always specify both WHAT you're sorting and HOW (ascending/descending). "Sort products by price ascending" is perfect!