# AgencyZoom

> Search insurance leads, customers, tasks and service requests.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/agencyzoom

## Actions

### Get customer

Get customer from AgencyZoom.

**Inputs**

- Customer ID (`customer_id`, number, required): ID of the customer

**Outputs**

- `data` (object): The response from AgencyZoom.

**Example output**

```json
{
  "data": {
    "businessName": "example",
    "city": "example",
    "country": "example",
    "email": "example",
    "firstname": "example",
    "id": 1,
    "lastname": "example",
    "middlename": "example",
    "phone": "example",
    "secondaryEmail": "example",
    "secondaryPhone": "example",
    "state": "example",
    "streetAddress": "example",
    "zip": "example"
  }
}
```

### Get lead

Get lead from AgencyZoom.

**Inputs**

- Lead ID (`lead_id`, number, required): ID of the lead

**Outputs**

- `data` (object): The response from AgencyZoom.

**Example output**

```json
{
  "data": {
    "city": "example",
    "country": "example",
    "email": "example",
    "firstname": "example",
    "id": 1,
    "lastname": "example",
    "leadType": "example",
    "middlename": "example",
    "phone": "example",
    "secondaryEmail": "example",
    "secondaryPhone": "example",
    "state": "example",
    "status": 0,
    "streetAddress": "example"
  }
}
```

### Get task

Get task from AgencyZoom.

**Inputs**

- Task ID (`task_id`, number, required): ID of the task

**Outputs**

- `data` (object): The response from AgencyZoom.

**Example output**

```json
{
  "data": {
    "assignedDate": "example",
    "assignees": [
      {
        "firstname": "example",
        "id": 1,
        "isEmployee": true,
        "lastname": "example"
      }
    ],
    "comments": "example",
    "completeDate": "example",
    "completedBy": 1,
    "createDate": "example",
    "dueDate": "example",
    "duration": 1,
    "id": 1,
    "isCompletedByEmployee": true,
    "status": 0,
    "taskDateTime": "example",
    "timeSpecific": true,
    "title": "example"
  }
}
```

### List carriers

List carriers from AgencyZoom.

**Inputs**: None.

**Outputs**

- `data` (list): The response from AgencyZoom.

**Example output**

```json
{
  "data": [
    {
      "id": 1,
      "name": "example",
      "standardCarrierCode": "example"
    }
  ]
}
```

### List customer policies

List customer policies from AgencyZoom.

**Inputs**

- Customer ID (`customer_id`, number, required): ID of the customer

**Outputs**

- `data` (object): The response from AgencyZoom.

**Example output**

```json
{
  "data": {
    "agentId": 1,
    "agentName": "example",
    "carrierId": 1,
    "id": 1,
    "items": 1,
    "leadSourceId": 1,
    "policyNumber": "example",
    "policyTypeId": "example",
    "policyTypeName": "example",
    "premium": 1,
    "soldDate": "example",
    "standardCarrierCode": "example",
    "standardProductLineCode": "example",
    "status": 0
  }
}
```

### List customer tasks

List customer tasks from AgencyZoom.

**Inputs**

- Customer ID (`customer_id`, number, required): ID of the customer

**Outputs**

- `data` (list): The response from AgencyZoom.

**Example output**

```json
{
  "data": [
    {
      "assignedDate": "example",
      "assignees": [
        {
          "firstname": "example",
          "id": 1,
          "isEmployee": true,
          "lastname": "example"
        }
      ],
      "comments": "example",
      "completeDate": "example",
      "completedBy": 1,
      "createDate": "example",
      "dueDate": "example",
      "duration": 1,
      "id": 1,
      "isCompletedByEmployee": true,
      "status": 0,
      "taskDateTime": "example",
      "timeSpecific": true,
      "title": "example"
    }
  ]
}
```

### List employees

List employees from AgencyZoom.

**Inputs**: None.

**Outputs**

- `data` (list): The response from AgencyZoom.

**Example output**

```json
{
  "data": [
    {
      "avatar": "example",
      "email": "example",
      "externalIds": [
        "example"
      ],
      "externalSystem": "example",
      "firstname": "example",
      "id": 1,
      "isActive": true,
      "isOwner": true,
      "isProducer": true,
      "lastname": "example",
      "phone": "example",
      "userId": 1
    }
  ]
}
```

### List lead notes

List lead notes from AgencyZoom.

**Inputs**

- Lead ID (`lead_id`, number, required): ID of the lead

**Outputs**

- `data` (list): The response from AgencyZoom.

**Example output**

```json
{
  "data": [
    {
      "attr": {},
      "body": "example",
      "createDate": "example",
      "createdBy": "example",
      "title": "example",
      "type": "example"
    }
  ]
}
```

### List lead opportunities

List lead opportunities from AgencyZoom.

**Inputs**

- Lead ID (`lead_id`, number, required): ID of the lead

**Outputs**

- `data` (list): The response from AgencyZoom.

**Example output**

```json
{
  "data": [
    {
      "carrierId": 1,
      "customFields": [
        {
          "fieldName": "example",
          "fieldValue": [
            "example"
          ]
        }
      ],
      "id": 1,
      "items": 1,
      "premium": 1,
      "productLineId": 1,
      "propertyAddress": [
        {
          "address1": "example",
          "address2": "example",
          "city": "example",
          "country": "example",
          "id": 1,
          "leadOpportunityId": 1,
          "state": "example",
          "useMailingAddressAsLocation": 1,
          "zip": "example"
        }
      ],
      "standardCarrierCode": "example",
      "standardProductLineCode": "example",
      "status": 1
    }
  ]
}
```

### List lead quotes

List lead quotes from AgencyZoom.

**Inputs**

- Lead ID (`lead_id`, number, required): ID of the lead

**Outputs**

- `data` (list): The response from AgencyZoom.

**Example output**

```json
{
  "data": [
    {
      "carrierId": 1,
      "carrierName": "example",
      "customFields": [
        {
          "fieldName": "example",
          "fieldValue": [
            "example"
          ]
        }
      ],
      "id": 1,
      "items": 1,
      "potentialRevenue": 1,
      "premium": 1,
      "productLineId": 1,
      "productName": "example",
      "propertyAddress": [
        {
          "address1": "example",
          "address2": "example",
          "city": "example",
          "country": "example",
          "id": 1,
          "leadOpportunityId": 1,
          "state": "example",
          "useMailingAddressAsLocation": 1,
          "zip": "example"
        }
      ],
      "sold": true,
      "standardCarrierCode": "example",
      "standardProductLineCode": "example",
      "status": 1
    }
  ]
}
```

### List lead sources

List lead sources from AgencyZoom.

**Inputs**: None.

**Outputs**

- `data` (list): The response from AgencyZoom.

**Example output**

```json
{
  "data": [
    {
      "categoryId": 1,
      "excludeAsSales": true,
      "id": 1,
      "name": "example"
    }
  ]
}
```

### List lead tasks

List lead tasks from AgencyZoom.

**Inputs**

- Lead ID (`lead_id`, number, required): ID of the lead

**Outputs**

- `data` (list): The response from AgencyZoom.

**Example output**

```json
{
  "data": [
    {
      "assignedDate": "example",
      "assignees": [
        {
          "firstname": "example",
          "id": 1,
          "isEmployee": true,
          "lastname": "example"
        }
      ],
      "comments": "example",
      "completeDate": "example",
      "completedBy": 1,
      "createDate": "example",
      "dueDate": "example",
      "duration": 1,
      "id": 1,
      "isCompletedByEmployee": true,
      "status": 0,
      "taskDateTime": "example",
      "timeSpecific": true,
      "title": "example"
    }
  ]
}
```

### List locations

List locations from AgencyZoom.

**Inputs**: None.

**Outputs**

- `data` (list): The response from AgencyZoom.

**Example output**

```json
{
  "data": [
    {
      "id": "example",
      "name": "example"
    }
  ]
}
```

### List pipelines and stages

List pipelines and stages from AgencyZoom.

**Inputs**

- Type (`type`, text): Pipeline type. One of: `lead`, `service`.

**Outputs**

- `data` (list): The response from AgencyZoom.

**Example output**

```json
{
  "data": [
    {
      "id": 1,
      "name": "example",
      "seq": 1,
      "stages": [
        {
          "id": 1,
          "name": "example",
          "seq": 1,
          "status": 1
        }
      ],
      "status": 1,
      "type": "example"
    }
  ]
}
```

### List service categories

List service categories from AgencyZoom.

**Inputs**: None.

**Outputs**

- `data` (list): The response from AgencyZoom.

**Example output**

```json
{
  "data": [
    {
      "id": 1,
      "name": "example"
    }
  ]
}
```

### List tags

List tags from AgencyZoom.

**Inputs**: None.

**Outputs**

- `data` (object): The response from AgencyZoom.

**Example output**

```json
{
  "data": {
    "tags": [
      {
        "id": 1,
        "name": "example"
      }
    ]
  }
}
```

### Search customers

Search customers from AgencyZoom.

**Inputs**

- Page size (`page_size`, number): Page size: number of results returned. The maximum is 100. Default: `20`.
- Page (`page`, number): The page being returned. Start with 0. Default: `0`.
- Sort (`sort`, text): Field name used for sorting
- Order (`order`, text): Order. One of: `asc`, `desc`.
- Location (`location`, text): Unique identifier of the customer's location. Often used to filter customers within a specific branch.
- State (`state`, text): Two-letter abbreviation of the U.S. state where the customer resides, e.g., 'CA' for California or 'TX' for Texas. Used to filter customers by state.
- City (`city`, text): The name of the city where the customer is located.
- Email (`email`, text): The customer's email address.
- Phone (`phone`, text): The customer's phone number.
- Start date (`start_date`, text): The starting date for filtering customers by their creation date. Must be in ISO 8601 format, e.g., '2024-01-01'.
- End date (`end_date`, text): The end date for filtering customers by their creation date. Must be in ISO 8601 format, e.g., '2024-12-31'.
- Lead source (`lead_source_id`, number): The ID of the lead source that brought in the customer. Used for filtering by specific marketing or acquisition channels.
- Firstname (`firstname`, text): The customer's first name. Supports partial match filtering for flexible searches.
- Lastname (`lastname`, text): The customer's last name. Supports partial match filtering for flexible searches.
- Full name (`full_name`, text): Full name
- Policy type (`policy_type`, number): The ID of the policy type associated with the customer.
- Standard product line code (`standard_product_line_code`, text): The standard code of the policy type. Applicable only to enterprise users.
- Policy number (`policy_number`, text): The policy number to search for. Searches both written policies and AMS-synced policies.
- Agent (`agent_id`, number): The unique identifier of the agent assigned to the policy.
- Status (`status`, number): The status of the customer: 1 for active, 0 for inactive, and -1 for all. The default is -1 if no filter is applied

**Outputs**

- `data` (object): The response from AgencyZoom.

**Example output**

```json
{
  "data": {
    "customers": [
      {
        "businessName": "example",
        "city": "example",
        "country": "example",
        "email": "example",
        "firstname": "example",
        "id": 1,
        "lastname": "example",
        "middlename": "example",
        "phone": "example",
        "secondaryEmail": "example",
        "secondaryPhone": "example",
        "state": "example",
        "streetAddress": "example",
        "zip": "example"
      }
    ],
    "page": 1,
    "pageSize": 1,
    "totalCount": 1
  }
}
```

### Search leads

Search leads from AgencyZoom.

**Inputs**

- Page size (`page_size`, number): Page size: number of results returned. The maximum is 100. Default: `20`.
- Page (`page`, number): The page being returned. Start with 0. Default: `0`.
- Sort (`sort`, text): Field name used for sorting, not in enum, or empty, default value is lastEnterStageDate. One of: `firstname`, `lastname`, `lastEnterStageDate`, `lastActivityDate`. Default: `lastEnterStageDate`.
- Order (`order`, text): Order. One of: `asc`, `desc`.
- Location (`location`, text): Location ID
- ID (`id`, number): Unique identifier for the lead record
- Assigned to (`assigned_to`, number): Unique identifier of the agent assigned to the lead
- Creator (`creator`, number): Unique identifier of the agent who created the lead
- Status (`status`, number): Current status of the lead (0: NEW, 1: QUOTED, 2: WON, 3: LOST, 4: CONTACTED, 5: EXPIRED). One of: `0`, `1`, `2`, `3`, `4`, `5`.
- Lead source (`lead_source_id`, number): Unique identifier of the lead source
- Customer name (`customer_name`, text): Customer name for prefix-based search matching
- Customer email (`customer_email`, text): Customer email address for prefix-based search matching
- Customer phone (`customer_phone`, text): Customer phone number for prefix-based search matching
- Customer phone list (`customer_phone_list`, list): Array of phone numbers for exact matching against lead records
- Start date (`start_date`, text): Start date for lead creation date range filter (YYYY-MM-DD format)
- End date (`end_date`, text): End date for lead creation date range filter (YYYY-MM-DD format)
- Sold period (`sold_period`, text): Predefined date range for sold leads (today, yesterday, thisweek, lastweek, lastmonth, mtd, qtd, ytd, or custom range YYYY-MM-DD|YYYY-MM-DD). One of: `today`, `yesterday`, `mtd`, `lastmonth`, `ytd`, `lastyear`.
- Pipeline workflow ID (`pipeline_workflow_id`, number): Unique identifier of the workflow associated with the lead
- Workflow stage ID (`workflow_stage_id`, text): Workflow stage identifier(s) for filtering leads by stage (supports multiple stages separated by '/'，like stg2/stg3/stg5)
- Last activity earliest date (`last_activity_earliest_date`, text): Earliest date for last activity filter (YYYY-MM-DD format)
- Last activity latest date (`last_activity_latest_date`, text): Latest date for last activity filter (YYYY-MM-DD format)

**Outputs**

- `data` (object): The response from AgencyZoom.

**Example output**

```json
{
  "data": {
    "leads": [
      {
        "city": "example",
        "country": "example",
        "email": "example",
        "firstname": "example",
        "id": 1,
        "lastname": "example",
        "leadType": "example",
        "middlename": "example",
        "phone": "example",
        "secondaryEmail": "example",
        "secondaryPhone": "example",
        "state": "example",
        "status": 0,
        "streetAddress": "example"
      }
    ],
    "page": 1,
    "pageSize": 1,
    "quoteAmount": 1,
    "totalCount": 1
  }
}
```

### Search service requests

Search service requests from AgencyZoom.

**Inputs**

- Page size (`page_size`, number): Page size: number of results returned. The maximum is 100. Default: `20`.
- Page (`page`, number): The page being returned. Start with 0. Default: `0`.
- Sort (`sort`, text): Field name used for sorting
- Order (`order`, text): Order. One of: `asc`, `desc`.
- Location (`location`, text): Location ID
- Full name (`full_name`, text): Name of a household
- Status (`status`, number): Service ticket status
- Category (`category`, number): Service ticket category
- Priority (`priority`, number): Service ticket priority
- Resolution (`resolution`, text): The id of service ticket resolution
- Complete start (`complete_start`, text): The complete start date of a service ticket
- Complete end (`complete_end`, text): The complete end date of a service ticket
- Complete period (`complete_period`, text): The complete priorid
- Create start (`create_start`, text): The create start date of a service ticket
- Create end (`create_end`, text): The create end date of a service ticket
- Create period (`create_period`, text): The complete priorid
- Timezone (`timezone`, text): The timezone of agency
- Pipeline workflow ID (`pipeline_workflow_id`, number): The id of Pipeline
- Workflow stage ID (`workflow_stage_id`, number): The id of stage
- Tags (`tags`, text): The id of tags
- Service ticket IDS (`service_ticket_ids`, list): Service ticket Ids
- Policy type (`policy_type`, list): The ids of policy type. Optional if standardProductLineCodes is provided.
- Standard product line codes (`standard_product_line_codes`, list): The standard codes of policy type.
- Carrier (`carrier`, list): The ids of carrier. Optional if standardCarrierCodes is provided.
- Standard carrier codes (`standard_carrier_codes`, list): The standard codes of carrier.
- Policy number (`policy_number`, text): The policy number to search for. Searches both written policies and AMS-synced policies.

**Outputs**

- `data` (object): The response from AgencyZoom.

**Example output**

```json
{
  "data": {
    "page": 1,
    "pageSize": 1,
    "serviceTickets": [
      {
        "agencyId": 1,
        "createDate": "example",
        "csr": 1,
        "email": "example",
        "enrolled": 1,
        "enterStageTS": 1,
        "householdId": 1,
        "id": 1,
        "name": "example",
        "status": 1,
        "statusDesc": "example",
        "subject": "example",
        "workflowId": 1,
        "workflowStageId": 1
      }
    ],
    "totalCount": 1
  }
}
```

### Search tasks

Search tasks from AgencyZoom.

**Inputs**

- Page size (`page_size`, number): Page size: number of results returned. The maximum is 200. Default: `20`.
- Page (`page`, number): The page being returned. Start with 0. Default: `0`.
- Sort (`sort`, text): Field name used for sorting
- Order (`order`, text): Order. One of: `asc`, `desc`.
- Location (`location`, text): Location ID
- Start date (`start_date`, text): Start date of task created
- End date (`end_date`, text): End date of task created
- Type (`type`, text): Task type. One of: `sales`, `onboarding`.
- Assignee (`assignee_id`, number): Assignee ID
- Life professional ID (`life_professional_id`, number): ID of Life & Health Professional
- Status (`status`, number): Task status. 0 - open, 1 - completed. One of: `0`, `1`.
- Period (`period`, text): Predefined period. One of: `past-due-rotting`, `past-due`, `remainder-week`, `next-week`, `today`.
- Lead source category ID (`lead_source_category_id`, number): LeadSource category id
- Lead source (`lead_source_id`, number): LeadSource id

**Outputs**

- `data` (object): The response from AgencyZoom.

**Example output**

```json
{
  "data": {
    "outstandingCount": 1,
    "page": 1,
    "pageSize": 1,
    "tasks": [
      {
        "assignedDate": "example",
        "assignees": [
          {}
        ],
        "comments": "example",
        "completeDate": "example",
        "completedBy": 1,
        "createDate": "example",
        "dueDate": "example",
        "duration": 1,
        "id": 1,
        "isCompletedByEmployee": true,
        "status": 0,
        "taskDateTime": "example",
        "timeSpecific": true,
        "title": "example"
      }
    ],
    "totalCount": 1
  }
}
```
