Skip to content

docs: Port "Webhooks" extension page to 7.2#591

Open
promptless-for-oss wants to merge 2 commits into
mautic:7.2from
Promptless:promptless/docs-issue-333-webhooks-7.2
Open

docs: Port "Webhooks" extension page to 7.2#591
promptless-for-oss wants to merge 2 commits into
mautic:7.2from
Promptless:promptless/docs-issue-333-webhooks-7.2

Conversation

@promptless-for-oss

Copy link
Copy Markdown
Contributor

Open this suggestion in Promptless to view citations and reasoning process

Ports the legacy webhook-extension guide into plugin_extensions/webhooks.rst, converting Markdown to RST and modernizing the examples to EventSubscriberInterface and WebhookModel::queueWebhooksByType(). Resolves docs porting issue #333 against the 7.2 base branch.

Trigger Events


Tip: Enable auto-create PR in your Configuration to review suggestions directly in GitHub 🤖

.. vale on No newline at end of file
.. vale on

Webhooks let Mautic send data to external services through an endpoint URL. Extending them relies on event listeners with two responsibilities:

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.

Ported the page structure and prose (Webhook type listener, payload listener, receiving payloads) from the legacy _plugin_extending_webhooks.md source referenced by porting issues #333/#332.

Source: https://github.com/mautic/developer-documentation/blob/main/source/includes/_plugin_extending_webhooks.md

LeadEvents::LEAD_POST_SAVE,
['contact' => $event->getLead()],
['leadDetails', 'userList', 'publishDetails', 'ipAddress']
);

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.

Modernized the legacy QueueWebhooks() example to queueWebhooksByType($type, $payload, array $groups = []), verified against the current WebhookModel in mautic/mautic.

Source: https://github.com/mautic/mautic/blob/main/app/bundles/WebhookBundle/Model/WebhookModel.php

@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/plugin_extensions/webhooks.rst Outdated
Comment thread docs/plugin_extensions/webhooks.rst Outdated
Comment thread docs/plugin_extensions/webhooks.rst Outdated
Comment thread docs/plugin_extensions/webhooks.rst
Apply @adiati98's PR mautic#591 review comments:
- Remove obsolete placeholder note block
- Add comma in intro bundle sentence
- Rewrite passive 'it's used' clause to active voice
- Wrap 'Receiving Webhook payloads' heading in vale off/on
@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

Thanks for the review, @adiati98 — all four comments have been addressed in this PR:

  1. Removed the note — deleted the placeholder note block and its wrapping .. vale off/.. vale on directives.
  2. Comma fix — applied verbatim ("In your own bundle, you also need to…").
  3. Active voice — the passive "it's used" now reads "…because Mautic uses it in a database query to decide which payloads to include in the POST."
  4. Wrapped the "Receiving Webhook payloads" heading in .. vale off/.. vale on (applied verbatim).

Vale passes cleanly on docs/plugin_extensions/webhooks.rst. Ready for another look.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants