Freshdesk Get Tickets by Requester ID with Filters
This function retrieves Freshdesk tickets for a specific requester ID with comprehensive filtering capabilities. The function supports filtering by status, priority, tags, dates, and custom fields, with both inclusion and exclusion options.
Action Inputs
Required Parameters
Name | Type | Description |
---|---|---|
domain | Credentials | The Freshdesk subdomain (e.g., if URL is 'company.freshdesk.com', enter 'company') |
key | Credentials | Your Freshdesk API key |
requester_id | String | The Freshdesk requester ID to fetch tickets for |
Optional Parameters
Name | Type | Description |
---|---|---|
filters | Object | Object containing filter criteria (see Filters section) |
return_fields | Array | List of ticket fields to include in the response |
Action Outputs
Name | Type | Description |
---|---|---|
success | Boolean | Whether the request was successful |
total | Number | Total number of tickets found |
contact | Object | Contact details for the requester |
tickets | Array | List of tickets matching the filter criteria |
Filter Object Properties
The filter object supports the following properties:
Status Filters
status
: Comma-separated list of statuses to includeexclude_status
: Comma-separated list of statuses to exclude
Available status values:
- Open (2)
- Pending (3)
- Resolved (4)
- Closed (5)
- Waiting on Customer (6)
- Waiting on Third Party (7)
Priority Filters
priority
: Comma-separated list of priorities to includeexclude_priority
: Comma-separated list of priorities to exclude
Available priority values:
- Low (1)
- Medium (2)
- High (3)
- Urgent (4)
Tag Filters
tags
: Comma-separated list of tags to includeexclude_tags
: Comma-separated list of tags to exclude
Date Filters
created_after
: Include tickets created after this date (YYYY-MM-DD)created_before
: Include tickets created before this date (YYYY-MM-DD)updated_after
: Include tickets updated after this date (YYYY-MM-DD)updated_before
: Include tickets updated before this date (YYYY-MM-DD)
Text Search Filters
subject_contains
: Comma-separated list of strings to search for in subjectdescription_contains
: Comma-separated list of strings to search for in description
Custom Field Filters
custom_fields
: Object of custom fields to filter byexclude_custom_fields
: Object of custom fields to exclude
ID Exclusion
exclude_id
: Single ticket ID or comma-separated list of ticket IDs to exclude
Usage Examples
Basic Usage (No Filters)
const event = {
domain: "company",
key: "your_api_key",
requester_id: "3043074593490"
};
Comprehensive Filter Example
const event = {
domain: "company",
key: "your_api_key",
requester_id: "3043074593490",
filters: {
status: "Open,Pending",
exclude_status: "Closed",
priority: "High,Urgent",
exclude_priority: "Low",
tags: "eBay,UK",
exclude_tags: "Spam,Duplicate",
created_after: "2024-01-01",
created_before: "2024-03-31",
subject_contains: "Order,Payment",
description_contains: "refund,tracking",
custom_fields: {
cf_channel: "UK",
cf_product_type: "Books"
},
exclude_custom_fields: {
cf_automated_response: true
},
exclude_id: "12500376,12500377"
},
return_fields: [
"id",
"subject",
"status",
"priority",
"created_at",
"updated_at",
"tags",
"custom_fields",
"description_text"
]
};
Default Return Fields
If no return_fields are specified, the function returns these fields by default:
- id
- subject
- status
- priority
- created_at
- updated_at
- tags
- custom_fields
- description_text
Notes
- All text searches (subject_contains, description_contains) are case-insensitive
- Date filters should be in YYYY-MM-DD format
- Custom field filtering requires exact matches
- Tag filtering is case-insensitive
- When both inclusion and exclusion filters are provided for the same field type, exclusions are processed first
Updated 1 day ago