Schedule Reminder with different message

I am trying to set a reminder using Form and Action

class ReminderFormAction(FormAction):
	def name(self) -> Text:
		return "reminder_form"

	@staticmethod
	def required_slots(tracker: Tracker) -> List[Text]:
		return ["time","reminder_message"]

	def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]:
		return {"time": [self.from_entity(entity="time")],"reminder_message": [self.from_entity(entity="reminder_message"), self.from_text()]}

	def submit(self, dispatcher: CollectingDispatcher,tracker: Tracker, domain: Dict[Text, Any],) -> List[Dict]:
			date=parser.parse(tracker.get_slot('time'))
			reminder_message=tracker.get_slot('reminder_message')
			dispatcher.utter_message('Trying to set a reminder for '+str(date))
		return [ReminderScheduled("action_reminder",date,kill_on_user_message=False),SlotSet("reminder_message_for_action",reminder_message),SlotSet("reminder_message", None),SlotSet("time", None)]

class ActionAcceptReminder(Action):
	def name(self):
		return 'action_reminder'
	def run(self, dispatcher, tracker, domain):
		reminder_message = tracker.get_slot('reminder_message_for_action')
		response = """You have scheduled a reminder: """+reminder_message
		dispatcher.utter_message(response)
		return []
		# return [SlotSet("reminder_message", None),SlotSet("time", None)]

Use Case: I set a reminder in 2 minutes from now saying remind me to buy groceries I set another reminder in the next 5 seconds… since the slot values are reset in the Form, it will ask again for time and reminder_message (as expected). I set another reminder in 45 seconds from now saying remind me to buy movie tickets

What I observe is that both reminders will be triggered, but both of them have the same message “buy movie tickets”.

I want both reminders to have their respective messages, is this possible?

I guess this part is setting the same slot both times? You might be able to use a creative solution like using a list slot for the reminder messages

Hi Alan,

Do you think it would be possible to set the value somewhere in metadata or in a new thread where it could be accessed just by that unique Reminder Action.

Hello,

I ran into the same issue with Rasa 2.0.0 Have you solved it somehow?

First I fill the slots reminder_time and reminder_text in a form. If the data is valid, a reminder is schedueld at reminder_time. After that both slots will be cleared and the user can schedule another reminder. ReminderScheduled only allows to send entity data to the react action. A ‘custom’ parameter would be helpful.

My workaround at the moment is to create ReminderScheduled like this:

ReminderScheduled(
  'EXTERNAL_reminder',
  trigger_date_time=reminder_time,
  entities={'reminder_text': tracker.get_slot('reminder_text')},
  name='reminder',
  kill_on_user_message=False,
)

and this in the reminder react action:

dispatcher.utter_message(tracker.latest_message.get('entities')[0].get('value'))