9.1 Overview

Follow-Up Sequences are intended to automate actions after a Campaign Call reaches a particular outcome.

A Sequence can be designed to respond to outcomes such as:

No Answer
Interested
Callback Requested
Not Interested
Completed Call
Manual Enrollment

The intended Sequence workflow is:

Campaign Call reaches a final outcome
System determines the trigger type
Matching active Sequence is selected
Contact is enrolled
First Sequence Step is scheduled
Step becomes due
Call, SMS, Email, Wait, or Webhook action runs
Enrollment advances to the next Step
Enrollment completes, converts, pauses, or stops

The installed application includes database tables, models, API routes, user pages, scheduled jobs, enrollment statuses, action types, Smart Timing, and Analytics for Follow-Up Sequences. However, the current source contains several implementation defects that prevent the feature from operating reliably in production. This chapter explains both the intended user workflow and the verified current behavior.

Important Current Status

9.2 Production Readiness

The current Follow-Up Sequence module should be treated as:

Experimental
Not production-ready
Requiring developer correction

The most significant current issues include:

Sequence Steps are ordered by a database column that does not exist

Automatic enrollment calls model methods and scopes that do not exist

Sequence creation can save records and then return a server error

The Sequence Details page contains several backend and frontend data mismatches

SMS, Email, and Webhook actions are placeholders

Visible action-configuration fields are not connected to submitted data

Step advancement can skip Steps

Successful Step execution can create duplicate execution records

Sequence Analytics uses missing methods and incorrect table names

Agents can see actions that they are not authorized to perform

Do not activate a Sequence for production Contacts until the core defects documented in this chapter have been corrected and tested.

Opening Follow-Up Sequences

9.3 Navigation

From the Sidebar:

Campaigns
→ Sequences

The main page address is:

/sequences

9.4 KYC Requirement

The browser Sequence pages require:

Approved Basic KYC
or
Approved Business KYC

when KYC is enabled.

The protected browser routes include:

GET /sequences
GET /sequences/create
GET /sequences/[Sequence ID]
GET /sequences/[Sequence ID]/edit

9.5 Sequence API Routes

Sequence creation and operational actions use API routes such as:

GET /api/v1/sequences
POST /api/v1/sequences
GET /api/v1/sequences/[Sequence ID]
PUT /api/v1/sequences/[Sequence ID]
DELETE /api/v1/sequences/[Sequence ID]

POST /api/v1/sequences/[Sequence ID]/activate
POST /api/v1/sequences/[Sequence ID]/deactivate

GET /api/v1/sequences/[Sequence ID]/enrollments
GET /api/v1/sequences/[Sequence ID]/analytics

Enrollment operations use:

POST /api/v1/contacts/[Contact ID]/enroll

POST /api/v1/enrollments/[Enrollment ID]/pause
POST /api/v1/enrollments/[Enrollment ID]/resume
POST /api/v1/enrollments/[Enrollment ID]/stop


9.6 API KYC Difference

The browser pages use Basic KYC middleware.

The Sequence API routes are protected through Sanctum authentication and API throttling but do not contain the same KYC middleware.

An authenticated API user can therefore potentially access Sequence write operations even when the equivalent browser page is blocked by KYC.

This is a current access-control inconsistency.

Roles and Sequence Ownership

9.7 Customer Access

A Customer’s browser Sequence page uses:

sequence.user_id = Customer User ID

The Customer is intended to create and manage its own Sequences.

9.8 Agent Browser Access

The browser Sequence controller maps an Agent to:

Agent parent_user_id

An Agent therefore sees Sequences owned by the parent Customer.

9.9 Agent API Access Difference

The Sequence policy allows an Agent to view the parent Customer’s Sequences.

It allows updates and deletion only when:

Signed-in User ID
=
Sequence User ID

Because the Sequence belongs to the parent Customer, the Agent cannot update or delete it through the API.

9.10 Agent Interface Mismatch

The Sequence list and Details pages display:

Edit
Activate or Deactivate
Delete

without reliably hiding these actions from Agents.

An Agent can therefore see an action that the API later rejects.

9.11 Agent Creation Defect

The Agent can open:

/sequences/create

The API creates the Sequence under the signed-in Agent’s own User ID.

After creation, the browser returns to /sequences, which lists the parent Customer’s Sequences rather than the Agent’s own Sequences.

The newly created Agent-owned Sequence can therefore disappear from the Agent’s normal browser list.

9.12 Administrator Scope

The Sequence policy permits an Administrator to view any Sequence through the API.

However, the normal browser Sequence list searches only:

sequence.user_id = Administrator User ID

The browser Details controller also manually checks direct ownership without an Administrator exception.

An Administrator therefore does not receive a normal system-wide Sequence-management interface.

9.13 Administrator Update and Delete Limitation

The Sequence policy’s update and delete methods require direct ownership.

It does not include an Administrator override.

An Administrator can be allowed to view a Customer Sequence through the API but still be unable to update or delete it.

Sequence List

9.14 Sequence Overview Page

The main page is intended to display:

Total Sequences
Total Enrolled
Total Converted
Average Conversion Rate
Sequence cards
Create Sequence
View
Edit
Activate or Deactivate
Delete

9.15 Sequence Card Information

Each card is designed to show:

Sequence Name
Description
Active or Inactive
Trigger Type
AI Timing
Priority
Number of Steps
Total Enrolled
Total Completed
Total Converted
Conversion Rate

9.16 Trigger Badges

Trigger types are displayed as:

No Answer
Interested
Callback Requested
Not Interested
Manual
Completed

9.17 Active Versus Inactive

Active Sequence
=
Eligible for new automatic enrollments

Inactive Sequence
=
Not eligible for new automatic enrollments

Deactivating a Sequence does not pause or stop its existing active Enrollments.

9.18 Sequence Priority

Priority can range from:

1 through 10

A higher number is intended to make the Sequence rank before lower-priority matching Sequences.

Example:

Priority 10
checked before
Priority 5

9.19 Multiple Matching Sequences

The intended engine loops through every matching Sequence.

Priority controls order, but the current design does not stop after selecting one Sequence.

A single Call outcome can therefore enroll a Contact into multiple matching Sequences.

Sequence List Filters

9.20 Backend Filters

The browser controller supports:

Search by Name or Description
Active or Inactive
Trigger Type

9.21 Missing Visible Filters

The current Sequence page does not render these Search and Filter controls.

Users cannot normally apply the supported backend filters through the visible page.

Sequence Pagination

9.22 Page Size

The browser controller returns:

12 Sequences per page

9.23 Missing Pagination Controls

The current Sequence index does not render pagination links.

When more than twelve Sequences exist, later pages are not normally accessible through the visible interface.

9.24 Active Count Limitation

The Total Sequences Card shows an Active count based only on:

Active Sequences in the currently loaded page

It does not count Active Sequences across every page.

Current Sequence List Failure

9.25 Invalid Step-Ordering Column

The Sequence model defines its Step relationship using:

orderBy('step_order')

The actual Sequence Step table contains:

step_number

It does not contain:

step_order

The Sequence list eagerly loads Steps for every Sequence.

Once a Sequence exists, loading the list can therefore produce a database error similar to:

Unknown column 'step_order'

Creating a Sequence

9.26 Opening the Sequence Builder

Select:

Add Sequence

or open:

/sequences/create

The page description states:

Set up automated follow-ups based on call outcomes

9.27 Initial Default Values

A new Sequence begins with approximately:

Trigger Type:
No Answer

Active:
No

AI-Powered Timing:
Yes

Priority:
5

Steps:
One Step

Step Name:
First follow-up

Delay:
24 hours

Action:
Phone Call

9.28 Basic Information

The visible Sequence fields are:

Name
Trigger Type
Description
Priority
AI-Powered Timing
Activate Immediately

9.29 Sequence Name

Name is required and limited to:

255 characters

Example:

No Answer — First and Second Follow-Up

9.30 Description

Use the Description to document:

Business purpose
Intended trigger
Expected audience
Action plan
Stop criteria
Sequence owner

Trigger Types

9.31 No Answer

The intended automatic engine assigns:

no_answer

when a Call Status becomes:

no-answer
busy
failed

The three outcomes are grouped under one Sequence Trigger.

9.32 Interested

The intended engine assigns:

interested

when a Completed Call has:

Positive sentiment
or
Lead Quality = Hot

Warm Lead Quality does not independently trigger Interested in the current Sequence engine.

9.33 Callback Requested

The engine treats a Completed Call as Callback Requested when it finds a DTMF response with:

Digit = 1

This rule is hard-coded.

It does not check whether the Campaign’s DTMF configuration actually defines 1 as Callback Requested.

A Campaign that uses:

Press 1 for Interested

can still trigger a Callback Requested Sequence.

9.34 Not Interested

A Completed Call with:

Sentiment = Negative

can trigger a Not Interested Sequence.

9.35 Completed

A Completed Call that does not match Callback Requested, Interested, or Not Interested falls back to:

completed

9.36 Manual

A Manual Sequence is intended for enrollment through an explicit user or API action.

It is not selected automatically from a Call outcome.

9.37 Canceled Calls

Canceled Calls do not produce an automatic Sequence Trigger in the current engine.

Trigger-Selection Order

9.38 Completed Call Decision Order

For a Completed Call, the current order is:

DTMF digit 1 exists?
↓ Yes
Callback Requested

No
Positive sentiment or Hot Lead?
↓ Yes
Interested

No
Negative sentiment?
↓ Yes
Not Interested

No
Completed

9.39 Sentiment Timing Risk

Call completion can be processed before transcription and AI Sentiment Analysis finish.

When no Sentiment exists at the moment automatic Sequence enrollment runs, the Call can fall into:

Completed

rather than:

Interested
or
Not Interested

The current source does not show a later automatic re-evaluation after Sentiment becomes available.

Advanced Trigger Conditions

9.40 Supported Backend Conditions

The Sequence engine is designed to evaluate conditions based on:

Sentiment
Lead Quality
Call Duration
Call Attempts
Campaign ID

Supported operators include:

equals
not_equals
greater_than
less_than
greater_than_or_equal
less_than_or_equal
in
not_in

9.41 Missing Trigger-Condition Interface

The Sequence Builder does not display controls for configuring these conditions.

They can only be supplied through an API or custom administrative workflow.

9.42 Duration Field Defect

The trigger evaluator reads:

call.duration

The standard Call model uses:

duration_seconds

A duration-based Trigger Condition can therefore receive a null value and fail to work correctly.

Maximum Enrollments

9.43 Capacity Setting

The backend supports:

max_enrollments

to limit the total number of Enrollments permitted in a Sequence.

9.44 Missing Capacity Control

The visible Sequence Builder does not provide a Maximum Enrollments field.

9.45 Missing Capacity Scope

The automatic engine calls a Sequence query scope named:

hasCapacity()

The current Sequence model does not implement that scope.

Automatic Sequence matching fails before capacity can be evaluated.

Smart Timing

9.46 AI-Powered Timing

The Sequence Builder labels the feature:

AI-Powered Timing

When enabled, the engine attempts to identify an optimal time for a Contact before a Call Step.

9.47 Smart Timing Applies Only to Calls

Smart Timing is used only when:

Action Type = Call

It does not optimize:

SMS
Email
Wait
Webhook

9.48 Smart-Time Formula

The intended calculation is:

Contact’s optimal Call time
+
Step delay
=
Scheduled execution time

9.49 Fixed-Delay Fallback

When Smart Timing cannot calculate an optimal Call time, the engine uses:

Current server time
+
Step delay

9.50 Time Zone

The application server currently operates in:

UTC

The Enrollment page formats dates in the browser’s locale but does not clearly display the scheduling Time Zone.

Confirm the actual UTC and local times before production use.

Sequence Steps

9.51 Step Builder

Every Sequence must contain at least:

1 Step

A Step contains:

Step Name
Delay Amount
Delay Unit
Action Type
Action Configuration
Optional Conditions
Optional Stop Conditions

9.52 Delay Units

The supported Delay Units are:

Minutes
Hours
Days

9.53 Zero Delay

A Delay Amount of:

0

represents an immediate Step.

9.54 Step Delay Meaning

A Step’s Delay is intended to occur before that Step executes.

Example:

Step 1:
Wait 24 hours, then Call

Step 2:
Wait 2 days, then Call

The intended timeline is:

Enrollment
↓ 24 hours
Step 1 Call
↓ 2 days
Step 2 Call

9.55 Adding Steps

Select:

Add Step

to append another Step.

New Steps default to:

24 hours
Phone Call

9.56 Reordering Steps

Use the Up and Down controls to change Step order before saving.

The API assigns:

step_number = visible array order + 1

9.57 Removing Steps

A Sequence must retain at least one Step.

The Delete control is disabled when only one Step remains.

Action Types

9.58 Phone Call

The Call action is intended to dispatch another Campaign Call for the Enrollment’s Campaign Contact.

It uses:

Enrollment Campaign
Enrollment Campaign Contact
Campaign Audio File unless overridden
Campaign maximum Call duration unless overridden

9.59 SMS Message

The Builder displays an SMS Message field.

The Sequence engine currently only writes a log entry and returns:

sms_sent

It does not send an SMS through Twilio.

9.60 Email

The Builder displays:

Email Subject
Email Body

The Sequence engine currently only writes a log entry and returns:

email_sent

It does not send an Email.

9.61 Wait

The Wait action returns:

wait_completed

and advances automatically.

It does not create a manual intervention task or hold the Enrollment until a user approves it.

9.62 Webhook

The Builder displays a Webhook URL field.

The Sequence engine validates that a URL exists and then records a log entry.

It does not make an external HTTP request.

It returns:

webhook_triggered

even though no Webhook was actually transmitted.

Action Configuration Defect

9.63 Unconnected Fields

The visible fields for:

SMS Message
Email Subject
Email Body
Webhook URL

do not have form-state bindings.

Typing into those fields does not update the Step’s:

action_config

object.

9.64 Submitted Configuration

A Sequence created through the visible Builder normally submits:

action_config = {}

for each Step.

9.65 Default Placeholder Content

Because the configuration is empty, the engine falls back to content such as:

SMS:
Follow-up message from your telemarketing campaign.

Email Subject:
Follow-up from your call

Email Body:
Thank you for your time.

These defaults are logged but not delivered.

Conditions and Stop Rules

9.66 Step Conditions

The backend supports conditions that compare Enrollment Metadata using operators such as:

equals
not_equals
greater_than
less_than
contains
not_contains

9.67 Step Stop Conditions

A Step can theoretically stop an Enrollment when:

Execution result equals a value
Call connected
Contact responded
Maximum attempts reached
Contact converted

9.68 Sequence Stop Conditions

A Sequence can theoretically stop based on:

Maximum Steps
Contact Responded
Contact Converted
Campaign Completed

9.69 Missing Conditions Interface

The visible Sequence Builder does not expose:

Trigger Conditions
Step Conditions
Step stop_if
Sequence Stop Conditions
Maximum Enrollments

These features require direct API or developer configuration.

9.70 Call-Connected Stop Rule Defect

The Call action returns:

call_queued

The Step stop rule checks for:

completed

to determine whether a Call connected.

The current Call Step therefore cannot satisfy the call_connected stop rule at the time the Step is executed.

Saving a Sequence

9.71 Create Submission

The Builder submits to:

POST /api/v1/sequences

The API:

Creates the Sequence
Creates each Step
Loads the Steps
Returns JSON

9.72 Current Create Failure

After creating the records, the API runs:

sequence.load('steps')

The Steps relationship orders by the nonexistent:

step_order

column.

This can produce a server error after the Sequence and its Steps were already saved.

9.73 Do Not Submit Repeatedly

When creation appears to fail:

Do not repeatedly select Create Sequence

The first request can have already inserted the Sequence before returning the error.

Repeated submissions can create duplicate Sequence records.

9.74 Inertia Response Mismatch

The Builder uses an Inertia form submission to a JSON API endpoint.

Inertia normally expects an Inertia response or redirect, while the API returns plain JSON.

The browser can report an invalid Inertia response even when the API operation otherwise succeeds.

Editing a Sequence

9.75 Opening Edit

From the Sequence card or Details page, select:

Edit

The address is:

/sequences/[Sequence ID]/edit

9.76 Current Edit Load Failure

The browser controller again orders Steps using:

step_order

The Edit page can fail before rendering.

9.77 Step Replacement Behavior

When an update includes Steps, the API:

Deletes every existing Sequence Step
Creates a new set from the submitted array

It does not update existing Step records individually.

9.78 Execution History Loss

The Sequence Step Execution table has a foreign key configured to delete execution records when a Step is deleted.

Editing a Sequence can therefore delete historical Step Execution records and destroy existing Step Analytics.

9.79 Active Enrollment Risk

Existing Enrollments store:

current_step as a Step number

rather than a direct Step ID.

Deleting and recreating Steps while Enrollments are active can cause those Enrollments to follow a changed workflow.

9.80 No Update Transaction

The Sequence update does not wrap deletion and recreation of Steps in a database transaction.

A failure during recreation can leave:

Some old Steps deleted
Only part of the new workflow created
Existing execution history removed

9.81 Safe Edit Rule

Do not edit a Sequence after Contacts have been enrolled.

Create a new Sequence version instead:

Deactivate old Sequence
Allow or stop current Enrollments
Create a new inactive Sequence
Test it
Activate the new version

Activating a Sequence

9.82 Activate

Activating changes:

is_active = true

9.83 Activation Effect

An Active Sequence is intended to accept new automatic Enrollments.

Activation does not validate:

Step-order integrity
Action configuration
Campaign configuration
Phone Number
Provider credentials
Credits
SMS service
Email service
Webhook service

9.84 Activation Does Not Start Existing Contacts

Activating a Sequence does not automatically enroll all existing Contacts.

An Enrollment still requires:

A matching Campaign Call outcome
or
A manual API enrollment

Deactivating a Sequence

9.85 Deactivate

Deactivating changes:

is_active = false

9.86 Existing Enrollments Continue

Deactivation does not change existing Enrollment statuses.

Active Enrollments remain Active and can continue processing.

The confirmation dialog correctly warns:

No new contacts will be enrolled,
but active enrollments will continue.

9.87 Deactivate Versus Pause

Deactivate Sequence
=
Prevent new automatic enrollments

Pause Enrollment
=
Temporarily stop one existing Contact’s progression

Deleting a Sequence

9.88 Active Enrollment Check

The API refuses deletion when the Sequence has one or more Enrollments whose Status is:

active

9.89 Misleading Deletion Message

The error advises the user to deactivate the Sequence.

Deactivating changes only is_active.

It does not change Active Enrollment statuses.

The Sequence remains undeletable after deactivation when Active Enrollments still exist.

9.90 Paused Enrollment Gap

The deletion check counts only Active Enrollments.

A Sequence with Paused Enrollments can pass the deletion check.

9.91 Soft Deletion

Sequences use soft deletion.

Deleting the Sequence records a deleted timestamp rather than hard-deleting the row.

Database cascade rules therefore do not automatically remove the related Enrollments and Steps in the same way as a hard delete.

9.92 No Restore Interface

The Sequence model supports soft deletion, but the policy and normal interface do not permit restoration.

Automatic Enrollment

9.93 Automatic Enrollment Event

Automatic enrollment is requested when a Campaign Call reaches one of these statuses:

completed
no-answer
busy
failed

9.94 Campaign Call Requirement

The Call must have:

Campaign ID
Campaign Contact ID
Campaign Contact relationship

9.95 Master Contact Requirement

The Campaign Contact must also be linked to a master Contact.

When the Campaign Contact has no contact_id, the engine logs that no Contact exists and exits.

9.96 Connection to Chapter 7

Campaign Contacts created through the current List-copy and CSV workflows do not reliably preserve a master Contact relationship.

Those Campaign Contacts may therefore be unable to enter automatic Follow-Up Sequences.

9.97 Intended Sequence Selection

The engine is intended to choose Sequences that are:

Active
Owned by the Campaign Customer
Matching the Trigger Type
Within Enrollment capacity
Ordered by Priority
Not already used for that Campaign Contact
Passing Trigger Conditions

Core Automatic Enrollment Failure

9.98 Missing Trigger Scope

The engine calls:

forTriggerType()

The Sequence model implements:

byTrigger()

The required query scope does not exist under the name used by the engine.

9.99 Missing Capacity Scope

The engine calls:

hasCapacity()

The Sequence model does not define that scope.

9.100 Missing Enrollment Method

The engine calls:

sequence.enroll()

The Sequence model does not define an enroll() method.

9.101 Automatic Enrollment Result

Because these core model methods are absent, automatic Sequence enrollment cannot complete successfully under the reviewed source.

The engine catches the exception and writes it to the application log, so the Call itself can complete while no Enrollment is created.

Manual Enrollment

9.102 Manual Enrollment API

The manual endpoint is:

POST /api/v1/contacts/[Contact ID]/enroll

It requires:

sequence_id
campaign_contact_id
Optional metadata

9.103 Standalone Contact Limitation

Although the route is attached to a master Contact, it still requires a Campaign Contact.

A standalone Contact that has never participated in a Campaign cannot be enrolled through this endpoint without first obtaining a Campaign Contact record.

9.104 No Visible Enrollment Button

The current Contact and Sequence pages do not provide a normal visible manual Enrollment form.

Manual Enrollment is currently an API-oriented function.

9.105 Relationship Validation Gap

The endpoint retrieves the submitted Campaign Contact but does not clearly verify that:

Campaign Contact belongs to the Contact in the URL

Campaign Contact belongs to the same Customer

Campaign Contact belongs to the intended Campaign

Sequence and Campaign Contact share the same owner

This is a current data-integrity and multitenant security concern.

9.106 Duplicate Enrollment Protection

The database prevents the same combination of:

Sequence ID
+
Campaign Contact ID

from being enrolled more than once.

Enrollment Statuses

9.107 Active

active

means the Enrollment is eligible for scheduled Step execution.

9.108 Paused

paused

temporarily prevents the Enrollment from being selected by the due-Step processor.

Its next scheduled time remains stored.

9.109 Completed

completed

means the workflow finished without being explicitly marked as Converted.

9.110 Converted

converted

represents a successful business outcome.

9.111 Stopped

stopped

means the Enrollment was manually or conditionally ended before ordinary completion.

A Stop Reason can be stored.

Conversion Status Limitation

9.112 Conversion Method

The Sequence engine includes a method that can mark an Enrollment Converted and store an optional Conversion Reason.

9.113 Method Is Not Called

The reviewed source contains no other call to that conversion method.

The ordinary workflow does not automatically mark Enrollments as Converted.

Converted Analytics can therefore remain zero unless another API, database process, or future integration sets the Status.

Pausing an Enrollment

9.114 Pause API

The API route is:

POST /api/v1/enrollments/[Enrollment ID]/pause

It changes:

status = paused

9.115 Scheduled Time

Pause does not clear:

next_step_at

The scheduled time remains recorded.

Resuming an Enrollment

9.116 Resume API

The API route is:

POST /api/v1/enrollments/[Enrollment ID]/resume

9.117 Overdue Resume

When the stored next_step_at is already in the past, Resume changes it to:

Current server time

The Step can become due immediately.

9.118 Resume Does Not Restart

Resume does not reset:

Current Step
Steps Completed
Execution History
Enrollment date

It continues from the stored position.

Stopping an Enrollment

9.119 Stop API

The route is:

POST /api/v1/enrollments/[Enrollment ID]/stop

9.120 Required Reason

The request requires:

reason

9.121 Stop Result

Stopping changes:

status = stopped
next_step_at = null
stopped_reason = submitted reason

9.122 Missing Visible Controls

The current Sequence Details page does not display normal buttons for:

Pause Enrollment
Resume Enrollment
Stop Enrollment

These actions exist only through API routes in the reviewed interface.

Sequence Processing

9.123 Processing Schedule

Laravel schedules:

ProcessSequenceStepsJob

to run:

Every minute

The scheduled job uses withoutOverlapping.

9.124 Server Cron Requirement

Laravel’s scheduler must be invoked by the server cron system.

Without an active scheduler:

Enrollments can be created
next_step_at can be stored
but
Steps will not execute

9.125 Due Enrollment Query

The processor selects Enrollments where:

status = active
and
next_step_at <= current server time

9.126 Batch Size

The job processes up to:

100 due Enrollments

per batch.

9.127 Additional Batch

When one hundred Enrollments are found, the job dispatches another processor approximately ten seconds later.

9.128 Current Queue Driver

The production runtime currently uses:

Queue driver = sync

Jobs execute in the same process rather than through independent background workers.

9.129 Sequence Processing Effect

With the synchronous driver:

Due Enrollments are processed sequentially
Long actions can delay the scheduler
Delayed redispatch may not behave like a persistent queue
Large batches can keep the scheduler process occupied

Individual Step Execution

9.130 Execution Job Checks

Before executing, the job confirms:

Enrollment still exists
Status is Active
Step is due
Current Step can be found

9.131 Job Retry Settings

The individual job declares:

Maximum attempts: 3
Backoff: 60 seconds
Timeout: 120 seconds

9.132 Retry Defect

The Sequence engine catches Step action exceptions and returns:

false

instead of rethrowing them.

Because the queued job does not receive an exception, its configured retry mechanism is not normally triggered for these action failures.

9.133 Repeated Due Failure

A failed Step can leave the Enrollment:

Active
With a next_step_at in the past

The scheduler can select it again during the next minute, causing repeated failures.

Call Step Processing

9.134 Call Dispatch

A Call Step dispatches:

MakeCampaignCallJob

using the Enrollment’s Campaign Contact.

9.135 Campaign Dependency

The Enrollment must have:

Campaign
Campaign Contact
Usable Campaign calling configuration
Phone Number
Provider credentials
Credits

A Manual Sequence Enrollment still depends on an existing Campaign Contact and Campaign.

9.136 Call Result Tracking Limitation

The Sequence engine marks the Step successful when the Call job is queued.

It does not wait for the resulting telephone Call to:

Ring
Connect
Complete
Fail
Receive a disposition

9.137 Execution Call ID

The Step Execution table contains a call_id field.

The Call action does not populate that field in the reviewed code.

The Sequence Execution cannot be directly traced to the resulting Call through this relationship.

9.138 Meaning of Call Step Success

Under the current design:

Successful Call Step
=
Call job was dispatched without an immediate exception

It does not mean:

Contact answered
Conversation completed
Contact converted

Wait Step Behavior

9.139 Wait Before Action

Every Step already has a Delay.

A Wait Step then completes without another external action.

9.140 Double-Delay Risk

Example:

Step 1:
Wait action with a 24-hour delay

Step 2:
Call action with a 24-hour delay

The intended total delay before the Call can become approximately:

24 hours before Wait Step
+
24 hours before Call Step
=
48 hours

A Wait Step is not a manual approval pause.

Current Step-Advancement Defects

9.141 Enrollment Default Step

The database initializes:

current_step = 1

The method for finding the next Step searches for:

step_number > current_step

Unless enrollment creation explicitly overrides current_step to zero, the first Step can be skipped.

The missing Sequence enroll() method prevents confirmation of a proper override.

9.142 Double Advancement

After a Step executes, the engine:

Calls moveToNextStep()
Then calls scheduleNextStep()

moveToNextStep() already changes current_step to the next Step.

scheduleNextStep() then searches for another Step after that value.

This can skip every second Step.

9.143 Two-Step Example

Intended:

Step 1
Step 2
Complete

Possible current behavior:

Execute Step 1
moveToNextStep selects Step 2
scheduleNextStep searches after Step 2
No Step remains
Enrollment completes

Step 2 never executes.

9.144 Condition-Skipping Defect

When a Step fails its condition, scheduleNextStep() calls:

moveToNextStep(0)

That method can set the condition-failing Step as the current due Step.

The execution job does not recheck the Step condition.

A Step that was supposed to be skipped can later execute anyway.

Duplicate Execution Records

9.145 First Execution Record

The engine creates one Step Execution with:

status = executing

9.146 Second Execution Record

After success, it calls:

enrollment.recordExecution()

which creates a second Step Execution record with:

status = completed

9.147 First Record Updated

The original Executing record is also changed to Completed.

One successful Step can therefore produce two completed execution records.

9.148 Analytics Effect

Step statistics can report:

Executed: 2
Successful: 2

for one actual Step run.

Execution counts and Success Rates should not be treated as accurate until this duplicate-record path is corrected.

Sequence Details

9.149 Intended Details Page

The address is:

/sequences/[Sequence ID]

The intended page contains:

Sequence Name
Description
Active or Inactive
AI Timing
Edit
Activate or Deactivate
Statistics
Steps tab
Enrollments tab
Analytics tab

Steps Tab

9.150 Intended Step Information

Each Step is intended to show:

Step Number
Step Name
Delay
Action Type
Executed count
Successful count
Success Rate
Progress bar

Enrollments Tab

9.151 Intended Enrollment Information

Each Enrollment is intended to display:

Contact Name
Phone Number
Enrollment Status
Current Step
Steps Completed
Enrolled date
Next Step date
Progress

9.152 Next Step Time Limitation

The page formats next_step_at using a date-only display.

It does not show the exact scheduled hour or Time Zone.

9.153 No Enrollment Actions

The Enrollment Cards do not provide:

Pause
Resume
Stop
View execution history
View error
Mark converted

Analytics Tab

9.154 Intended Analytics

The Sequence Analytics tab is intended to show:

Total Enrolled
Active
Completed
Converted
Stopped
Success Rate
Conversion Rate
Average Completion Time
Step Performance

Current Sequence Details Failures

9.155 Invalid Step Column

The Details controller orders Steps by:

step_order

which does not exist.

9.156 Missing Current Step Relationship

The controller attempts to eager-load:

enrollments.currentStep

The Sequence Enrollment model does not define a currentStep() relationship.

It provides a method named:

getCurrentStep()

which cannot be eager-loaded as a relationship.

9.157 Incorrect Execution Table

The controller queries:

sequence_execution_logs

The actual table is:

sequence_step_executions

9.158 Incorrect Step Name

The controller builds Step performance using:

step.name

The actual field is:

step_name

9.159 Analytics Property Mismatch

The controller sends Analytics in a nested structure containing:

enrollments
step_analytics
status_breakdown
step_performance

The frontend expects top-level properties such as:

analytics.total_enrolled
analytics.active
analytics.success_rate
analytics.avg_completion_time
analytics.steps_performance

The expected frontend properties are not provided under those names.

9.160 Details Page Result

The Sequence Details page can fail through:

Database error
Undefined relationship
Undefined Analytics property
Frontend toFixed error

The Steps, Enrollments, and Analytics tabs are not dependable in the current build.

Sequence Statistics

9.161 Stored Sequence Counters

Each Sequence stores:

total_enrolled
total_completed
total_converted
conversion_rate

9.162 Missing Statistics Method

Enrollment completion calls:

sequence.updateStatistics()

The Sequence model does not define that method.

The stored Sequence counters are not reliably recalculated.

9.163 Sequence Cards Can Remain Zero

The Sequence list displays the stored counters rather than the actual relationship counts.

Cards can continue showing:

Enrolled: 0
Completed: 0
Converted: 0
Conversion Rate: 0%

even when Enrollment rows exist.

9.164 Total Enrolled Overview

The top-level Total Enrolled Card uses a direct database count of Sequence Enrollments.

It can therefore disagree with the individual Sequence cards.

Average Conversion Rate

9.165 Current Formula

The Sequence list calculates:

Total Converted Enrollments
÷
Total Completed Enrollments
×
100

9.166 Mutually Exclusive Statuses

An Enrollment cannot normally be both:

completed
and
converted

Converted and Completed are separate Statuses.

9.167 Possible Invalid Percentage

Example:

Converted:
10

Completed:
2

Displayed Average Conversion Rate:
10 ÷ 2 × 100 = 500%

The denominator should likely include both completed and converted terminal outcomes.

API Analytics Failure

9.168 Missing Success-Rate Method

The API Sequence Analytics service calls:

sequence.getSuccessRate()

The Sequence model does not define that method.

9.169 Missing Completion-Time Method

The service also calls:

sequence.getAverageCompletionTime()

The Sequence model does not define that method.

9.170 API Result

The API endpoint:

GET /api/v1/sequences/[Sequence ID]/analytics

can fail before returning Analytics.

Step Success Rate

9.171 Intended Formula

Completed Step Execution records
÷
All Step Execution records
×
100

9.172 Placeholder Success

SMS, Email, and Webhook placeholders return successful-looking result strings.

They can be counted as successful even though nothing was delivered externally.

9.173 Call Success

A Call Step can be counted as successful when its Call job is queued, regardless of the final telephone outcome.

9.174 Analytics Meaning

Current Step Success Rate is closer to:

Action handler returned without an immediate error

than:

Customer successfully received and completed the action

Sequence Processing and Credits

9.175 Call Costs

A Sequence Call uses the Campaign Call job.

The Call can therefore create:

Provider charges
AIUNIFY Credit deductions
Recording charges
Transcription charges
AI service charges

depending on the Campaign configuration.

9.176 No Separate Sequence Budget

The Sequence Builder does not provide:

Sequence budget
Daily Credit limit
Maximum Call cost
Per-Step spending limit

9.177 Capacity Does Not Equal Budget

max_enrollments is intended to limit Enrollment quantity.

It does not represent a financial limit.

Safe Sequence Design

9.178 Recommended Structure

After the module is repaired, begin with:

Inactive Sequence
One internal Campaign Contact
One Call Step
Short test Delay
No SMS, Email, or Webhook placeholders
Verify one execution
Verify Call History and Credits

9.179 Avoid Complex Initial Workflows

Do not begin with:

Multiple Sequences sharing the same Trigger
Many Steps
Long delays
High-volume Contacts
SMS
Email
Webhook
Advanced conditions

9.180 Test Each Trigger Separately

Create separate controlled tests for:

No Answer
Busy
Failed
Completed
Positive sentiment
Negative sentiment
DTMF digit 1

Troubleshooting the Sequence List

9.181 Page Works Until First Sequence Is Created

This is consistent with the invalid step_order column.

The empty list may load because there are no Step relationships to query.

After the first Sequence is stored, eager-loading Steps can cause the database error.

9.182 Sequence Creation Shows an Error but Record Exists

The Sequence and Steps can be inserted before the invalid Step relationship is loaded.

Check the database before submitting again.

9.183 Active Count Is Too Low

The page counts Active Sequences only within the currently loaded twelve records.

9.184 Later Sequences Are Missing

The backend paginates, but the page does not display pagination controls.

9.185 Agent Cannot Edit

Agents can view the parent Customer’s Sequence, but API update policy requires direct ownership.

Troubleshooting Automatic Enrollment

9.186 Call Completed but No Enrollment Appeared

Possible causes include:

Automatic engine encountered missing model scopes

Sequence model has no enroll method

Campaign Contact has no master Contact

Sequence is Inactive

Trigger Type did not match

Call was Canceled

Sentiment was not ready

Campaign Contact was already enrolled

9.187 Interested Call Entered Completed Sequence

Sentiment may not have existed when the Call completion handler requested Sequence enrollment.

9.188 DTMF Press 1 Triggered Callback

The Sequence engine hard-codes DTMF digit 1 as Callback Requested.

9.189 CSV Campaign Contacts Do Not Enroll

CSV Campaign Contacts are not reliably linked to master Contacts.

The Sequence engine requires that relationship.

Troubleshooting Steps

9.190 First Step Never Runs

The Enrollment can begin with current_step = 1, while the engine searches for a Step greater than the current Step.

9.191 Every Second Step Is Skipped

The engine moves to the next Step and then schedules another next Step, causing double advancement.

9.192 Step Condition Was Ignored

The condition-skipping path can set the skipped Step as current and due.

The execution job does not re-evaluate the condition.

9.193 SMS Was Marked Successful but Not Received

The SMS action is a placeholder and does not send a message.

9.194 Email Was Marked Successful but Not Received

The Email action is a placeholder and does not send Email.

This is separate from the platform’s current log mail driver.

9.195 Webhook Was Marked Triggered but No Request Arrived

The Webhook action logs information but does not make an HTTP request.

9.196 Call Step Shows Success but Contact Did Not Answer

The Step is marked successful when the Call job is queued.

Review Call History for the telephone result.

Troubleshooting Enrollments

9.197 Pause or Resume Buttons Are Missing

The actions exist only through API routes.

The current Details page does not expose them.

9.198 Enrollment Is Repeatedly Failing

The action engine catches errors and returns false without engaging the job retry system.

The overdue Enrollment can be selected again every minute.

Stop or pause it through an approved API process.

9.199 Converted Count Remains Zero

The method that marks an Enrollment Converted is not called by another reviewed workflow.

9.200 Enrollment Cannot Be Deleted with Sequence

The deletion check blocks a Sequence with Active Enrollments.

Deactivating the Sequence does not change their status.

Troubleshooting Analytics

9.201 Details Page Returns a Server Error

Likely causes include:

Invalid step_order column
Missing currentStep relationship
Incorrect execution-log table

9.202 Analytics Tab Is Blank or Crashes

The controller and frontend use different Analytics property names.

9.203 Step Executed Count Is Twice Expected

One successful Step can create two execution records.

9.204 Conversion Rate Exceeds 100%

The current overview divides Converted by Completed even though those are separate terminal statuses.

9.205 Sequence Cards Show Zero but Total Enrolled Is Higher

The overview counts database Enrollments directly.

The individual cards rely on stored Sequence counters that are not being updated correctly.

Developer Corrections Required

9.206 Step Ordering

Replace:

step_order

with:

step_number

throughout the Sequence model and browser controllers.

9.207 Sequence Model Methods

Implement or correct:

scopeForTriggerType
scopeHasCapacity
enroll
updateStatistics
getSuccessRate
getAverageCompletionTime

Alternatively, update the engine to use correctly named existing methods where appropriate.

9.208 Enrollment Initialization

Initialize a new Enrollment so the first Step is scheduled exactly once.

A consistent design would normally start before Step 1 rather than marking Step 1 current before it has executed.

9.209 Step Advancement

Use one operation to:

Complete current Step
Increment steps_completed
Identify next Step
Schedule next Step

Do not call two separate methods that both advance the Step position.

9.210 Execution Records

Create one Execution record per Step attempt.

Update that same record from:

executing
completed or failed

9.211 Action Implementations

Connect:

SMS action to actual SMS service

Email action to actual mail provider

Webhook action to an authenticated HTTP client

Call action to the resulting Call record

9.212 Action Form Binding

Connect visible SMS, Email, and Webhook fields to:

steps[index].action_config

9.213 Sequence Details

Correct:

currentStep eager loading
Execution table name
Step Name property
Analytics response shape
Enrollment data binding

9.214 Edit Safety

Do not delete and recreate all Steps for a Sequence with history.

Use Step versioning or block structural editing once Enrollments exist.

9.215 Role Controls

Hide or disable actions that the signed-in role cannot perform.

Align browser ownership, API ownership, Administrator access, and Agent access.

9.216 Manual Enrollment Validation

Verify that:

Contact
Campaign Contact
Campaign
Sequence
Customer owner

all belong to the same authorized workspace.

Pre-Activation Checklist

9.217 Application Integrity

Confirm:

Sequence list loads with existing records
Create returns success
Edit returns success
Details page loads
Steps are ordered correctly
Analytics page loads

9.218 Enrollment Integrity

Confirm:

First Step is not skipped
Second Step is not skipped
One execution creates one log
Pause works
Resume works
Stop works
Converted status can be set

9.219 Action Integrity

Confirm:

Call creates one traceable Call record
SMS is delivered
Email is delivered
Webhook reaches its destination
Wait behaves as intended

9.220 Trigger Integrity

Confirm:

No Answer mapping
Busy mapping
Failed mapping
Callback DTMF mapping
Interested mapping
Not Interested mapping
Completed fallback

9.221 Security Integrity

Confirm:

Customer sees only Customer Sequences
Agent sees only permitted parent Sequences
Agent cannot modify parent Sequences
Administrator access follows policy
Manual Enrollment validates ownership
API respects KYC and permissions

Safe Operational Checklist

9.222 Before Creating

Confirm:

Business purpose approved
Trigger clearly defined
Campaign Contact linked to master Contact
Desired action supported
Delay documented
Stop criteria documented

9.223 Before Activation

Confirm:

Core Sequence defects repaired
One internal Enrollment completed correctly
Correct action content
Correct Time Zone
Correct Campaign
Correct Phone Number
Credits sufficient
Scheduler active
Queue configuration tested

9.224 During Testing

Monitor:

Application Logs
Sequence Enrollment row
Current Step
Next Step At
Execution records
Call History
Credit history
External SMS, Email, or Webhook destination

9.225 After Testing

Confirm:

Every Step executed once
No Step was skipped
No duplicate execution logs
Correct terminal Status
Correct Conversion result
Correct Analytics
Correct costs

Current-Build Limitations

9.226 Confirmed Limitations

The reviewed Follow-Up Sequence implementation currently includes these important limitations:

Sequence Steps are ordered by nonexistent step_order
instead of step_number

The Sequence list can fail after the first Sequence exists

Create can save records and then return an error

Inertia forms submit to JSON API endpoints

Browser filters exist in the controller
but are not shown in the interface

Only twelve Sequences are loaded
and pagination controls are missing

Active count reflects only the current page

Agents see parent Sequences but cannot update them

Agent-created Sequences can disappear from
the normal Agent browser list

Administrators do not receive a normal
system-wide Sequence interface

API Sequence actions do not use the browser’s
Basic KYC middleware

Automatic enrollment calls missing
forTriggerType and hasCapacity scopes

The Sequence model has no enroll method

Campaign Contacts without master Contact links
cannot enter automatic Sequences

Call-duration Trigger Conditions use the wrong field

Sentiment may not be available when the Trigger is selected

DTMF digit 1 is hard-coded as Callback Requested

The Builder does not expose Trigger Conditions,
Stop Conditions, Step Conditions, or capacity

SMS, Email, and Webhook actions are placeholders

Visible SMS, Email, and Webhook fields
do not update action_config

Call Steps are marked successful when queued,
not when the Call succeeds

Sequence Execution does not store the resulting Call ID

First-Step initialization can skip Step 1

Step advancement can skip later Steps

Condition-skipping logic can still execute the Step

One successful Step can create two execution records

Failed actions can remain overdue and repeat every minute

Current synchronous queue reduces background processing

Editing deletes and recreates all Steps

Editing can delete Step Execution history

Editing can disrupt active Enrollments

Sequence deletion advice is misleading

Paused Enrollments can remain under a deleted Sequence

No Sequence restore interface exists

No visible manual Enrollment form exists

No visible Pause, Resume, Stop, or Convert controls exist

Manual Enrollment does not fully validate
Contact and Campaign Contact relationships

The Sequence Details controller uses
a nonexistent currentStep relationship

The Details controller queries the wrong
execution-log table

The Details controller uses name instead of step_name

The Details controller and frontend expect
different Analytics structures

Sequence updateStatistics is missing

API getSuccessRate and getAverageCompletionTime
methods are missing

Stored Sequence counters can remain zero

Average Conversion Rate can exceed 100%

Converted status is not assigned by another
reviewed automatic workflow

Next Step display omits the exact time and Time Zone

Chapter Completion

At the end of this chapter, the user should understand that a Follow-Up Sequence is intended to connect a Campaign Call outcome to a timed set of automated Steps.

The user should understand the six Trigger Types:

No Answer
Interested
Callback Requested
Not Interested
Completed
Manual

The user should know that an Active Sequence accepts new matching Enrollments while deactivation prevents new automatic Enrollments without stopping existing ones.

The user should understand the five Enrollment Statuses:

Active
Paused
Completed
Stopped
Converted

and the five available Step Action Types:

Call
SMS
Email
Wait
Webhook

The user should recognize that only the Call and Wait handlers contain meaningful processing logic in the reviewed build. SMS, Email, and Webhook actions currently record placeholder success results without transmitting anything.

The user should understand that Sequence Steps are intended to run through Laravel’s scheduler every minute and that the current synchronous Queue driver processes them sequentially.

The user should also recognize that the current Sequence engine is not operationally dependable because it references missing model methods, uses an invalid Step-ordering column, can skip Steps, can duplicate execution records, and cannot reliably display Sequence Details or Analytics.

Most importantly, the current safe rule is:

Do not activate Follow-Up Sequences
for production Contacts
until the Sequence engine,
action handlers,
Step progression,
ownership controls,
and Analytics have been corrected
and verified with internal test Contacts.


Write Your Comment