Infusionsoft v0.2.1 Infusionsoft View Source

Functions for interacting with Infusionsoft API.

One important thing to note is that if you have multiple custom fields with the same name, even if the capitalization is different, things may not work the way you expect.

The same is true for tags. If you need to support tags with the same name in different categories, you can provide the category name as an option in all tag calls. However, if you have multiple tags in the same category with the same name, things may not work the way you expect.

Link to this section Summary

Functions

Achieves a goal for a contact, with a specific integration name and call name

Creates a contact record in Infusionsoft without doing a dupe check

Retrieves a contact record from Infusionsoft

Updates a contact record from Infusionsoft

Link to this section Functions

Link to this function achieve_goal(contact_id, integration_name, call_name, token, app \\ nil) View Source
achieve_goal(integer(), String.t(), String.t(), String.t(), nil | String.t()) ::
  {:ok, list()} | {:error, String.t()}

Achieves a goal for a contact, with a specific integration name and call name.

Examples

iex> Infusionsoft.achieve_goal(12345, "test_token")
{:ok, [...]}
Link to this function create_contact(data, token, app \\ nil) View Source
create_contact(map(), String.t(), nil | String.t()) ::
  {:ok, integer()} | {:error, binary()}

Creates a contact record in Infusionsoft without doing a dupe check.

Examples

iex> Infusionsoft.create_contact(%{"First Name" => "Damon"}, "test_token")
{:ok, 12345}
Link to this function retrieve_contact(id, fields, token, app \\ nil) View Source
retrieve_contact(integer(), [String.t()], String.t(), nil | String.t()) ::
  {:ok, map()} | {:error, String.t()}

Retrieves a contact record from Infusionsoft.

Examples

iex> Infusionsoft.retrieve_contact(12345, ["First Name", "Last Name"], "test_token")
{:ok, %{"First Name" => "Damon", "Last Name" => "Janis"}}
Link to this function update_contact(id, data, token, app \\ nil) View Source
update_contact(integer(), map(), String.t(), nil | String.t()) ::
  {:ok, integer()} | {:error, String.t()}

Updates a contact record from Infusionsoft.

Examples

iex> Infusionsoft.update_contact(12345, %{"Nickname" => "Dame"}, "test_token")
{:ok, 12345}