- Posts: 3
- Thank you received: 0
Create an Event Driven API REST Call
- Shawn Lynch
- Topic Author
- Offline
- New Member
Less
More
2 years 10 months ago #149365
by Shawn Lynch
Create an Event Driven API REST Call was created by Shawn Lynch
Need to create an Event driven API REST call using a 3rd party.
Basically, when the "submit" button is click and validation has occurred I need to be able to send the form data to a 3rd party service (an outbound REST call).
If there's a solution for this already please let me know, otherwise I would need to know what to do and where to do it to ensure this works as needed. Also, need to be able to ensure this isn't overwritten when updates happen (override option).
Thank you.
Basically, when the "submit" button is click and validation has occurred I need to be able to send the form data to a 3rd party service (an outbound REST call).
If there's a solution for this already please let me know, otherwise I would need to know what to do and where to do it to ensure this works as needed. Also, need to be able to ensure this isn't overwritten when updates happen (override option).
Thank you.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
2 years 10 months ago - 2 years 10 months ago #149473
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Create an Event Driven API REST Call
Hello
When a ticket is submitted, the system trigger event onAfterStoreTicket
When a comment is added to a ticket, the system trigger onAfterStoreComment event
So all you need to do is writing plugin for helpdeskpro group (see some sample plugins under plugins/helpdeskpro folder), listen for these events and pass data to the place you want
Hope it helps
Tuan
When a ticket is submitted, the system trigger event onAfterStoreTicket
Code:
PluginHelper::importPlugin('helpdeskpro');
$this->container->app->triggerEvent('onAfterStoreTicket', [$row]);
When a comment is added to a ticket, the system trigger onAfterStoreComment event
Code:
PluginHelper::importPlugin('helpdeskpro');
$this->container->app->triggerEvent('onAfterStoreComment', [$row, $ticket]);
So all you need to do is writing plugin for helpdeskpro group (see some sample plugins under plugins/helpdeskpro folder), listen for these events and pass data to the place you want
Hope it helps
Tuan
Last edit: 2 years 10 months ago by Tuan Pham Ngoc.
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.