ActiveCampaign.Contact (active_campaign v0.1.0)

Documentation for ActiveCampaign.Contact.

Link to this section Summary

Functions

Bulk import contacts

Bulk import status info

Bulk import status list

Create a contact

Delete a contact

Retrieve a contact

Retrieve a contacts account contacts

Retrieve a contacts automation entry counts

Retrieve a contact's bounce logs

Retrieve a list of contact's deals

Retrieve a contact's data

Retrieve a contact's deals

Retrieve a contact's field values

Retrieve a contacts geo ips

Retrieve a contact's goals

Retrieve a contact's list memberships

Retrieve a contact's logs

Retrieve a contacts notes

Retrieve a contacts organization

Retrieve a contacts plus append

Retrieve a contact's score value

Retrieve a contacts tracking logs

List all contact activities

List all automations the contact is in

List, search, and filter contacts

Sync a contact's data

Update a contact

Update list status for a contact

Link to this section Functions

Bulk import contacts

Link to this function

bulk_import_status_info(data \\ [])

Bulk import status info

Link to this function

bulk_import_status_list()

@spec bulk_import_status_list() :: {:ok, map()} | {:error, any()}

Bulk import status list

examples

Examples

iex> ActiveCampaign.Contact.bulk_import_status_list()
{:ok, %{"outstanding" => [], "recentlyCompleted" => []}}
@spec create(map()) :: {:ok, map()} | {:error, any()}

Create a contact

examples

Examples

iex> ActiveCampaign.Contact.create(%{
  email: "johndoe@example.com",
  firstName: "John",
  lastName: "Doe",
  phone: "7223224241"
})
{:ok, %{"contact" => %{...}}}

Delete a contact

@spec get(integer()) :: {:ok, map()} | {:error, any()}

Retrieve a contact

examples

Examples

iex> ActiveCampaign.Contact.get(123)
{:ok, %{"contactDatum" => %{...}}}
Link to this function

get_account_contacts(id)

@spec get_account_contacts(integer()) :: {:ok, map()} | {:error, any()}

Retrieve a contacts account contacts

examples

Examples

iex> ActiveCampaign.Contact.get_account_contacts(123)
{:ok, %{"accountContacts" => []}}
Link to this function

get_automation_entry_counts(id)

@spec get_automation_entry_counts(integer()) :: {:ok, map()} | {:error, any()}

Retrieve a contacts automation entry counts

examples

Examples

iex> ActiveCampaign.Contact.get_automation_entry_counts(123)
{:ok, %{"automationEntryCounts" => []}}
Link to this function

get_bounce_logs(id)

@spec get_bounce_logs(integer()) :: {:ok, map()} | {:error, any()}

Retrieve a contact's bounce logs

examples

Examples

iex> ActiveCampaign.Contact.get_bounce_logs(123)
{:ok, %{"bounceLogs" => []}}
Link to this function

get_contact_deals(id)

@spec get_contact_deals(integer()) :: {:ok, map()} | {:error, any()}

Retrieve a list of contact's deals

examples

Examples

iex> ActiveCampaign.Contact.get_contact_deals(123)
{:ok, %{"contactDeals" => []}}
@spec get_data(integer()) :: {:ok, map()} | {:error, any()}

Retrieve a contact's data

examples

Examples

iex> ActiveCampaign.Contact.get_data(123)
{:ok, %{"contactDatum" => %{...}}}
@spec get_deals(integer()) :: {:ok, map()} | {:error, any()}

Retrieve a contact's deals

examples

Examples

iex> ActiveCampaign.Contact.get_deals(123)
{:ok, %{"deals" => []}}
Link to this function

get_field_values(id)

@spec get_field_values(integer()) :: {:ok, map()} | {:error, any()}

Retrieve a contact's field values

examples

Examples

iex> ActiveCampaign.Contact.get_deals(123)
{:ok, %{"fieldValues" => []}}
Link to this function

get_geo_ips(id)

@spec get_geo_ips(integer()) :: {:ok, map()} | {:error, any()}

Retrieve a contacts geo ips

examples

Examples

iex> ActiveCampaign.Contact.get_geo_ips(123)
{:ok, %{"geoIps" => []}}
@spec get_goals(integer()) :: {:ok, map()} | {:error, any()}

Retrieve a contact's goals

examples

Examples

iex> ActiveCampaign.Contact.get_goals(123)
{:ok, %{"contactGoals" => []}}
Link to this function

get_list_memberships(id)

@spec get_list_memberships(integer()) :: {:ok, map()} | {:error, any()}

Retrieve a contact's list memberships

examples

Examples

iex> ActiveCampaign.Contact.get_list_memberships(123)
{:ok, %{"contactLists" => []}}
@spec get_logs(integer()) :: {:ok, map()} | {:error, any()}

Retrieve a contact's logs

examples

Examples

iex> ActiveCampaign.Contact.get_logs(123)
{:ok, %{"contactLogs" => []}}
@spec get_notes(integer()) :: {:ok, map()} | {:error, any()}

Retrieve a contacts notes

examples

Examples

iex> ActiveCampaign.Contact.get_notes(123)
{:ok, %{"notes" => []}}
Link to this function

get_organization(id)

@spec get_organization(integer()) :: {:ok, map()} | {:error, any()}

Retrieve a contacts organization

Link to this function

get_plus_append(id)

@spec get_plus_append(integer()) :: {:ok, map()} | {:error, any()}

Retrieve a contacts plus append

examples

Examples

iex> ActiveCampaign.Contact.get_plus_append(123)
{:ok, %{}}

Retrieve a contact's score value

Link to this function

get_tracking_logs(id)

@spec get_tracking_logs(integer()) :: {:ok, map()} | {:error, any()}

Retrieve a contacts tracking logs

examples

Examples

iex> ActiveCampaign.Contact.get_tracking_logs(123)
{:ok, %{"trackingLogs" => []}}
Link to this function

list_activity(data)

@spec list_activity(map()) :: {:ok, map()} | {:error, any()}

List all contact activities

%{ contact: integer(), after: Date.t(), include: String.t(), emails: boolean(), orders: %{

tstamp: ASC

} }

examples

Examples

iex> ActiveCampaign.Contact.update_list_status(contact: 123)
{:ok, %{"activities" => [], "meta" => %{"total" => "0"}}}
Link to this function

list_automations(id)

List all automations the contact is in

List, search, and filter contacts

Sync a contact's data

Link to this function

update(id, data)

Update a contact

Link to this function

update_list_status(data)

Update list status for a contact

examples

Examples

iex> ActiveCampaign.Contact.update_list_status(%{
  list: 2,
  contact: 1,
  status: 1
})
# FIXME
{:ok, %{"message" => "Updated"}}