Actions/Filters for Developers

Estimated reading: 5 minutes 832 views

Cohort Manager provides the following Actions and Filters that allow Developers to hook into its functionality. These can be used to create custom integrations or help with automation with your wider system. 

Action: cohort_manager_workflow_updated

Description: Fires whenever a change is made to a workflow.

				
					do_action('cohort_manager_workflow_updated',$workflow,$interaction_type,$timestamp);
				
			

Action: cohort_manager_interaction_deleted

Description: Fires whenever an interaction is deleted from a workflow.

				
					do_action('cohort_manager_interaction_deleted',$interaction);				
			

Action: cohort_manager_workflow_deleted

Description: Fires whenever a workflow is deleted.

				
					do_action('cohort_manager_workflow_deleted',$workflow);				
			

Action: cohort_manager_new_workflow

Description: Fires whenever a new workflow is created.

				
					do_action('cohort_manager_new_workflow',$workflow);				
			

Filter: cohort_manager_email_recipients

Description: Allows you to manipulate an array of recipients who would receive an email from a “Send email to…” interaction.

				
					apply_filters('cohort_manager_email_recipients',$recipients);				
			

Filter: cohort_manager_custom_email_subject

Description: Allows you to alter the subject line of an automated email for specific recipients.

				
					apply_filters('cohort_manager_custom_email_subject',$email_subject,$recipient);				
			

Filter: cohort_manager_custom_email_content

Description: Allows you to alter the content of an automated email for specific recipients.

				
					apply_filters('cohort_manager_custom_email_content',$email_content,$recipient);				
			

Action: cohort_manager_email_sent

Description: Fires after every email sent via a “Send email to…” interaction. Useful for logging emails sent.

				
					do_action('cohort_manager_email_sent', $recipient_email, $email_subject, $email_content);				
			

Action: cohort_manager_group_enrolled_onto_course

Description: Fires after a group is enrolled onto a course by Cohort Manager.

				
					do_action('cohort_manager_group_enrolled_onto_course',$group_id,$course_id);
				
			

Action: cohort_manager_group_enrolled_onto_course

Description: Fires after a group is unenrolled from a course by Cohort Manager.

				
					do_action('cohort_manager_group_unenrolled_from_course',$group_id,$course_id);				
			

Action: cohort_manager_workflow_cloned

Description: Fires after a workflow is cloned.

				
					do_action('cohort_manager_workflow_cloned',$cloned_workflow,$new_workflow);				
			

Action: cohort_manager_interactions_listing_item

Description: Allows additional information to be included alongside the titles of Cohort Workflow interactions.

				
					do_action('cohort_manager_interactions_listing_item',$interaction);				
			

Action: cohort_manager_interactions_listing_status

Description: Allows additional information to be included alongside the statuses of Cohort Workflow interactions.

				
					do_action('cohort_manager_interactions_listing_status',$interaction);				
			

Action: cohort_manager_interactions_listing_action_button_class

Description: Allows a button  CSS class to be included when editing new Cohort Workflow Interactions.

				
					do_action('cohort_manager_interactions_listing_action_button_class',$interaction);				
			

Action: cohort_manager_workflow_dialogs_after

Description: Allows additional information to be added the dialog boxes when editing Cohort Manager Workflows. Can technically be used to add new types of interaction.

				
					do_action('cohort_manager_workflow_dialogs_after',$workflow);				
			

Action: cohort_manager_workflow_interaction_buttons_after

Description: Allows additional information to be added to the “Add new Interaction” menu when editing Cohort Manager Workflows. Can technically be used to add new types of interaction.

				
					do_action('cohort_manager_workflow_interaction_buttons_after',$workflow);				
			

Action: cohort_manager_custom_workflow_actions

Description: Allows custom actions to be added when Cohort Manager interactions happen.

				
					do_action( 'cohort_manager_custom_workflow_actions', $workflow, $_POST, $localised_unixtime );				
			

Filter: cohort_manager_interaction_types

Description: Allows for customisation of different Cohort Manager Interactions available.

				
					apply_filters('cohort_manager_interaction_types',$types);				
			

Filter: cohort_manager_lookup_interaction_response

Description: Allows for customisation of Cohort Manager Interaction values.

				
					apply_filters('cohort_manager_lookup_interaction_response', $return, $workflow, $interaction);				
			

Action: cohort_manager_custom_scheduled_tasks

Description: Allows for custom functionality to be added when Cohort Manager scheduled task runs every minute.

				
					do_action('cohort_manager_custom_scheduled_tasks');				
			

Leave a Comment

Share this Doc

Actions/Filters for Developers

Or copy link

CONTENTS