List, fetch, and manage outbound campaigns and their contacts.
Summary
Functions
Delete a campaign.
Fetch a campaign by its code.
Whether a campaign has contacts left to call. Returns {:ok, boolean}.
List all campaigns.
Get a campaign's status.
Update a campaign's attributes (e.g. %{enabled: false}).
Upload contacts to a campaign by code (v2 endpoint).
Types
@type result(x) :: {:ok, x} | {:error, Guava.Error.t()}
Functions
@spec delete(Guava.Client.t(), String.t()) :: result(map())
Delete a campaign.
@spec delete!(Guava.Client.t(), String.t()) :: map()
@spec get_by_code(Guava.Client.t(), String.t()) :: result(Guava.Campaign.t())
Fetch a campaign by its code.
@spec get_by_code!(Guava.Client.t(), String.t()) :: Guava.Campaign.t()
@spec has_callable_contacts(Guava.Client.t(), String.t()) :: result(boolean())
Whether a campaign has contacts left to call. Returns {:ok, boolean}.
@spec has_callable_contacts!(Guava.Client.t(), String.t()) :: boolean()
@spec list(Guava.Client.t()) :: result([Guava.Campaign.t()])
List all campaigns.
@spec list!(Guava.Client.t()) :: [Guava.Campaign.t()]
@spec status(Guava.Client.t(), String.t()) :: result(map())
Get a campaign's status.
@spec status!(Guava.Client.t(), String.t()) :: map()
@spec update(Guava.Client.t(), String.t(), map()) :: result(map())
Update a campaign's attributes (e.g. %{enabled: false}).
@spec update!(Guava.Client.t(), String.t(), map()) :: map()
@spec upload_contacts(Guava.Client.t(), String.t(), [Guava.Contact.t()], keyword()) :: result(map())
Upload contacts to a campaign by code (v2 endpoint).
Options
:allow_duplicates(defaultfalse):accepted_terms_of_service(defaultfalse):outreach_modalities— applied to contacts that don't set their own.
@spec upload_contacts!(Guava.Client.t(), String.t(), [Guava.Contact.t()], keyword()) :: map()