php js css php js css

Changes

Changes to Script: Find automation progress steps with activation label

235799
Today 4:53am
McNaught, Scott
Modified script
235800
Today 4:53am
McNaught, Scott
Modified script
Can't Undo: This is the current version
Last Run:
Id:
2020B4Ku5ANWRY4z
2020B4Ku5ANWRY4z
Title:
Find automation progress steps with activation label
Find automation progress steps with activation label
Code:
<?php
// Remove the automation progress step title
// "Please contact support@oncord.com to activate your account" (title ID 3)

$strTitleId = 3;

// Confirm it exists and matches exactly
$arrTitle = \Components\Marketing\Automation\Progress\Steps\Titles::get($strTitleId);
if (!$arrTitle)
{
echo "Title ID {$strTitleId} not found — nothing to do.\n";
return;
}
echo "Found title #{$strTitleId}: \"{$arrTitle['automation_progress_step_title_name']}\"\n";

// Show which progress steps reference it, then clear the reference
$arrSteps = \Components\Marketing\Automation\Progress\Steps::getAll([
'filter' => [['automation_progress_step_result_title_id', '=', $strTitleId]],
'limit' => 500
]);
echo count($arrSteps) . " progress step(s) reference this title; clearing their result_title_id...\n";
foreach ($arrSteps as $arrStep)
{
$arrStep['automation_progress_step_result_title_id'] = null;
\Components\Marketing\Automation\Progress\Steps::save($arrStep);
echo " - Cleared reference on progress step (automation_progress_id={$arrStep['automation_progress_id']}, automation_step_id={$arrStep['automation_step_id']})\n";
}

// Delete the title record itself
\Components\Marketing\Automation\Progress\Steps\Titles::delete($strTitleId);
echo "Deleted title #{$strTitleId}.\n";
echo "Done. The label will no longer appear in automation activity entries.\n";
<?php
// Remove the automation progress step title
// "Please contact support@oncord.com to activate your account" (title ID 3)

$strTitleId = 3;

// Confirm it exists and matches exactly
$arrTitle = \Components\Marketing\Automation\Progress\Steps\Titles::get($strTitleId);
if (!$arrTitle)
{
echo "Title ID {$strTitleId} not found — nothing to do.\n";
return;
}
echo "Found title #{$strTitleId}: \"{$arrTitle['automation_progress_step_title_name']}\"\n";

// Show which progress steps reference it, then clear the reference
$arrSteps = \Components\Marketing\Automation\Progress\Steps::getAll([
'filter' => [['automation_progress_step_result_title_id', '=', $strTitleId]],
'limit' => 500
]);
echo count($arrSteps) . " progress step(s) reference this title; clearing their result_title_id...\n";
foreach ($arrSteps as $arrStep)
{
$arrStep['automation_progress_step_result_title_id'] = null;
\Components\Marketing\Automation\Progress\Steps::save($arrStep);
echo " - Cleared reference on progress step (automation_progress_id={$arrStep['automation_progress_id']}, automation_step_id={$arrStep['automation_step_id']})\n";
}

// Delete the title record itself
\Components\Marketing\Automation\Progress\Steps\Titles::delete($strTitleId);
echo "Deleted title #{$strTitleId}.\n";
echo "Done. The label will no longer appear in automation activity entries.\n";
Created:
2026-09-04 20:21:56
2026-09-04 20:21:56
Is Ai Generated:
1
1
Is Readonly:
Summary:
This will do two things:

1. **Unlink the message from any steps that use it.** It looks through the system for up to 500 automation progress steps that currently point to this particular message ("Please contact support@oncord.com to activate your account"). For each one it finds, it removes that connection, so those steps will no longer show this message. The steps themselves are kept — only the link to the message is removed.

2. **Delete the message itself.** Once nothing points to it anymore, the message is permanently removed from the system. After this, that "please contact support to activate your account" text will no longer appear anywhere in automation activity entries.

If the message doesn't exist in the first place, nothing is changed at all.
This will do two things:

1. **Unlink the message from any steps that use it.** It looks through the system for up to 500 automation progress steps that currently point to this particular message ("Please contact support@oncord.com to activate your account"). For each one it finds, it removes that connection, so those steps will no longer show this message. The steps themselves are kept — only the link to the message is removed.

2. **Delete the message itself.** Once nothing points to it anymore, the message is permanently removed from the system. After this, that "please contact support to activate your account" text will no longer appear anywhere in automation activity entries.

If the message doesn't exist in the first place, nothing is changed at all.
Modified:
2026-09-04 20:22:37
2026-09-04 20:22:37
Contact Id:
-2
-2