Skip to content

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

Open
promptless-for-oss wants to merge 1 commit 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 1 commit 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

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.

1 participant