Push Notifications to Socket IO (nodeJS) to Slack - node.js

I'm trying to implement Push Notifications from Acumatica to my own NodeJS Server using SocketIO to get real-time notifications.
I am using the Webhook Type to send Data to Slack, unfortunately Slack only needed
"text" parameter to post on their webhook.
Acumatica has its own sets of parameters. I've looked up on how to create class-based Notification Structure defined by Acumatica Documentation, I can't find a way to compress all the JSON returned by the Data Query into "text" params, or any other way to customize the data query returned by Acumatica.
I'm trying to look into other Push Notification Methods in Acumatica.

You have 2 possibilities to do:
you can write your own service to transfer acumatica push notifications to slack form and resend them to slack.
you can customize acumatica and add there your own hooktype.
In this case you should implement a pair of interfaces: IPushNotificationSender and IPushNotificationSenderFactory
this hook will be automatically added to your hook type selector.

Related

How to send Push Notifications at Specific times listed in a Django Model

I am looking to use my django rest framework project along with django push notifications to send notifications to iOS users. I want these notifications to be sent at times specified in my django models. What would be the best way to achieve something like this?

Creating form data via rest doesn't trigger autoresponder

Kentico 10. When I make a rest request to post data to the kentico form module I get a successful http 201 back and I can see the data created in the kentico interface. This particular form I am posting data to has an autoresponder set up.
I have a default smtp server set up and can successfully email out through it, which leads me to believe that the autoresponder on the form does not get triggered when data is created in the kentico form via rest. I never see the autoresponder attempt to send an email in either the email queue module or the event viewer (with the proper web.config key set).
Is that the intended behavior, to not trigger the autoresponder when forms module data is created via a rest request? If so, any idea how to get it to trigger?
Yes you are correct. Kentico REST is meant to perform simple CRUD operations. Essentially what you doing is the same as if you do it inside the admin i.e. go inside admin -> forms -> your form name -> recorded data and add new record. It doesn't trigger anything like sending email or Redirect to URL etc.
What you can do if you want to send email using form global events and on insert send email yourself. Here is the example of using global events

How to use trigger event in facebook messenger bot

I'm developing Facebook messenger bot. Based on the official sample
here made by Node.js, Express, ES7.
I want to use Firebase database, trigger event.
If someone updates the database, send notice to certain people. I add source code "Child Changed" to "messages.js" in messenger-api-helpers, but it doesn't work.
I can check working "Child Changed" in HTML, but in messenger, I cannot.
Where should I write the trigger events code?
You should definitely use Facebook Messenger Broadcast API for this kind of functionality. This will broadcast a notice/broadcast to users.
Caveats:
You have to apply for this permission. (pages_messaging and pages_messaging_subscriptions.Takes about 1-2 days, but
can test on Admin/Test users of the app)
Each broadcast has to be a separate broadcast. (e.g. you can't send image and a text together, each has to be its own individual broadcast).
Have some kind of un-subscription option as well. FB user might think you are spamming even if you clearly say in the messages that your bot will send updates.
Use custom labels to create targetted sends. So you can either subdivide who you will send updates to about specific issues or just label people if they unsubscribe to your broadcast or not.
Basic workflow:
Get permission to broadcast.
On event in your Database. Start process.
Create message_creative_id via POST to endpoint
Use message_creative_id to POST a broadcast_messages
On a successful send you will get back broadcast_id

What is the perfect way to get response from docusign api webhook response in php?

I have set a web hook URL for docusign API. when any update from document signer come, i will get update about envelop. but how can i get the response? What is the format. Can someone show me a example?
In order to receive and process webhook notifications from DocuSign Connect, you'll need to create an application to "listen" for (and process) the notifications. DocuSign provides sample applications like this in a variety of languages -- you can use this link to find those samples on GitHub: https://github.com/docusign?utf8=%E2%9C%93&q=connect.
For example, here's the webhook sample in PHP: https://github.com/docusign/recipe-010-webhook-php.
You will get response from DocuSign in an XML format, You can find more details at https://www.docusign.com/blog/dsdev-adding-webhooks-application/,
https://www.docusign.com/supportdocs/ndse-admin-guide/Content/connect-technical-details.htm and Guide is available at https://www.docusign.com/supportdocs/pdf/connect-guide.pdf

How to use webhooks?

I am working on a project where I need to integrate the google-services(like Gmail, Gcalendar). When the user gets a mail or something added to the gCalender I need to activate some code. Can I achieve it by webhooks or need to do polling with some time duration.
If I use webhooks, how to determine which user data that I get(consider I have thousands of users).
You can use webhooks to get push notifications. Webhooks are very similar to API's but they are inverted instead. For example instead of you making a call to an API you would define a callback URL in which the receiving end will then HTTP Post the information that you want, e.g name etc.
the creation or registration of a webhook will be the combination of:
--> a Friendly name for that webhook.
--> the URL where the callback should be sent
--> the scope of the webhook
--> the events to post to the URL either all events or a set of specific events.
Name: "MyWebhook"
URL: http://www.webhookapplication.com/webhookreciever
Scope: Project = .... and fixversion IN ("5.1")
Events: Updated and create etc.
You can create webhooks by first setting up an unique URL which I use RequestBin for e.g http://requestb.in/XXXXXXXX
Most Event Webhooks will notify a URL that you choose via the HTTP Post with information about events that occur.
A good example about webhooks can be found here:
https://sendgrid.com/docs/API_Reference/Webhooks/index.html
And this here will example how to use the send grid event to email:
https://sendgrid.com/docs/API_Reference/Webhooks/event.html

Resources