Glific v0.3.1 Glific.Flows.ContactField View Source

Since many of the functions set/update fields in contact and related tables, lets centralize all the code here for now

Link to this section Summary

Functions

Add a field {key, value} to a contact. For now, all preferences are stored under the settings map, with a sub-map of preferences. We expect to get more clarity on this soon

Create contact field

list contacts fields.

Reset the fields for a contact.

Link to this section Functions

Link to this function

add_contact_field(context, field, value, type)

View Source

Specs

Add a field {key, value} to a contact. For now, all preferences are stored under the settings map, with a sub-map of preferences. We expect to get more clarity on this soon

Link to this function

create_contact_field(attrs)

View Source

Specs

create_contact_field(map()) ::
  {:ok, Glific.Contacts.ContactsField.t()} | {:error, Ecto.Changeset.t()}

Create contact field

Link to this function

list_contacts_fields(args)

View Source

Specs

list_contacts_fields(map()) :: [Glific.Contacts.ContactsField.t()]

list contacts fields.

Link to this function

reset_contact_fields(context)

View Source

Specs

Reset the fields for a contact.