Skip to content

Document Company soft delete event#506

Open
promptless-for-oss wants to merge 7 commits into
mautic:7.2from
Promptless:promptless/pr-16176-company-soft-delete
Open

Document Company soft delete event#506
promptless-for-oss wants to merge 7 commits into
mautic:7.2from
Promptless:promptless/pr-16176-company-soft-delete

Conversation

@promptless-for-oss

Copy link
Copy Markdown
Contributor

Open this suggestion in Promptless to view citations and reasoning process

Add documentation for the new COMPANY_SOFT_DELETE event (mautic.company_soft_delete) that is dispatched when a Company is marked as soft deleted. Includes event type, properties, and a code example for subscribing to the event.

Trigger Events


Tip: Whenever you leave a comment tagged @Promptless on a Promptless PR, Promptless will remember it for future suggestions 🧠

@@ -0,0 +1,74 @@
Company soft deleted event

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added documentation for the COMPANY_SOFT_DELETE event from LeadEvents.php:714-716 which dispatches mautic.company_soft_delete with a CompanyEvent instance when companies are marked as deleted via CompanyModel::deleteEntity().

Source: mautic/mautic#16176

@adiati98 adiati98 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@promptless-for-oss please address the suggestions

Comment thread docs/webhooks/events/company_soft_delete.rst Outdated
Comment thread docs/webhooks/events/company_soft_delete.rst Outdated
Comment thread docs/webhooks/events/company_soft_delete.rst Outdated
Comment thread docs/webhooks/events/company_soft_delete.rst
@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback, @adiati98! I've addressed all your suggestions:

  1. ✅ Added custom reference target .. _Company properties at Company created updated event: in company_post_save.rst
  2. ✅ Updated the cross-reference link to use :ref:Company properties at Company created updated event``
  3. ✅ Removed the trailing period from the timestamp description
  4. ✅ Wrapped the description paragraph with .. vale off / .. vale on tags
  5. ✅ Expanded CRM abbreviation to "Customer Relationship Management (CRM) system"
  6. ✅ Added CRM to the Vale vocabulary file (.github/styles/config/vocabularies/Mautic/accept.txt)

Ready for another review!

@adiati98 adiati98 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@promptless-for-oss please address the suggestions

Comment thread docs/webhooks/events/company_soft_delete.rst Outdated
@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback, @adiati98! I've addressed both suggestions:

  • Changed to active voice: "when Mautic marks Companies for deletion"
  • Updated CRM abbreviation format to use dashes: "Customer Relationship Management - CRM - system"

Comment thread docs/webhooks/events/company_soft_delete.rst Outdated
@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback! I've added the "See" prefix to the Company properties reference as suggested.

@adiati98 adiati98 added this to the 7.2 milestone May 31, 2026
Comment thread docs/webhooks/events/company_soft_delete.rst Outdated
@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback, @fedys! I've added the "Event instance" section with the \Mautic\LeadBundle\Event\CompanyEvent class as suggested.

@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

Removed the "Event properties" section as requested. The documentation now includes the event type, event instance class, code example, and related links without the incorrect properties table.

@adiati98 adiati98 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@promptless-for-oss please address the suggestions.

Comment thread docs/webhooks/events/company_post_save.rst Outdated
Comment thread docs/webhooks/events/company_soft_delete.rst Outdated
@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

Thanks for catching these! I've removed both unused anchor labels:

  • _company_soft_deleted_event_type from company_soft_delete.rst
  • _Company properties at Company created updated event from company_post_save.rst

Verified neither was referenced anywhere in the docs before removing.

@adiati98

adiati98 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

@promptless-for-oss please rebase to 7.2 branch.

promptless Bot added 7 commits June 5, 2026 13:28
Document the new COMPANY_SOFT_DELETE event (mautic.company_soft_delete)
introduced in PR #16176 for improved company-contact relationship handling.
This event is dispatched when a Company is marked as soft deleted, before
permanent deletion occurs.
- Add custom reference target for Company properties cross-reference
- Update link to use :ref: with custom target
- Remove trailing period from timestamp description
- Add vale off/on tags around description paragraph
- Expand CRM abbreviation to Customer Relationship Management (CRM)
- Add CRM to Vale accept.txt vocabulary
- Change passive "are marked" to active "Mautic marks"
- Update CRM abbreviation format to use dashes per style guide
Address reviewer feedback to add "See" before the cross-reference
to Company properties section.
The Event properties table contained incorrect information, as noted
by reviewer @fedys.
Remove two anchor labels that are not referenced anywhere:
- _company_soft_deleted_event_type in company_soft_delete.rst
- _Company properties at Company created updated event in company_post_save.rst
@promptless-for-oss promptless-for-oss force-pushed the promptless/pr-16176-company-soft-delete branch from 939347a to a409684 Compare June 5, 2026 13:28
@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

Done! I've rebased this branch onto the 7.2 branch and force-pushed the changes.

Note: The PR's base branch will also need to be updated to 7.2 via the GitHub UI (Edit button → change base branch).

@adiati98 adiati98 changed the base branch from 7.0 to 7.2 June 5, 2026 13:31
@adiati98

adiati98 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

@promptless-for-oss please close and reopen this PR to trigger the GitHub actions that are stuck.

@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

Done! I've closed and reopened the PR to re-trigger the GitHub Actions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants