Initial survey won't trigger a series of automated surveys. Can someone advice? - redcap

I have a survey called 'Set up and kill switch' (image 1) that will trigger a series of weekly surveys to be sent out, but it's not working. I'm not sure if I didn't set it up correctly or if the logic is not right. I attempted to set it up as sending surveys out via email. In step 3 (refer to image 2), I also specified the conditions: when the set up and kill switch survey has been completed and if the predetermined date in the survey matches the date 'today', the system should activate automated surveys for the next 8 weeks so participants should be receiving them on a weekly basis. However, when I tested this out, I did not receive a survey after completing the kill switch survey. Does anyone have experience in making something like this on redcap? I suspect that the logic is fine, but it could be an issue between linking participant IDs so they aren't receiving anything?
Logic code:
datediff([weekly_questionnai_arm_3i][weekly_date],"today","d","mdy",true)>=0 and ([weekly_questionnai_arm_3i][weekly_killswitch(0)])<>"1"
Kill switch screenshot
Automated survey logic

You need to check the box next to 'Ensure logic is still true before sending invitation?'.
As soon the send logic is true the automated emails will be queued/scheduled for sending - changing the form fields so that the send logic is no longer true will not stop the scheduled emails from being sent unless the 'Ensure logic is still true ...' box is checked.
I also recommend clicking and reading the link underneath "How to use 'stop logic' to disable an automated invite".

Related

Power Automate flow triggerede by "When a row is added, modified or deleted" not triggered

I'm new to Microsoft CRM and Power Automate. I'm trying to implement the Quote approval process.
As the first step, I tried to create a simple workflow to trigger when a Quote item is saved/modified using Dataverse 'When a row is added, modified or deleted'. So, I have studied many online tutorials and done workflow very simple to send an email when a Quote item is saved/modified.
Problem is, It's actually not triggered with any action on the Quote page. Already spend a couple of days to figure out the issue.
This is how I tested it.
Step 01 - Save and test manually test flow
Step 02 - insert a new item to Quote or modify the existing item.
But nothing happens.
Items you add to the Quote are in fact Quote Product records. This is a separate table named quotedetail.
Your Power Automate flow needs to target the Quote Products table to capture the intended changes.
The reason was Administrative mode.
Administrative mode disables all asynchronous processes. This includes server-side sync (email synchronization) and workflow processes including flow (Power Automate).
https://functionalthoughts.com/microsoft-dynamics-365-managing-admin-mode-from-power-platform/

Scheduling and rescheduling emails

Background
A workflow I have allows users to book meetings. The time/day of the meeting is stored in a table along with other details like the email address.
I send them an email reminder 30 minutes in advance.
Problem
In order to send them an email, a recurring event is set up once a week to go through the table and schedule the email to be sent on time - 30 minutes.
I've added the ability to reschedule the meeting. The problem that creates is that the emails are already scheduled, so users get the reminders at the original time, which is confusing.
What I want to do
I want to be able to send them the email at the rescheduled time, but there are technical limitations to the platform I use, which are:
I cannot set up cron/recurring more frequently than every day. This would probably be better than every week, but if someone rescheduled within the day, they would still get the wrong email.
I cannot remove scheduled events - so any recurring events-based workflow would still send the original email.
I know - this is pretty limiting, but am I even approaching this in the right way?
given your constraints, I'd probably go with 'resign'.
But in all seriousness, if you can't remove scheduled events (and I'm guessing you can't 'move' them because this is too advanced for your CTO to get their head around) then the only way I see it is to break the email send process into two steps - send scheduled event to PROXY in-front of your email sender, check if there is another event (i.e. can you add some 'cancelled/moved to data to the original one) and if so don't send it.

How in REDCap do you create a [survey-url] to a new instance of a Repeating Instrument?

How do you send a [survey-link] that creates/links to a new instance of a repeating-instrument survey in REDCap?
ie imaging you have customers who should visit you on a regular basis. You have two instruments:
customer
visit [set as a Repeating Instrument + enabled as a Survey]
And you have an alert that regularly sends them a "Time for your next visit" email.
When I send an alert to a customer with [survey-link:visit] it will work the first time. The email will contain a unique URL for that customer's visit. But when the alert is sent a second time, person will open the URL and get a "Thank you for your interest, but you have already completed this survey."
I can manually (via the web admin) create a new instance of their Visit. But how should I do this automatically?
Thank you.
As of version 12.5 this is now supported using a smart variable [new-instance] which, when appended to a [survey-url] or [survey-link] smart variable, will target a new instance of the instrument if it is repeating. In the same release came ASI options around repeating instruments, which allow you to repeat an ASI every X minutes, hours or days, and each successive ASI instance points to the specific instance of the survey instrument. This is useful for daily surveys.
For your use case, [survey-link:visit][new-instance] will do what you want. Send it to them once and instruct them to fill it out as many times as needed, or send it however many times you need to.
====
Yes, this is a current limitation. It has been requested of the REDCap developers to add a smart variable [new-instance] that can be appended to a [survey-link] or other smart variable to instantiate a new instance of a repeating instrument, and they have responded positively.
Maybe the most appropriate workflow here would be for you or the project staff to manually create the visit instance, save it with a date, and have an alert that sends them an invitation to complete the visit details, or whatever you need them to do.
If you want the respondents to instantiate the visit themselves (i.e., make a booking rather than respond to a booking made on their behalf), the only workaround I have personally managed is to enable the survey queue and activate the repeating instrument on the basis of some logic (say, [consent] = 1), and in the survey settings of the repeating instrument, enable the option to Allow respondents to repeat the survey.
With these settings, the survey queue will allow the survey respondent to create a new instance of the instrument themselves by clicking the 'Take this survey again' button (button text configurable in survey settings). They can be emailed their link to the survey queue via an alert using the smart variable [survey-queue-link] or [survey-queue-url].
For extra credit, you could get fancy with the survey queue logic so that the instrument is disabled if, say, the last instance of the survey has today's date, using something like [consent] = 1 and datediff([visit_date][last-instance],"today","d",true) > 0. With this you could prevent them smashing it and adding multiple new visits at once.

Laravel - Send Mail in Future based on condition

I want to send emails to various users based on the schedules they have set.
I read about beanstalkd, queues and Delayed Message Queueing and for now it looks like fitting in:
$when = Carbon::now()->addMinutes($minutes); // i can calculate minutes at this moment
\Mail::to($user)->later($when, new \App\Mail\TestMail);
But i'm not quite sure on few things:
User can cancel a future schedule. In that case how do i cancel an email that's suppose to send in future. Can i set condition somewhere that gets checked before sending the actual email? Tried return false on handle method of \App\Mail\TestMail and it started throwing error
Am i using the right approach. I also read about Scheduler but i don't get how i am going to cancel future emails(if they need to be)
There are many ways to approach this. Personally I would queue the emails on a schedule rather than adding them to the queue for later.
So you run a scheduled task once a day (or hour, or minute) which runs a query to select which users require an email, then using that result set, you add a job to the queue for each result.
This way, if a user unsubscribes, you don't have to worry about removing already queued jobs.
Laravel offers quite a nice interface for creating scheduled jobs (https://laravel.com/docs/5.4/scheduling) which can then be called via a cronjob.

Mailchimp - How to record data to subscribers list from 2 different forms

Ho everyone, I'm in trouble with my campaign, this happened to me... when i go to my list to see the data of the recipients.
It is asking me to create a reconfirmation Campaign, due to a too high volume of unsubscribed to this campaign.
Here the path I've been following to realise my campaign ( It is the first time I'm using Mailchimp):
I have an invitation to a event where guest can approve or decline the invitation.
When they Accept the invitation: it bring to the update profile form - which icahnge in the advence editor. This way We can record some data such as dietary requirements,etc which would be recorder to our subscriber list ons submit.
When people decline the invitation, we have link to the unsubscribe form. This way we are able to know Which person has decline the invitation.
From what I understand, this is way It stopped our campaign.
What I'm looking to achieve . . . and din't manage i slept 2 hours last night trying to make this work . .. and i m in a big rush :
How can I achieve to collect data with the path explain previously, without having this issue in the future - so without using the unsubscribe from - but two different forms ?
How can I access to the List of User who have accept the invitation, so I mean the Subscriber List. because since that happen, I can't access it - and obviously i don't want to send another email to the guests asking them to fill up again.
I really appreciate all the help that anybody can provide me with that,
Thank you guys !
If I'm understanding you correctly, you're trying to use list subscriptions to stand-in for RSVPs? That is likely to look really bad -- ESPs see high volumes of unsubscribes as suspiciously spammy -- you'd be better off using Interests or Merge Fields on your list to denote the user's RSVP rather than asking them to unsubscribe. As for your current account, follow the instructions in the email you received if you want to get your list back up and running again.

Resources