Context: I work at a small MSP and I've created a bot that direct messages employees when one of their tickets goes overdue. The message has a few buttons that allow the user to request an extension on the ticket. Once a button is clicked, our ticketing system's API is used to update the ticket and the chat message updates to reflect the selected update.
What I'd like to do after one of the request extension buttons is clicked is to ask the user if they would like to add a note to the ticket. If Yes button is clicked, the bot would prompt the user to respond with a note to add.
Here's my question. Is there any way to read the next message from the user after they click yes? As in, should the user click 'Yes' to add a note, can I trigger a script to run when the next user message is posted?
For what it's worth, I'm writing this in PHP. I'm using chat.postMessage to post the message when a ticket goes overdue, and simply "replacing" the message with a new one using that message's responseURL when a button is clicked.
Any Slack API gurus out there with any ideas?
Well.. if I understand your problem correctly, there is a much easier approach:
The buttons automatically call your script and tell you what the user clicked. So you can respond appropriately. Its all part of the Interactive Message feature in the Slack api. And you can configure which url Slack should call in the Slack App config window. Check out the offical documentation for Interactive Buttons more info.
However, I guess what you really want is the ability for the user to enter some free text, like in a html form input field. That is currently not possible in Slack, but that very feature is promised on the current Slack API roadmap to be delivered in the near future. Its called "Interactive message Stage 3".
Related
To create your own link with a pre-filled message that will automatically appear in the text field of a chat, use https://wa.me/whatsappphonenumber/?text=urlencodedtext where whatsappphonenumber is a full phone number in international format and URL-encodedtext is the URL-encoded pre-filled message.
Example:https://wa.me/15551234567?text=I'm%20interested%20in%20your%20car%20for%20sale
https://faq.whatsapp.com/en/android/26000030/
or
Click to WhatsApp Chat
The message in the url shows in the input field of whatsapp message box is there a way so that the message gets posted or sent automatically ?
Reason behind it-
There will be a icon on the website for whatsap chat anyone who clicks on that icon his message should be automatically send to the website's contact number which is in the url.
I was looking at this sometime back and sadly still there is no way to automatically send messages through the client app. It makes sense in a way to prevent spam & misuse. The closest thing is to pre-fill the content and let the user send the message to the desired phone number.
If you are a business you could try the Whatsapp for Business API - https://www.whatsapp.com/business/api to implement chatbot like features and that might fit whatever use case you are looking to build. Anyways it a request only feature for now but you can try the same.
Or if you would want to get wild and try app overlay to auto send the message but Whatsapp prevents app overlay and never lets users proceed to use the app.
I am attempting to use the Mailchimp API to allow site visitors to subscribe to my newsletter. Currently, any signups with the default form action that Mailchimp provides sends an Opt-In email and opens a new email to say thanks for subscribing, which I want to avoid. Instead, if I use the API, I can set those options to false. The problem is that it doesn't look like Shopify allows PHP or Ruby in their shop code. I've been looking for weeks for a solution, but I'm at a loss.
Here is a turnaround for this:
1.- Create a Wufoo form with one only field: email address.
2.- Paste this Wufoo form at your Shopify store. We'd recommed pasting the JavaScript version.
It can look like this
3.- On your notifications tab at your Wufoo form, choose to Send notifications to Another Aplication. On the dropdown, choose MailChimp click on Add integration and follow steps. You will be sending all email addresses to your desired MailChimp list.
Tiny problem is that placeholders on Wufoo forms, don't disappear on click, so the user needs to go inside the field and delete all the placeholder. (This might be a good point because robots can't do this, and you make sure the user is really involved in the process of typig his/her email address.)
I am making a website that will have a notification system that is like Facebook.
Each notification would redirect the user to a page, and on that page, I would mark any unread notification as 'read' as follows:
UPDATE notification SET status AS 'READ' WHERE ...
It is working well but the problem is every time when a user go to a page, even if there is no unread notification for the user, the query would still run. Though it does not make any difference to the end users, I wonder if it will create any performance issues.
I am thinking if I should update the database based on the click event on the notification dropdown. I want to listen to others about it first before implementing it. I want to know what's the normal practice when dealing with the notification system. Thanks!
I am using Sugar Pro 6.4.0 and want to display a notification to a user in sugar's notification area present in menu bar as shown in the image below:
How I can add a notification in a way that notification counter gets incremented automatically and when user click on the sugar cube icon, the notification gets displayed as shown in the above image.
I want to display my own created message in notification window show above eg message like "CRON is in process..." in Notifications window shown above.
I have accomplished this task in a non upgrade safe way by updating the file:
modules/Administration/DisplayWarnings.php
I have added the following code near the end of file
// Display Notification
displayAdminError("My notification message goes here...");
and it displays the message in notification area perfectly.
If anyone knows an upgrade safe way of accomplishing this task kindly let me know about it.
First you have to set the Email settings, configure the Smtp server , username , password and you can use scheduler for this to send the email notification or you can use logic hooks
I am trying to find a simple bare bones example/demo that shows me how I can build a trivial/proof of concept website that will collect user email (and maybe first name), and add this name to a list created on mailchimp.
To clarify, I am not merely asking how to create a PHP/mySQl website - I already know how to do that, and I already know how to place a form on a page etc.
Assuming I already have the following:
- A php/MySQL site with a registration form
- A newly created list on mailchimp
More specifically, I want a user to be able to register on a page on my site, and then I want the following sequence of events to happen:
When a user clicks the 'submit' button on my page, their details gets sent to mailchimp and added to a specific list created on mailchimp
They are sent a confirmation email by mailchimp
Once they confirm subscription, they are directed back to a page on my site, with a token from mailchimp
I store their details (provided by mailchimp) into my MySQL database
I send the confirmed subscriber an email with an attachment
When the user unsubscribes from the list, I get notified by mailchimp and I can flag the user as unsubscribed in my database.
I have not been able to find a simple demo (or tutorial) that shows how to implement the required functionality listed above. Can anyone recommend a link (or links) to get me started with implementing these specific "bare bone" functionality?
The documentation is rather good I thought?
Just checkout the API-docs: http://apidocs.mailchimp.com/api/how-to/basic-subscribe.php
And if for some reason you do not want to read docs but just want to see code (please, don't do this, but hey, what do I know): click on the exmples listed here: http://apidocs.mailchimp.com/api/downloads/#examples
Start with the example code and if it doesn't do exactly everything, you can find it at the docs easily enough.