Schedules
Schedules in Luella represent the date and weekday boundaries of when you want your outreach messages sent. Every campaign in Luella can be associated to one or more schedules. As long as one schedule’s boundaries hold true for the sending day, it will perform its sending activities.
The schedule model
This model defines the date and day-of-week rules in which a campaign is allowed to send messages.
Properties
- Name
scheduleId
- Type
- string
- Description
Unique identifier for the schedule.
- Name
name
- Type
- string
- Description
Human-readable name of the schedule.
- Name
fromDate
- Type
- string
- Description
Optional start date for the schedule (YYYY-MM-DD).
- Name
toDate
- Type
- string
- Description
Optional end date for the schedule (YYYY-MM-DD).
- Name
days
- Type
- string[]
- Description
Days of the week this schedule applies to (e.g., ['Monday', 'Wednesday']).
- Name
createdAt
- Type
- timestamp (ISO string)
- Description
Timestamp of creation.
- Name
lastUpdatedAt
- Type
- timestamp (ISO string)
- Description
Timestamp of last modification.
List all schedules
Fetch a list of schedules optionally filtered by resource (e.g. campaign). Use this to manage or assign schedules across campaigns.
Required attributes
- Name
userId
- Type
- string
- Description
ID of the user making the request.
- Name
workspaceId
- Type
- string
- Description
Workspace containing the schedules.
Optional attributes
- Name
resourceId
- Type
- string
- Description
Filter by resource (e.g. campaign ID).
- Name
sortOrder
- Type
- string
- Description
Sort order (Ascending or Descending).
- Name
maxItems
- Type
- number
- Description
Limit on number of results returned.
- Name
nextToken
- Type
- string
- Description
Token for pagination.
Request
{
"userId": "user_123",
"workspaceId": "workspace_456",
"resourceId": "camp_001",
"sortOrder": "Ascending",
"maxItems": 10
}
Response
{
"schedules": [
{
"scheduleId": "sched_001",
"scheduleName": "Weekday Morning Schedule",
"associationId": "assoc_001"
}
],
"nextToken": null
}
Create a new schedule
Create a new sending schedule by specifying a name, date range, and applicable weekdays.
Required attributes
- Name
userId
- Type
- string
- Description
ID of the user creating the schedule.
- Name
workspaceId
- Type
- string
- Description
Workspace to which the schedule belongs.
- Name
name
- Type
- string
- Description
Name of the schedule.
Optional attributes
- Name
fromDate
- Type
- string
- Description
Start date for the schedule (YYYY-MM-DD).
- Name
toDate
- Type
- string
- Description
End date for the schedule (YYYY-MM-DD).
- Name
days
- Type
- string[]
- Description
List of weekdays the schedule applies to (e.g., ['Monday', 'Wednesday']).
Request
{
"userId": "user_123",
"workspaceId": "workspace_456",
"name": "Weekday Mornings",
"fromDate": "2024-04-01",
"toDate": "2024-06-30",
"days": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]
}
Response
{
"scheduleId": "sched_001"
}
Get a schedule
Retrieve full details of a schedule including its applicable date range and days of the week.
Required attributes
- Name
userId
- Type
- string
- Description
ID of the user making the request.
- Name
workspaceId
- Type
- string
- Description
Workspace that owns the schedule.
- Name
scheduleId
- Type
- string
- Description
ID of the schedule to retrieve.
Request
{
"userId": "user_123",
"workspaceId": "workspace_456",
"scheduleId": "sched_001"
}
Response
{
"scheduleId": "sched_001",
"name": "Weekday Mornings",
"fromDate": "2024-04-01",
"toDate": "2024-06-30",
"days": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
"createdAt": "2024-04-01T10:00:00.000Z",
"lastUpdatedAt": "2024-04-02T08:00:00.000Z"
}
Associate a schedule
Link a schedule to a specific resource such as a campaign. As long as one linked schedule is valid on a given day, sending will proceed.
Required attributes
- Name
userId
- Type
- string
- Description
ID of the user creating the association.
- Name
workspaceId
- Type
- string
- Description
Workspace that owns the schedule and campaign.
- Name
scheduleId
- Type
- string
- Description
ID of the schedule being associated.
- Name
resourceId
- Type
- string
- Description
ID of the resource (e.g. campaign ID).
- Name
resourceType
- Type
- string
- Description
Type of resource to associate (e.g. "Campaign").
Request
{
"userId": "user_123",
"workspaceId": "workspace_456",
"scheduleId": "sched_001",
"resourceId": "camp_001",
"resourceType": "Campaign"
}
Response
{
"associationId": "assoc_001"
}
Disassociate a schedule
Remove an existing association between a schedule and a campaign.
Required attributes
- Name
userId
- Type
- string
- Description
ID of the user removing the association.
- Name
workspaceId
- Type
- string
- Description
Workspace that owns the association.
- Name
associationId
- Type
- string
- Description
ID of the association to remove.
Request
{
"userId": "user_123",
"workspaceId": "workspace_456",
"associationId": "assoc_001"
}
Response
{}
Update a schedule
Update an existing schedule’s name, date range, or applicable weekdays.
Note: If you want to retain an existing value for a field, you must pass that value again in the request. Any field omitted will be overwritten with null
.
Required attributes
- Name
userId
- Type
- string
- Description
ID of the user performing the update.
- Name
workspaceId
- Type
- string
- Description
Workspace the schedule belongs to.
- Name
scheduleId
- Type
- string
- Description
ID of the schedule to update.
- Name
name
- Type
- string
- Description
Updated name of the schedule.
Optional attributes
- Name
fromDate
- Type
- string
- Description
Updated start date (YYYY-MM-DD).
- Name
toDate
- Type
- string
- Description
Updated end date (YYYY-MM-DD).
- Name
days
- Type
- string[]
- Description
Updated list of weekdays (e.g., ['Monday', 'Tuesday']).
Request
{
"userId": "user_123",
"workspaceId": "workspace_456",
"scheduleId": "sched_001",
"name": "Updated Weekday Block",
"fromDate": "2024-04-01",
"toDate": "2024-06-30",
"days": ["Monday", "Tuesday", "Wednesday"]
}
Response
{
"scheduleId": "sched_001"
}
Delete a schedule
Permanently delete a schedule from your workspace.
Required attributes
- Name
userId
- Type
- string
- Description
ID of the user requesting deletion.
- Name
workspaceId
- Type
- string
- Description
Workspace the schedule belongs to.
- Name
scheduleId
- Type
- string
- Description
ID of the schedule to delete.
Request
{
"userId": "user_123",
"workspaceId": "workspace_456",
"scheduleId": "sched_001"
}
Response
{}