View Source Glific.Clients (Glific v5.1.6)

Wrapper module that allows us to invoke organization specific callback functions to tweak the way the system handles things. This allows clients to override functionality in a similar manner to plugins wordpress.

At some point we will move this to a more extensible scheme, which is as yet undetermined

Link to this section Summary

Functions

Programmatically block clients based on organization needs. Use case could be: Allow only numbers from India and US

Allow an organization to dynamically select which contact the broadcast message should go to. This gives NGOs more flexibility when building flows

Allow an organization to ran a glific functions at a daily basis.

Overwrite the default GCS storage bucket

Allow an organization to ran a glific functions on a weekly basis.

Allow an organization to add additional conditions on starting a trigger This allows an org to add a daily trigger which is executed only on some days of the week

Allow an organization to use glific functions to implement webhooks. A faster way of modifying the DB and doing some advanced stuff in an easy manner

Allow an organization to ran a glific functions on a weekly basis.

Link to this section Functions

Link to this function

blocked?(phone, organization_id)

View Source
@spec blocked?(String.t(), non_neg_integer()) :: boolean()

Programmatically block clients based on organization needs. Use case could be: Allow only numbers from India and US

Link to this function

broadcast(action, contact, staff_id)

View Source

Allow an organization to dynamically select which contact the broadcast message should go to. This gives NGOs more flexibility when building flows

@spec daily_tasks(non_neg_integer()) :: map()

Allow an organization to ran a glific functions at a daily basis.

@spec gcs_file_name(map()) :: String.t()

Overwrite the default GCS storage bucket

@spec hourly_tasks(non_neg_integer()) :: map()

Allow an organization to ran a glific functions on a weekly basis.

Link to this function

trigger_condition(trigger)

View Source
@spec trigger_condition(Glific.Triggers.Trigger.t()) :: boolean()

Allow an organization to add additional conditions on starting a trigger This allows an org to add a daily trigger which is executed only on some days of the week

@spec webhook(String.t(), map()) :: map()

Allow an organization to use glific functions to implement webhooks. A faster way of modifying the DB and doing some advanced stuff in an easy manner

@spec weekly_tasks(non_neg_integer()) :: map()

Allow an organization to ran a glific functions on a weekly basis.