I'm building an event signup system and integrating it with Ubercart. Each event is a product and has a price and a start time.
I wish to be able to trigger an action one week before the event starts. The action is supposed to send an email to the users that bought the event and perform a capture on the registrant's credit card. But where do I define the action and how do I trigger it one week before event start?
I assume you're talking about Drupal 6, since you're mentioning ubercart. Does the action to send the email you're takling about already exist?
If it does, you can assign it under Site Building | Triggers | Cron. If it doesn't show up in the list of actions, you might need the Triggerunlock module.
If the action doesn't exist, you're going to have to write the PHP code to send the emails and do the calculations. You will need to create your own module and either use hook_cron, or create a custom action.
Related
I have a custom code to execute for subscriptions and another one for one-time payments.
I have already written both codes and they are working fine. Now I would like to move each code to the right section where it must be executed. So I would like to ask you
if the payment_intent.succeeded only fires when we have a one time payment and the invoice.payment_succeeded event only fires when we have a subscription ? If that's the case I will be able to place my codes when I capture those 2 events.
PROBLEM
We want to track changes in user calendars, but are concerned with how often we'd need to check 2000+ user calendars (Outlook).
Would the process of monitoring over 2000 user calendars present a problem for our network?
WORKFLOW
Trigger (Check for calendar change) -> ACTION (Http: update a DB)
The Trigger below checks a calendar every 2 seconds. Is there a trigger that behaves like a "subscription" object where it simply handles a change notification?
For the question about how often to check the calendar events, it depends on your requirement. In my opinion, if you set check event every 2 seconds(it's a little bit more frequent), you'd better check if your logic app set as run in parallel. You can click the ... button of the trigger and click "Settings". Then check if it is same to below screenshot.
For your question about is there a trigger that behaves like a "subscription". I'm afraid it doesn't exist a trigger which can implement this requirement in logic app. We can also check if any backend api can implement it, we can see the graph api document.
The example in above screenshot is for mailFolders, but it's same with events. We can see it is necessary to specify a user(like me) or a group before the /events. So I don't think we can monitor the subscription events. You can raise a post on Azure feedback page to suggest developer add this feature.
After taking the user's permission to send push notifications and saving the userID in firestore, how can I use it to send notifications to them at a time of their choice daily ?
For example :
If the user selects 8:00 AM , I want to be able to send them the push notification everyday at 8 am.
I can't write the code to send the notification in the action itself.
What will I have to setup to accomplish this?
Once the user has granted you permission to send push notifications, you can use the Actions API to send the push notification.
The setup would be as follows.
Storing user preferences
1) Dialogflow agent asks the user when they want to be notified
2) User says they want to be notified at 8:00 am
3) Dialogflow detects the answer and makes a fulfillment request to your webhook (The webhook can be the inline editor in dialogflow (Functions) or another server)
4) In the handler of the intent, you have to store the UserId and the time they selected in your database (in this case, firestore)
5) Dialogflow agent gives the final answer to the user and the interaction ends
Sending the push notification
1) Identify if you have to send a notification to a user; this is the tricky part.
It is not possible to give you a definitive solution on this, because it heavily depends on the requirements of your system and the technologies that you are using/want to use.
Basically, you can use cron jobs, background infinite processes, pub/sub, cloud scheduler, or any other tool that allows you to constantly read information from your database to determine which users need to be notified. I recommend you to check this answer where is discussed an approach to tackle this problem using Firestore.
Notice that you don't necessarily need another server running, you can use the Functions used for the fulfillment.
For example. You can set up Cloud Scheduler to run each hour, and make a request to your Functions. In the request, you read from Firestore and extract the entities that need to be notified that hour.
2) Once you have the users that you want to notificate, you need to use the Actions API to send the push notification. Once again, this request can come from your fulfillment server, or another server used in the system.
I am looking to perform a custom action when a content editor in Kentico 10 updates a page and it eventually gets published.
To be more specific we have a custom page type for products which also as an "Updated" checkbox allowing the editor to mark it as updated. When this happens (gets marked as updated) I would like to send an email out to users that have a registered interest in this product that it has been updated.
I was looking through the documentation and came across Global Events here: https://docs.kentico.com/k10/custom-development/handling-global-events/reference-global-system-events#Reference-Globalsystemevents-DocumentEvents
I was wondering if using global events to intercept the save action when the editor updates the product is the way to go here or if there is a better approach.
Kentico does n't have this functionality out of the box, but we can achieve this by writing Custom code for Global Event and a scheduler (if No.of mails is large)
Recommended steps:
Attach custom code to Global event handler while publish specific document publish after event
public override void Init()
{
// Assigns custom handlers to the appropriate events
WorkflowEvents.Publish.After += new EventHandler(DocumentPublishCustomEvent);
}
In the custom code, if required page is published then make entries into custom table for email to be sent [This step is optional you can send mail from custom event handler directly if only few mails to be sent]
3.Implement custom scheduler to pick the user info from custom table and send email to user.
Note: Ideally you can use email Template for send emails
Using Global events is one way of doing this, another way would be to use Kentico's Advanced workflow engine (If you have the EMS license):
https://docs.kentico.com/k10/managing-website-content/configuring-the-environment-for-content-editors/configuring-workflows/designing-advanced-workflows
You could create a custom workflow step and action which the editors would put the page into and which would send emails to interested people - https://docs.kentico.com/k10/managing-website-content/configuring-the-environment-for-content-editors/configuring-workflows/designing-advanced-workflows/creating-custom-action-workflow-steps
If you do not have the EMS License, using Global events seems like the way to go, but I don't see the updated flag field as necessary, you could easily check in the global event handler if the product arrived at the "Published" workflow step in the basic workflow and then send the email to the interested parties.
Am looking for some help in a subscription service email sending from domino using Xpages.
scenario : Paul Goodman is a building contractor and he would like to subscribe to his category named "Buildings and Road”.
When someone asks question about his category "Buildings and Road” he and everyone else that have the same subscription , should get email. I have a LS Agent that goes thought a view to send these emails but I would like
to have his done as soon as the message is saved and it has to send one at the time to void spam filters. I know I could execute the LS agent onSave but do you see another solution maybe with JavaScript ? I have only seen some .NET & PHP solutions here.
You have a series of options here:
Extract your logic into a LS library, so it can be used by several agents. Then have on that runs on save (and another one on a new subscription)
Use a DOTs task to listen to documents save - you can write your logic in Java then
Call an ?OpenAgent URL from your client side JavaScript
Put it into your XPage for new articles
Since you have the agent already, I'd go with the first one