Sort and limit
Sort and limit puts the items in order and can keep only the first ones: the 10 best rated, the 20 nearest, the highest fit scores. Sort by fit score, rating, reviews, name or any field an earlier block adds. Items without the value go last, so an unrated place never tops the list.
In the editor: Puts the items in order, and can keep only the first ones: the 10 best rated, the 20 nearest, the highest fit scores. Items without the value go last.
Settings
Sort by
Pick oneWhat to put the items in order by.
- Fit score The score an xMap LLM or Jev block writes (fit_score, or any field ending in score).
- Rating The rating out of 5 from Map business scan or POI Intelligence.
- Reviews The number of reviews, when the data has it (live map listings rarely do).
- Name The name, or the company or job title for items without one. Sorted as people read: capitals and accents ignored, 10 after 9.
- Another field Any field by its name, for example depot_km from Find nearest, rain_total_mm from Weather forecast, or a field from your own table.
Field name
TextA field an earlier block adds, as named in the results. Click one under Fields coming in.
Needed before the flow can run.
Order
Pick oneHighest first for scores and ratings; lowest first for distances, or A to Z for names.
Numbers: highest first puts the biggest number first. Names and text: Z to A.
- Highest first (Z to A)
- Lowest first (A to Z)
Keep
Pick oneKeep every item, only the first few, or a number you choose.
- All of them Only the order changes.
- The first 5
- The first 10
- The first 20
- The first 50
- The first 100
- A number I choose Type how many to keep, from 1 to 5,000.
How many
A numberNeeded before the flow can run.
What comes out
Each item that leaves the block carries these fields, to use in the blocks after it as {{field}}.
The items, in the new order
Nothing is added or changed; with a Keep setting, only the first ones go on.
every field: Unchanged. The order is what the next blocks see: an email lists them in this order, a CRM gets them in this order.fit_score: Here, the field the items were sorted by.
How to use it
The 10 best prospects every morning
A software company scores every new shop in Johannesburg with xMap AI, but its reps can only call ten a day.
Before: The email listed 60 places in the order they were found.
With the flow: The email lists the ten best, best first, each with the reason for its score.
Stores closest to each depot
A distributor wants the 20 new stores nearest a depot for this week’s trial deliveries.
Find nearest adds depot_km to each store; Another field: depot_km, Lowest first, keeps the closest.
Top rated hotels for a client shortlist
The wettest days first
A city drainage team wants the forecast days with the most rain at the top of the morning email.
Rank candidate sites
A developer scores each plot sent by its brokers and wants the three best in front of the board.
Before: Analysts ranked the plots in a spreadsheet every Thursday.
With the flow: The three best arrive scored and ranked as soon as a broker sends a plot.
Busiest sites first
A telecom operator ranks candidate tower sites by footfall before a field survey.
Sort by Another field, footfall_daily: the busiest sites first. A site with no footfall data yet goes last.
A to Z for a client report
Names sort as people read them, so a report a client skims is easy to search by eye.
Good to know
- Items without the value go last, whatever the order, and keep the order they came in.
- A field is sorted as numbers when most of its values are numbers (a decimal comma is read too), otherwise as text with capitals and accents ignored.
- If none of the items has the field you name, the step fails and lists the fields that do reach the block.
- To keep only items above a value, use Filter; to keep the best few, use Sort and limit. They work well one after the other.
- Put it last before an email, a map, a sheet or a CRM: they all keep the order.
- Sort and limit is free and runs the same in the editor’s preview and in real runs.
Works well with
- xMap LLM: Tell the AI what to do in plain words.
- Filter: Keeps only the items that match a rule.
- Find nearest: For each place, finds the nearest of your own points from a CSV you upload, for example the nearest ambulance to each accident or the nearest branch to each new lead, and adds its name and the distance.
- Remove duplicates: Keeps one of each item when the same one arrives more than once, for example from two searches that overlap.
- Calculated field: Adds fields worked out from the others: a number, a text or a yes/no.
- Email: Sends one email per run with all the items, or one email per item.
- Show on a map: Shows the results as points on a map, with the area of interest.
- Map business scan: Finds businesses on online maps live: name, category, rating, address, phone, website and whether it is open.
Templates that use it
- How customers rate competitors: How customers rate your competitors, every week, the weakest first.
- New homes with no supermarket yet: New apartment buildings with no supermarket nearby, scored as places for your next store.
- Big employers near my office, and who runs it: The biggest employers around your office, with their office and facilities managers, in Slack.
- Who lives around new places: The new cafes in your city with the people living around each.
- Morning call list with decision makers and call notes: The 20 best clinics to call today, with the owner or director, in a sheet.
- More businesses like my best customers: Businesses that look like your best customers, near them, not yet in HubSpot.
- Score every neighbourhood for a new branch: Every block of your city scored for a new supermarket, the 20 best on a map.
- Shop space for rent near stations in Tokyo: New shop and restaurant space for rent near Tokyo’s stations, every Monday, best value first.
- Busy stations with no convenience store: The train and metro stations with the fewest convenience stores around them, scored for a new one.
- Fair franchise territories for a city: Your city shared into six fair franchise territories by where people live, with a plan for each.
- Where to open a delivery kitchen: Where to open a delivery kitchen: people per restaurant in every block of the city.
- Best-rated suppliers near me: The best-rated restaurant suppliers near you, scored from how buyers rate them.
- Where to open my next cafe: Areas with many residents and few cafes, scored for your next cafe.
- Best neighbourhoods for families: The neighbourhoods where most children live, ranked for families by schools, playgrounds and parks.
- New homes for sale near the best-rated schools: New homes for sale near the best-rated schools in your city, every Monday.
- Neighbourhoods without a grocery store: Blocks where people live with almost no grocery store, biggest gaps first.
- Find distributors in a new country: Wholesalers and distributors in a new country, scored as partners.
- Best-of list for a local blog post: A best-of list for your city blog every month: the top 10 places with a blurb each and an introduction.
- Best neighbourhoods to target ads around a store: The 20 blocks with the most adults around each store, for your ad targeting.
- Roles open for weeks: offer your help: Roles open for weeks, ranked by how urgently the employer needs help.
- Daily hiring signals in Slack: New warehouse employers posted to your Slack every morning.
- Where to put micro-fulfilment hubs: Where to put micro-fulfilment hubs: most people per warehouse first.
- Incidents and the people they affect: Road incidents and how many people live around each, every morning.
- Neighbourhoods far from a hospital: Neighbourhoods with no hospital within 5 km, most populated first.
And 274 more in the template gallery.
Stories with it
- First through every new bakery's door (Food distribution)
- A second ramen shop where the lunch crowd is (Restaurants)
- Every new bar on a rep’s list by Monday (Craft beer)
- A pop-up spot that sells out the drop (Sneakers and streetwear)
- Six beaches, one van, the right one each morning (Gelato van)
- New stores where people reach for reading glasses (Eyewear retail)
- Cash machines that follow the street, not last year (Retail banking)
- At every new restaurant before it settles in (Payments)
- The city’s favourite kitchens, on the food floor (Shopping malls)
- Sending every ambulance to the hospital it can reach (Emergency services)
- Where Melbourne’s young families have no childcare (Urban planning)
- Pump crews in place before the rain hits Jakarta (Flood control)
Help articles
- Score, rank and label with xMap LLM: A score and a reason for every result, in your words.
Guides and terms
- How to score candidate store sites: Compare sites on residents, competitors and neighbours, with an AI score and a reason.
- Lead scoring: Ranking prospects by how likely they are to buy.
Industries that use it
B2B sales · Retail & franchise · Restaurants & cafes · Real estate · FMCG & distribution · Marketing & agencies · Recruiting & staffing · Logistics & delivery · Government & cities · Investors & consultants · Healthcare & pharma · Hotels & tourism · Banking & lending · Energy & EV · Construction & facilities · Telecom · Automotive & mobility · Education & training · Agriculture & food supply · Fitness, beauty & wellness · Law & professional services · Media & publishing · Events & venues · Non-profits & humanitarian · Security & emergency services · Environment & climate · Ports & shipping · E-commerce & D2C · Manufacturing & industrial · Software & tech · Sports clubs & leagues · Pet care & veterinary · Home services & trades · Food delivery & quick commerce · Airports & aviation · Mining, oil & gas · Public transport · Water & waste utilities · Insurance · Fishing & aquaculture
Try it
Build a flow with Sort and limit on the home page, no account needed, or book a call. Try it live