EspoCRM icon

EspoCRM

Interact with EspoCRM API

Opportunity → Get Many

AI-generated

Summary

Retrieve multiple Opportunity records from EspoCRM with filtering, sorting, and pagination options.

Inputs

  • Return All — Choose whether to return all matching Opportunity records or limit the number of records returned.
  • Limit — Specify the maximum number of Opportunity records to return when 'Return All' is false (default is 50).
  • Filter Options — Define filter conditions, sorting, selected fields, offset, and other query parameters to refine the list of Opportunities.
  • Filter Options.where — JSON array of filter conditions according to the EspoCRM API to limit which Opportunities are returned.
  • Filter Options.orderBy — Field name to sort the returned Opportunities by.
  • Filter Options.order — Sort direction, either ascending or descending, applied to the 'orderBy' field.
  • Filter Options.select — Comma-separated fields to include in each Opportunity record in the response.
  • Filter Options.offset — Number of Opportunity records to skip, useful for pagination.
  • Filter Options.skipTotalCount — Flag to skip calculating the total count of matching records to improve performance for large datasets.
  • Filter Options.boolFilterList — Comma-separated predefined boolean filters to apply such as 'onlyMy' or 'followed'.
  • Filter Options.primaryFilter — Context-specific base filter to apply to the Opportunity query.

Output shape

An array of Opportunity records matching the query with the specified fields and order.

The operation returns a paginated or complete list of Opportunity records depending on the 'Return All' and 'Limit' settings. The structure of Opportunity objects depends on the selected fields. If 'skipTotalCount' is true, the total number of matching records may not be included for performance reasons.

Examples

Example 1: Retrieve up to 100 Opportunities sorted by creation date descending

Set Return All to false, Limit to 100, Order By to 'createdAt', and Order to 'desc'.

Example 2: Retrieve all Opportunities where stage is 'Negotiation'

Set Return All to true, and in Filter Options.where provide filter condition [{"stage":"Negotiation"}].

Links

Discussion