Agendor icon

Agendor

Integração completa com Agendor CRM

Negócio → Buscar

AI-generated

Summary

Search deals in Agendor CRM using various criteria including deal ID, funnel stage, owner ID, status, company ID, or list all deals with optional pagination.

Inputs

  • searchType (required) — The criteria to search deals by: by ID, by funnel stage, by owner, by status, by company, or list all deals.
  • dealId (required) — Unique ID of the deal to fetch (required if searchType is 'id').
  • stageId (required) — ID of the funnel stage to filter deals (required if searchType is 'stage').
  • ownerId (required) — ID of the user responsible for the deal (required if searchType is 'owner').
  • dealStatus (required) — Status of the deal to filter by: "Em Andamento" (in progress), "Ganho" (won), or "Perdido" (lost) (required if searchType is 'status').
  • organizationIdForDeal (required) — ID of the company to filter deals by (required if searchType is 'organization').
  • withCustomFields — Whether to include custom fields in the response.
  • returnAll — Whether to return all results when listing all deals; applies when searchType is 'all'.
  • limit — Maximum number of deals to return when listing all deals and returnAll is false; min 1, max 100.

Output shape

a list of deal records or a single deal record

The output shape depends on the searchType; searching by ID returns a single deal object, other types return arrays of deals. If 'Listar Todos' is selected, pagination applies and all or limited results are returned based on 'returnAll' and 'limit' parameters. Custom fields are included if 'withCustomFields' is true.

Examples

Example 1: Search a deal by its unique ID

Set 'searchType' to 'id' and provide the 'dealId' parameter.

Example 2: List all deals for a specific funnel stage

Set 'searchType' to 'stage' and provide the 'stageId' parameter.

Example 3: Retrieve all deals with pagination

Set 'searchType' to 'all', set 'returnAll' to true to retrieve all deals, or set it to false and specify 'limit'.

Discussion