eloqua

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package eloqua provides a client for accessing the Eloqua API.

Import the library.

```go import "github.com/clevertouch/go-eloqua/eloqua" ```

Create a new client as per the example below, passing in your Eloqua base URL, Company Name, User Name & Password. The base URL can be found by logging into your Eloqua instance and copying the resulting URL up to the end of `.com`. This library uses basic authentication to access your Eloqua instance. **Ensure you always use a base URL starting with `https://` to ensure you login details are transferred encrypted**.

```go client := eloqua.NewClient("https://secure.p01.eloqua.com", "CompanyName", "User.Name", "myPassWord") ``` You can then use this client to access all the services in this Library. Each of these services aligns with the API endpoints listed in the [Eloqua documentation](https://docs.oracle.com/cloud/latest/marketingcs_gs/OMCAB/#Developers/RESTAPI/REST-API.htm). For example, To get an email with an ID of 5 you'd do the following:

```go email, resp, err := client.Emails.Get(5) ```

When performing an update or create request all Eloqua-required properties are required by the method. Additional details can be sent by constructing an Eloqua entity and sending it as the last item in the method call. Here's an example of creating a landing page with additional non-required details.

```go // Constuct a landing page with our additional data

landingPageInput = &eloqua.LandingPage{
	MicrositeId:  5,
	RelativePath: "example-url",
	FolderID: 25
}

// Send the create request with our landing page name & above input landingPage, resp, err := client.LandingPages.Create("My new page", &landingPageInput)

```

For most listing requests you can pass through some listing options to control search, count & paging. Here's an example of listing out users:

```go listOptions := eloqua.ListOptions{Count: 5, Search: "name=test*", Page: 2} users, resp, err := client.Users.List(opts) ```

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Type          string `json:"type,omitempty"`
	CurrentStatus string `json:"currentStatus,omitempty"`
	ID            int    `json:"id,omitempty,string"`
	CreatedAt     int    `json:"createdAt,omitempty,string"`
	CreatedBy     int    `json:"createdBy,omitempty,string"`
	Depth         string `json:"depth,omitempty"`
	UpdatedAt     int    `json:"updatedAt,omitempty,string"`
	UpdatedBy     int    `json:"updatedBy,omitempty,string"`

	Name          string `json:"name,omitempty"`
	Address1      string `json:"address1,omitempty"`
	Address2      string `json:"address2,omitempty"`
	Address3      string `json:"address3,omitempty"`
	BusinessPhone string `json:"businessPhone,omitempty"`
	City          string `json:"city,omitempty"`
	Country       string `json:"country,omitempty"`
	PostalCode    string `json:"postalCode,omitempty"`
	Province      string `json:"province,omitempty"`

	FieldValues []FieldValue `json:"fieldValues,imitempty"`
}

Account represents an Eloqua email object. Fields that are not listed in the Account model itself can be retrieved/updated using the 'FieldValues' property.

type AccountService

type AccountService struct {
	// contains filtered or unexported fields
}

AccountService provides access to all the endpoints related to account data within eloqua

Eloqua API docs: https://goo.gl/s1bDwX

func (*AccountService) Create

func (e *AccountService) Create(name string, account *Account) (*Account, *Response, error)

Create a new account in eloqua

func (*AccountService) Delete

func (e *AccountService) Delete(id int) (*Response, error)

Delete an existing account from eloqua

func (*AccountService) Get

func (e *AccountService) Get(id int) (*Account, *Response, error)

Get an account object via its ID

func (*AccountService) List

func (e *AccountService) List(opts *ListOptions) ([]Account, *Response, error)

List many Eloqua account objects

func (*AccountService) Update

func (e *AccountService) Update(id int, name string, account *Account) (*Account, *Response, error)

Update an existing account in eloqua

type Activity

type Activity struct {
	Type         string           `json:"type,omitempty"`
	ActivityDate int              `json:"activityDate,omitempty,string"`
	ActivityType string           `json:"activityType,omitempty"`
	Asset        int              `json:"asset,omitempty,string"`
	AssetType    string           `json:"assetType,omitempty"`
	Contact      int              `json:"contact,omitempty,string"`
	ID           int              `json:"id,omitempty,string"`
	Details      []ActivityDetail `json:"details,omitempty"`
}

Activity represents an Eloqua activity objects.

type ActivityDetail

type ActivityDetail struct {
	Key   string `json:"Key,omitempty"`
	Value string `json:"Value,omitempty"`
}

ActivityDetail is a detail item that is provided with an activity. It is a key-value pair of information relating to the specific activity instance.

type ActivityService

type ActivityService struct {
	// contains filtered or unexported fields
}

ActivityService provides access to all the endpoints related to activity data within eloqua.

Eloqua API docs: https://goo.gl/MPj04g

func (*ActivityService) List

func (e *ActivityService) List(contactID int, activtyType string, startDate int, endDate int, count int) ([]Activity, *Response, error)

List many Eloqua activities. Due to this being an old 1.0 endpoint this does not give the usual listing result, It will only provide a simple list of activity items.

type Campaign

type Campaign struct {
	Type          string   `json:"type,omitempty"`
	CurrentStatus string   `json:"currentStatus,omitempty"`
	ID            int      `json:"id,omitempty,string"`
	CreatedAt     int      `json:"createdAt,omitempty,string"`
	CreatedBy     int      `json:"createdBy,omitempty,string"`
	Depth         string   `json:"depth,omitempty"`
	Description   string   `json:"description,omitempty"`
	FolderID      int      `json:"folderId,omitempty,string"`
	Name          string   `json:"name,omitempty"`
	Permissions   []string `json:"permissions,omitempty"`
	UpdatedAt     int      `json:"updatedAt,omitempty,string"`
	UpdatedBy     int      `json:"updatedBy,omitempty,string"`

	Elements     []CampaignElement `json:"elements,omitempty"`
	ActualCost   float32           `json:"actualCost,omitempty,string"`
	BudgetedCost float32           `json:"budgetedCost,omitempty,string"`
	CampaignType string            `json:"campaignType,omitempty"`
	FieldValues  []FieldValue      `json:"fieldValues,omitempty"`

	IsEmailMarketingCampaign bool   `json:"isEmailMarketingCampaign,omitempty,string"`
	IsMemberAllowedReEntry   bool   `json:"isMemberAllowedReEntry,omitempty,string"`
	IsReadOnly               bool   `json:"isReadOnly,omitempty,string"`
	IsIncludedInROI          bool   `json:"isIncludedInROI,omitempty,string"`
	IsSyncedWithCRM          bool   `json:"isSyncedWithCRM,omitempty,string"`
	RunAsUserID              int    `json:"runAsUserId,omitempty,string"`
	EndAt                    int    `json:"endAt,omitempty,string"`
	MemberCount              int    `json:"memberCount,omitempty,string"`
	CRMId                    string `json:"crmId,omitempty"`
	Product                  string `json:"product,omitempty"`
	Region                   string `json:"region,omitempty"`
	CampaignCategory         string `json:"campaignCategory,omitempty"`
}

Campaign represents an Eloqua campaign object. Campaigns are often in other Eloqua models such as Emails & Landing Pages

type CampaignElement

type CampaignElement struct {
	Type            string                   `json:"type,omitempty"`
	ID              int                      `json:"id,omitempty,string"`
	Name            string                   `json:"name,omitempty"`
	MemberCount     int                      `json:"memberCount,omitempty,string"`
	OutputTerminals []CampaignOutputTerminal `json:"outputTerminals,omitempty"`
	Position        Position                 `json:"position,omitempty"`
}

CampaignElement represents a generic Eloqua campaign step. Steps do have their own action-specific properties but, for simplicity, only the common properties are used below.

type CampaignOutputTerminal

type CampaignOutputTerminal struct {
	Type          string `json:"type,omitempty"`
	ID            int    `json:"id,omitempty,string"`
	ConnectedID   int    `json:"connectedId,omitempty,string"`
	ConnectedType string `json:"connectedType,omitempty"`
	TerminalType  string `json:"terminalType,omitempty"`
}

CampaignOutputTerminal represents the output flows of an element on a campaign.

type CampaignService

type CampaignService struct {
	// contains filtered or unexported fields
}

CampaignService provides access to all the endpoints related to campaign data within eloqua

Eloqua API docs: https://goo.gl/vWFRBX

func (*CampaignService) Create

func (e *CampaignService) Create(name string, campaign *Campaign) (*Campaign, *Response, error)

Create a new campaign in eloqua

func (*CampaignService) Delete

func (e *CampaignService) Delete(id int) (*Response, error)

Delete an existing campaign from eloqua

func (*CampaignService) Get

func (e *CampaignService) Get(id int) (*Campaign, *Response, error)

Get an campaign object via its ID

func (*CampaignService) List

func (e *CampaignService) List(opts *ListOptions) ([]Campaign, *Response, error)

List many eloqua campaigns

func (*CampaignService) Update

func (e *CampaignService) Update(id int, name string, campaign *Campaign) (*Campaign, *Response, error)

Update an existing campaign in eloqua

type Client

type Client struct {

	// The base URL for the eloqua instance
	BaseURL string

	// The service endpoints of the API
	Accounts           *AccountService
	Activities         *ActivityService
	Campaigns          *CampaignService
	Contacts           *ContactService
	ContactFields      *ContactFieldService
	ContactLists       *ContactListService
	ContactSegments    *ContactSegmentService
	ContentSections    *ContentSectionService
	CustomObjects      *CustomObjectService
	CustomObjectData   *CustomObjectDataService
	Emails             *EmailService
	EmailFolders       *EmailFolderService
	EmailGroups        *EmailGroupService
	EmailHeaders       *EmailHeaderService
	EmailFooters       *EmailFooterService
	ExternalActivity   *ExternalActivityService
	ExternalAssets     *ExternalAssetService
	ExternalAssetTypes *ExternalAssetTypeService
	Forms              *FormService
	FormData           *FormDataService
	Images             *ImageService
	LandingPages       *LandingPageService
	Microsites         *MicrositeService
	OptionLists        *OptionListService
	Users              *UserService
	Visitors           *VisitorService
	// contains filtered or unexported fields
}

Client manages communications with the Eloqua API. It contains services to access each endpoint grouping so the API can be used in a fluent manner.

func NewClient

func NewClient(baseURL string, companyName string, userName string, password string) *Client

NewClient creates a new instance of an Eloqua HTTP client used to interface with the Eloqua API.

func (*Client) RestRequest

func (c *Client) RestRequest(endpoint string, method string, jsonData string) (*Response, error)

RestRequest provides a generic way to make a request to the Eloqua API. It's very general but simple performs much of the boilerplate request actions such as setting the correct api url and adding auth headers.

type Contact

type Contact struct {
	Type          string `json:"type,omitempty"`
	CurrentStatus string `json:"currentStatus,omitempty"`
	ID            int    `json:"id,omitempty,string"`
	CreatedAt     int    `json:"createdAt,omitempty,string"`
	Depth         string `json:"depth,omitempty"`
	// This actually relates to the contact's email address
	// rather than the contacts name
	Name          string `json:"name,omitempty"`
	UpdatedAt     int    `json:"updatedAt,omitempty,string"`
	AccountName   string `json:"accountName,omitempty"`
	BusinessPhone string `json:"businessPhone,omitempty"`
	Country       string `json:"country,omitempty"`

	EmailAddress          string `json:"emailAddress,omitempty"`
	EmailFormatPreference string `json:"emailFormatPreference,omitempty"`
	FirstName             string `json:"firstName,omitempty"`
	LastName              string `json:"lastName,omitempty"`
	PostalCode            string `json:"postalCode,omitempty"`
	Province              string `json:"province,omitempty"`
	SalesPerson           string `json:"salesPerson,omitempty"`
	// Job title, Not name title
	Title string `json:"title,omitempty"`

	SubscriptionDate int          `json:"subscriptionDate,omitempty,string"`
	IsBounceBack     bool         `json:"isBounceBack,omitempty,string"`
	IsSubscribed     bool         `json:"isSubscribed,imitempty,string"`
	FieldValues      []FieldValue `json:"fieldValues,imitempty"`
}

Contact represents an Eloqua contact object. Fields that are not listed in the Contact model itself can be retrieved/updated using the 'FieldValues' property.

type ContactField

type ContactField struct {
	Type      string `json:"type,omitempty"`
	ID        int    `json:"id,omitempty,string"`
	CreatedAt int    `json:"createdAt,omitempty,string"`
	Depth     string `json:"depth,omitempty"`
	Name      string `json:"name,omitempty"`
	UpdatedAt int    `json:"updatedAt,omitempty,string"`

	DataType     string `json:"dataType,omitempty"`
	DisplayType  string `json:"displayType,omitempty"`
	InternalName string `json:"internalName,omitempty"`
	IsReadOnly   bool   `json:"isReadOnly,string"`
	IsRequired   bool   `json:"isRequired,string"`
	IsStandard   bool   `json:"isStandard,string"`
	IsProtected  bool   `json:"isProtected,string"`

	IsPopulatedInOutlookPlugin bool   `json:"isPopulatedInOutlookPlugin,string"`
	UpdateType                 string `json:"updateType,omitempty"`
}

ContactField represents an Eloqua contact field object. Fields that are not listed in the ContactField model itself can be retrieved/updated using the 'FieldValues' property.

type ContactFieldCriterion

type ContactFieldCriterion struct {
	Type      string             `json:"type,omitempty"`
	ID        int                `json:"id,omitempty,string"`
	FieldID   int                `json:"fieldId,omitempty,string"`
	Condition TextValueCondition `json:"condition,omitempty"`
}

ContactFieldCriterion is a simple criteria for finding a match against the contact record.

type ContactFieldService

type ContactFieldService struct {
	// contains filtered or unexported fields
}

ContactFieldService provides access to all the endpoints related to contact field data within eloqua

Eloqua API docs: https://goo.gl/Y8sF8P

func (*ContactFieldService) Create

func (e *ContactFieldService) Create(name string, dataType string, displayType string, updateType string, contactField *ContactField) (*ContactField, *Response, error)

Create a new contact field in eloqua

func (*ContactFieldService) Delete

func (e *ContactFieldService) Delete(id int) (*Response, error)

Delete an existing contact field from eloqua

func (*ContactFieldService) Get

Get an contact field object via its ID

func (*ContactFieldService) List

List many eloqua contact fields

func (*ContactFieldService) Update

func (e *ContactFieldService) Update(id int, name string, dataType string, displayType string, updateType string, contactField *ContactField) (*ContactField, *Response, error)

Update an existing contact field in eloqua

type ContactList

type ContactList struct {
	Type         string   `json:"type,omitempty"`
	ID           int      `json:"id,omitempty,string"`
	CreatedAt    int      `json:"createdAt,omitempty,string"`
	Depth        string   `json:"depth,omitempty"`
	Name         string   `json:"name,omitempty"`
	Description  string   `json:"description,omitempty"`
	UpdatedAt    int      `json:"updatedAt,omitempty,string"`
	FolderID     int      `json:"folderId,omitempty,string"`
	Permissions  []string `json:"permissions,omitempty"`
	Count        int      `json:"count,omitempty,string"`
	DataLookupID string   `json:"dataLookupId,omitempty"`
	Scope        string   `json:"scope,omitempty"`

	// Used to add contact ID's to to add or delete from a list
	// Writeonly, Not listed in official Eloqua developer documents
	MembershipAdditions []int `json:"membershipAdditions,omitempty,string"`
	MembershipDeletions []int `json:"membershipDeletions,omitempty,string"`
}

ContactList represents an Eloqua contact list object.

type ContactListService

type ContactListService struct {
	// contains filtered or unexported fields
}

ContactListService provides access to all the endpoints related to contact list data within eloqua

Eloqua API docs: https://goo.gl/iDY0iy

func (*ContactListService) Create

func (e *ContactListService) Create(name string, contactList *ContactList) (*ContactList, *Response, error)

Create a new contact list in eloqua

func (*ContactListService) Delete

func (e *ContactListService) Delete(id int) (*Response, error)

Delete an existing contact list from eloqua

func (*ContactListService) Get

func (e *ContactListService) Get(id int) (*ContactList, *Response, error)

Get a contact list object via its ID

func (*ContactListService) List

List many eloqua contact lists

func (*ContactListService) Update

func (e *ContactListService) Update(id int, name string, contactList *ContactList) (*ContactList, *Response, error)

Update an existing contact list in eloqua

type ContactSegment

type ContactSegment struct {
	Type          string `json:"type,omitempty"`
	CurrentStatus string `json:"currentStatus,omitempty"`
	ID            int    `json:"id,omitempty,string"`
	CreatedAt     int    `json:"createdAt,omitempty,string"`
	CreatedBy     int    `json:"createdBy,omitempty,string"`
	Depth         string `json:"depth,omitempty"`

	Name        string   `json:"name,omitempty"`
	Description string   `json:"description,omitempty"`
	FolderID    int      `json:"folderId,omitempty,string"`
	UpdatedAt   int      `json:"updatedAt,omitempty,string"`
	UpdatedBy   int      `json:"updatedBy,omitempty,string"`
	Permissions []string `json:"permissions,omitempty"`
	Count       int      `json:"count,omitempty,string"`
}

ContactSegment represents an Eloqua contact segment object.

type ContactSegmentService

type ContactSegmentService struct {
	// contains filtered or unexported fields
}

ContactSegmentService provides access to all the endpoints related to contact segment data within eloqua

Eloqua API docs: https://goo.gl/LdUrZH

func (*ContactSegmentService) Create

func (e *ContactSegmentService) Create(name string, contactSegment *ContactSegment) (*ContactSegment, *Response, error)

Create a new contact segment in eloqua

func (*ContactSegmentService) Delete

func (e *ContactSegmentService) Delete(id int) (*Response, error)

Delete an existing contact segment from eloqua

func (*ContactSegmentService) Get

Get an contact segment object via its ID

func (*ContactSegmentService) List

List many eloqua contact segments

func (*ContactSegmentService) Update

func (e *ContactSegmentService) Update(id int, name string, contactSegment *ContactSegment) (*ContactSegment, *Response, error)

Update an existing contact segment in eloqua

type ContactService

type ContactService struct {
	// contains filtered or unexported fields
}

ContactService provides access to all the endpoints related to contact data within eloqua

Eloqua API docs: https://goo.gl/Gr4ln4

func (*ContactService) Create

func (e *ContactService) Create(emailAddress string, contact *Contact) (*Contact, *Response, error)

Create a new contact in eloqua The email must not already exists otherwise Eloqua will return an error.

func (*ContactService) Delete

func (e *ContactService) Delete(id int) (*Response, error)

Delete an existing contact from eloqua

func (*ContactService) Get

func (e *ContactService) Get(id int) (*Contact, *Response, error)

Get an contact object via its ID

func (*ContactService) List

func (e *ContactService) List(opts *ListOptions) ([]Contact, *Response, error)

List many Eloqua contact objects

func (*ContactService) Update

func (e *ContactService) Update(id int, emailAddress string, contact *Contact) (*Contact, *Response, error)

Update an existing contact in eloqua

type ContentSection

type ContentSection struct {
	Type        string      `json:"type,omitempty"`
	ID          int         `json:"id,omitempty,string"`
	CreatedAt   int         `json:"createdAt,omitempty,string"`
	CreatedBy   int         `json:"createdBy,omitempty,string"`
	Depth       string      `json:"depth,omitempty"`
	Name        string      `json:"name,omitempty"`
	Description string      `json:"description,omitempty"`
	UpdatedAt   int         `json:"updatedAt,omitempty,string"`
	UpdatedBy   int         `json:"updatedBy,omitempty,string"`
	ContentHTML string      `json:"contentHtml,omitempty"`
	ContentText string      `json:"contentText,omitempty"`
	Scope       string      `json:"scope,omitempty"`
	Forms       []Form      `json:"forms,omitempty"`
	Hyperlinks  []Hyperlink `json:"hyperlinks,omitempty"`
	Images      []Image     `json:"images,omitempty"`
	Size        Size        `json:"size,omitempty"`
}

ContentSection represents an Eloqua content section object. In Eloqua these are known as 'Shared Content'

type ContentSectionService

type ContentSectionService struct {
	// contains filtered or unexported fields
}

ContentSectionService provides access to all the endpoints related to content section data within eloqua

Eloqua API docs: https://goo.gl/cKpFbL

func (*ContentSectionService) Create

func (e *ContentSectionService) Create(name string, contentSection *ContentSection) (*ContentSection, *Response, error)

Create a new content section in eloqua

func (*ContentSectionService) Delete

func (e *ContentSectionService) Delete(id int) (*Response, error)

Delete an existing content section from eloqua

func (*ContentSectionService) Get

Get a content section object via its ID

func (*ContentSectionService) List

List many eloqua content sections

func (*ContentSectionService) Update

func (e *ContentSectionService) Update(id int, name string, contentSection *ContentSection) (*ContentSection, *Response, error)

Update an existing content section in eloqua

type CustomObject

type CustomObject struct {
	Type        string `json:"type,omitempty"`
	ID          int    `json:"id,omitempty,string"`
	CreatedAt   int    `json:"createdAt,omitempty,string"`
	CreatedBy   int    `json:"createdBy,omitempty,string"`
	Depth       string `json:"depth,omitempty"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	UpdatedAt   int    `json:"updatedAt,omitempty,string"`
	UpdatedBy   int    `json:"updatedBy,omitempty,string"`

	DisplayNameFieldID string              `json:"displayNameFieldId,omitempty"`
	ContentText        string              `json:"contentText,omitempty"`
	RecordCount        int                 `json:"recordCount,omitempty"`
	Fields             []CustomObjectField `json:"fields,omitempty"`
}

CustomObject represents an Eloqua custom object. These fields are taken from an API response since the Eloqua documentation ,at the time of building, did not appear to be correct.

type CustomObjectData

type CustomObjectData struct {
	Type        string       `json:"type,omitempty"`
	Name        string       `json:"name,omitempty"`
	ID          int          `json:"id,omitempty,string"`
	FieldValues []FieldValue `json:"fieldValues,omitempty"`
	UniqueCode  string       `json:"uniqueCode,omitempty"`
	CreatedAt   int          `json:"createdAt,omitempty,string"`
}

CustomObjectData represents an Eloqua custom object record. Some of the endpoints for CustomObjectData are not official listed within the Eloqua documentation so may be more prone to breaking.

type CustomObjectDataService

type CustomObjectDataService struct {
	// contains filtered or unexported fields
}

CustomObjectDataService provides access to all the endpoints related to custom object data within eloqua

Eloqua API docs: https://goo.gl/XmjLBw

func (*CustomObjectDataService) Create

func (e *CustomObjectDataService) Create(cdoID int, customObjectData *CustomObjectData) (*CustomObjectData, *Response, error)

Create a new custom object record in eloqua

func (*CustomObjectDataService) Delete

func (e *CustomObjectDataService) Delete(cdoID int, id int) (*Response, error)

Delete an existing custom object record from eloqua

func (*CustomObjectDataService) Get

Get a custom object data record via its ID, Within the CDO of the given cdoID.

func (*CustomObjectDataService) List

List many eloqua custom object records

func (*CustomObjectDataService) Update

func (e *CustomObjectDataService) Update(cdoID int, id int, customObjectData *CustomObjectData) (*CustomObjectData, *Response, error)

Update an existing custom object in eloqua To actually update the cdo record value ensure you pass a customObjectData model with its FieldValues filled.

type CustomObjectField

type CustomObjectField struct {
	Type         string `json:"type,omitempty"`
	ID           int    `json:"id,omitempty,string"`
	Depth        string `json:"depth,omitempty"`
	Name         string `json:"name,omitempty"`
	DataType     string `json:"dataType,omitempty"`
	DefaultValue string `json:"defaultValue,omitempty"`
	DisplayType  string `json:"displayType,omitempty"`
	InternalName string `json:"internalName,omitempty"`
}

CustomObjectField represents a database field within an Eloqua custom data object.

type CustomObjectService

type CustomObjectService struct {
	// contains filtered or unexported fields
}

CustomObjectService provides access to all the endpoints related to custom object data within eloqua

Eloqua API docs: https://goo.gl/cQyZYx

func (*CustomObjectService) Create

func (e *CustomObjectService) Create(name string, customObject *CustomObject) (*CustomObject, *Response, error)

Create a new custom object in eloqua

func (*CustomObjectService) Delete

func (e *CustomObjectService) Delete(id int) (*Response, error)

Delete an existing custom object from eloqua

func (*CustomObjectService) Get

Get a custom object via its ID

func (*CustomObjectService) List

List many eloqua custom objects

func (*CustomObjectService) Update

func (e *CustomObjectService) Update(id int, name string, customObject *CustomObject) (*CustomObject, *Response, error)

Update an existing custom object in eloqua

type DynamicContent

type DynamicContent struct {
	Type        string               `json:"type,omitempty"`
	ID          int                  `json:"id,omitempty,string"`
	Depth       string               `json:"depth,omitempty"`
	Name        string               `json:"name,omitempty"`
	FolderID    int                  `json:"folderId,omitempty,string"`
	UpdatedAt   int                  `json:"updatedAt,omitempty,string"`
	UpdatedBy   int                  `json:"updatedBy,omitempty,string"`
	CreatedAt   int                  `json:"createdAt,omitempty,string"`
	CreatedBy   int                  `json:"createdBy,omitempty,string"`
	Permissions []string             `json:"permissions,omitempty"`
	Rules       []DynamicContentRule `json:"rules,omitempty"`
}

DynamicContent represents Eloqua Dynamic Content objects. These can be found as part of emails or landing pages.

type DynamicContentRule

type DynamicContentRule struct {
	Type           string                  `json:"type,omitempty"`
	ID             int                     `json:"id,omitempty,string"`
	ContentSection DynamicContentSection   `json:"contentSection,omitempty"`
	Depth          string                  `json:"depth,omitempty"`
	Statement      int                     `json:"statement,omitempty,string"`
	Criteria       []ContactFieldCriterion `json:"criteria,omitempty"`
}

DynamicContentRule specifies the conditions for Dynamic Content to be shown.

type DynamicContentSection

type DynamicContentSection struct {
	Type        string      `json:"type,omitempty"`
	ID          int         `json:"id,omitempty,string"`
	Depth       string      `json:"depth,omitempty"`
	Name        string      `json:"name,omitempty"`
	FolderID    int         `json:"folderId,omitempty,string"`
	Permissions []string    `json:"permissions,omitempty"`
	UpdatedAt   int         `json:"updatedAt,omitempty,string"`
	UpdatedBy   int         `json:"updatedBy,omitempty,string"`
	CreatedAt   int         `json:"createdAt,omitempty,string"`
	CreatedBy   int         `json:"createdBy,omitempty,string"`
	ContentHTML string      `json:"contentHtml,omitempty"`
	ContentText string      `json:"contentText,omitempty"`
	Forms       []Form      `json:"forms,omitempty"`
	Hyperlinks  []Hyperlink `json:"hyperlinks,omitempty"`
	Images      []Image     `json:"images,omitempty"`
	Scope       string      `json:"scope,omitempty"`
	Size        Size        `json:"size,omitempty"`
}

DynamicContentSection represents the 'section' of content of an Eloqua dynmaic content object.

type Email

type Email struct {
	Type              string           `json:"type,omitempty"`
	CurrentStatus     string           `json:"currentStatus,omitempty"`
	ID                int              `json:"id,omitempty,string"`
	CreatedAt         int              `json:"createdAt,omitempty,string"`
	CreatedBy         int              `json:"createdBy,omitempty,string"`
	Depth             string           `json:"depth,omitempty"`
	FolderID          int              `json:"folderId,omitempty,string"`
	Name              string           `json:"name,omitempty"`
	Permissions       []string         `json:"permissions,omitempty"`
	UpdatedAt         int              `json:"updatedAt,omitempty,string"`
	UpdatedBy         int              `json:"updatedBy,omitempty,string"`
	BounceBackEmail   string           `json:"bounceBackEmail,omitempty"`
	ContentSections   []ContentSection `json:"contentSections,omitempty"`
	DynamicContents   []DynamicContent `json:"dynamicContents,omitempty"`
	EmailFooterID     int              `json:"emailFooterId,omitempty,string"`
	EmailHeaderID     int              `json:"emailHeaderId,omitempty,string"`
	EmailGroupID      int              `json:"emailGroupId,omitempty,string"`
	EncodingID        int              `json:"encodingId,omitempty,string"`
	Forms             []Form           `json:"forms,omitempty"`
	FieldMerges       []FieldMerge     `json:"fieldMerges,omitempty"`
	HTMLContent       HTMLContent      `json:"htmlContent,omitempty"`
	Hyperlinks        []Hyperlink      `json:"hyperlinks,omitempty"`
	Images            []Image          `json:"images,omitempty"`
	LandingPages      []LandingPage    `json:"landingPages,omitempty"`
	PlainTextEditable bool             `json:"isPlainTextEditable,omitempty,string"`
	Tracked           bool             `json:"isTracked,omitempty,string"`
	Subject           string           `json:"subject,omitempty"`
	Layout            string           `json:"layout,omitempty"`
	PlainText         string           `json:"plainText,omitempty"`
	ReplyToEmail      string           `json:"replyToEmail,omitempty"`
	ReplyToName       string           `json:"replyToName,omitempty"`
	SendPlainTextOnly bool             `json:"sendPlainTextOnly,omitempty,string"`
	SenderEmail       string           `json:"senderEmail,omitempty"`
	SenderName        string           `json:"senderName,omitempty"`
	Style             string           `json:"style,omitempty"`
}

Email represents an Eloqua email object.

type EmailFolder

type EmailFolder struct {
	Type      string `json:"type,omitempty"`
	ID        int    `json:"id,omitempty,string"`
	CreatedAt int    `json:"createdAt,omitempty,string"`
	Depth     string `json:"depth,omitempty"`

	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	FolderID    int    `json:"folderId,omitempty,string"`
	UpdatedAt   int    `json:"updatedAt,omitempty,string"`
	UpdatedBy   int    `json:"updatedBy,omitempty,string"`
	IsSystem    bool   `json:"isSystem,omitempty,string"`
	Archive     bool   `json:"archive,omitempty,string"`
}

EmailFolder represents an Eloqua email folder object.

type EmailFolderService

type EmailFolderService struct {
	// contains filtered or unexported fields
}

EmailFolderService provides access to all the endpoints related to email folder data within eloqua

Eloqua API docs: https://goo.gl/g8h8BN

func (*EmailFolderService) Create

func (e *EmailFolderService) Create(name string, emailFolder *EmailFolder) (*EmailFolder, *Response, error)

Create a new email folder in eloqua

func (*EmailFolderService) Delete

func (e *EmailFolderService) Delete(id int) (*Response, error)

Delete an existing email folder from eloqua

func (*EmailFolderService) Get

func (e *EmailFolderService) Get(id int) (*EmailFolder, *Response, error)

Get an email folder object via its ID

func (*EmailFolderService) List

List many eloqua email folders

func (*EmailFolderService) Update

func (e *EmailFolderService) Update(id int, name string, emailFolder *EmailFolder) (*EmailFolder, *Response, error)

Update an existing email folder in eloqua

type EmailFooter

type EmailFooter struct {
	Type      string `json:"type,omitempty"`
	ID        int    `json:"id,omitempty,string"`
	CreatedAt int    `json:"createdAt,omitempty,string"`
	CreatedBy int    `json:"createdBy,omitempty,string"`
	Depth     string `json:"depth,omitempty"`

	Name        string   `json:"name,omitempty"`
	Description string   `json:"description,omitempty"`
	Permissions []string `json:"permissions,omitempty"`
	FolderID    int      `json:"folderId,omitempty,string"`
	UpdatedAt   int      `json:"updatedAt,omitempty,string"`
	UpdatedBy   int      `json:"updatedBy,omitempty,string"`

	Body                string `json:"body,omitempty"`
	PlainText           string `json:"plainText,omitempty"`
	IsPlainTextEditable bool   `json:"isPlainTextEditable,omitempty,string"`

	FieldMerges []FieldMerge `json:"fieldMerges,omitempty"`
	Images      []Image      `json:"images,omitempty"`
	Hyperlinks  []Hyperlink  `json:"hyperlinks,omitempty"`
}

EmailFooter represents an Eloqua email footer object.

type EmailFooterService

type EmailFooterService struct {
	// contains filtered or unexported fields
}

EmailFooterService provides access to all the endpoints related to email footer data within eloqua

The official Eloqua documentation did not seem to contain footers but everything appears to be the same as EmailHeaders references in the below link. Eloqua API docs: https://goo.gl/aCdAXT

func (*EmailFooterService) Create

func (e *EmailFooterService) Create(name string, emailFooter *EmailFooter) (*EmailFooter, *Response, error)

Create a new email footer in eloqua

func (*EmailFooterService) Delete

func (e *EmailFooterService) Delete(id int) (*Response, error)

Delete an existing email footer from eloqua

func (*EmailFooterService) Get

func (e *EmailFooterService) Get(id int) (*EmailFooter, *Response, error)

Get an email footer object via its ID

func (*EmailFooterService) List

List many eloqua email footers

func (*EmailFooterService) Update

func (e *EmailFooterService) Update(id int, name string, emailFooter *EmailFooter) (*EmailFooter, *Response, error)

Update an existing email footer in eloqua

type EmailGroup

type EmailGroup struct {
	Type          string   `json:"type,omitempty"`
	ID            int      `json:"id,omitempty,string"`
	CreatedAt     int      `json:"createdAt,omitempty,string"`
	CreatedBy     int      `json:"createdBy,omitempty,string"`
	Depth         string   `json:"depth,omitempty"`
	Name          string   `json:"name,omitempty"`
	Permissions   []string `json:"permissions,omitempty"`
	Description   string   `json:"description,omitempty"`
	UpdatedAt     int      `json:"updatedAt,omitempty,string"`
	UpdatedBy     int      `json:"updatedBy,omitempty,string"`
	EmailHeaderID int      `json:"emailHeaderId,omitempty,string"`
	EmailFooterID int      `json:"emailFooterId,omitempty,string"`
	EmailIDs      []int    `json:"emailIds,omitempty,string"`

	IsVisibleInOutlookPlugin          bool   `json:"isVisibleInOutlookPlugin,omitempty,string"`
	IsVisibleInPublicSubscriptionList bool   `json:"isVisibleInPublicSubscriptionList,omitempty,string"`
	SubscriptionListDataLookupID      string `json:"subscriptionListDataLookupId,omitempty"`
	SubscriptionListID                int    `json:"subscriptionListId,omitempty,string"`
	SubscriptionLandingPageID         int    `json:"subscriptionLandingPageId,omitempty,string"`
	UnSubscriptionListDataLookupID    string `json:"unSubscriptionListDataLookupId,omitempty"`
	UnSubscriptionListID              int    `json:"unSubscriptionListId,omitempty,string"`
	UnsubscriptionLandingPageID       int    `json:"unsubscriptionLandingPageId,omitempty,string"`
}

EmailGroup represents an Eloqua email group object.

type EmailGroupService

type EmailGroupService struct {
	// contains filtered or unexported fields
}

EmailGroupService provides access to all the endpoints related to email group data within eloqua

Eloqua API docs: https://goo.gl/e21Rrq

func (*EmailGroupService) Create

func (e *EmailGroupService) Create(name string, emailGroup *EmailGroup) (*EmailGroup, *Response, error)

Create a new email group in eloqua During testing subscriptionLandingPageId & subscriptionLandingPageId seemed to be required but as this is not as per the documentation it is not required in this method. If you get ObjectValidationError's it may be due to this.

func (*EmailGroupService) Delete

func (e *EmailGroupService) Delete(id int) (*Response, error)

Delete an existing email group from eloqua

func (*EmailGroupService) Get

func (e *EmailGroupService) Get(id int) (*EmailGroup, *Response, error)

Get a email group object via its ID

func (*EmailGroupService) List

func (e *EmailGroupService) List(opts *ListOptions) ([]EmailGroup, *Response, error)

List many eloqua email groups

func (*EmailGroupService) Update

func (e *EmailGroupService) Update(id int, name string, emailGroup *EmailGroup) (*EmailGroup, *Response, error)

Update an existing email group in eloqua During testing subscriptionLandingPageId & subscriptionLandingPageId seemed to be required but as this is not as per the documentation it is not required in this method. If you get ObjectValidationError's it may be due to this.

type EmailHeader

type EmailHeader struct {
	Type      string `json:"type,omitempty"`
	ID        int    `json:"id,omitempty,string"`
	CreatedAt int    `json:"createdAt,omitempty,string"`
	CreatedBy int    `json:"createdBy,omitempty,string"`
	Depth     string `json:"depth,omitempty"`

	Name        string   `json:"name,omitempty"`
	Description string   `json:"description,omitempty"`
	Permissions []string `json:"permissions,omitempty"`
	FolderID    int      `json:"folderId,omitempty,string"`
	UpdatedAt   int      `json:"updatedAt,omitempty,string"`
	UpdatedBy   int      `json:"updatedBy,omitempty,string"`

	Body                string `json:"body,omitempty"`
	PlainText           string `json:"plainText,omitempty"`
	IsPlainTextEditable bool   `json:"isPlainTextEditable,omitempty,string"`

	FieldMerges []FieldMerge `json:"hyperlinks,fieldMerges"`
	Images      []Image      `json:"images,omitempty"`
	Hyperlinks  []Hyperlink  `json:"hyperlinks,omitempty"`
}

EmailHeader represents an Eloqua email header object.

type EmailHeaderService

type EmailHeaderService struct {
	// contains filtered or unexported fields
}

EmailHeaderService provides access to all the endpoints related to email header data within eloqua

Eloqua API docs: https://goo.gl/aCdAXT

func (*EmailHeaderService) Create

func (e *EmailHeaderService) Create(name string, emailHeader *EmailHeader) (*EmailHeader, *Response, error)

Create a new email header in eloqua

func (*EmailHeaderService) Delete

func (e *EmailHeaderService) Delete(id int) (*Response, error)

Delete an existing email header from eloqua

func (*EmailHeaderService) Get

func (e *EmailHeaderService) Get(id int) (*EmailHeader, *Response, error)

Get an email header object via its ID

func (*EmailHeaderService) List

List many eloqua email headers

func (*EmailHeaderService) Update

func (e *EmailHeaderService) Update(id int, name string, emailHeader *EmailHeader) (*EmailHeader, *Response, error)

Update an existing email header in eloqua

type EmailService

type EmailService struct {
	// contains filtered or unexported fields
}

EmailService provides access to all the endpoints related to email assets within eloqua

Eloqua API docs: https://goo.gl/BaqLvm

func (*EmailService) Create

func (e *EmailService) Create(name string, email *Email) (*Email, *Response, error)

Create a new email in eloqua

func (*EmailService) Delete

func (e *EmailService) Delete(id int) (*Response, error)

Delete an existing email from eloqua

func (*EmailService) Get

func (e *EmailService) Get(id int) (*Email, *Response, error)

Get an email object via its ID

func (*EmailService) List

func (e *EmailService) List(opts *ListOptions) ([]Email, *Response, error)

List many Eloqua email objetcs

func (*EmailService) Update

func (e *EmailService) Update(id int, name string, email *Email) (*Email, *Response, error)

Update an existing email in eloqua

type ExternalActivity

type ExternalActivity struct {
	Type         string `json:"type,omitempty"`
	ID           int    `json:"id,omitempty,string"`
	Depth        string `json:"depth,omitempty"`
	Name         string `json:"name,omitempty"`
	ActivityDate int    `json:"activityDate,omitempty,string"`
	ActivityType string `json:"activityType,omitempty"`
	AssetName    string `json:"assetName,omitempty"`
	AssetType    string `json:"assetType,omitempty"`
	ContactID    int    `json:"contactId,omitempty"`
	CampaignID   int    `json:"campaignId,omitempty"`
}

ExternalActivity represents an Eloqua External Activity object.

type ExternalActivityService

type ExternalActivityService struct {
	// contains filtered or unexported fields
}

ExternalActivityService provides access to all the endpoints related to External Activity data within eloqua.

Eloqua API docs: https://goo.gl/M7Fm5F

func (*ExternalActivityService) Create

func (e *ExternalActivityService) Create(name string, assetName string, assetType string, activityType string,
	campaignID int, contactID int, externalActivity *ExternalActivity) (*ExternalActivity, *Response, error)

Create a new External Activity in eloqua. This method call is long due to the amount of required fields at this endpoint. Although ActivityDate is not required for creation, you should pass it through on the final parameter as eloqua will not set this automatically as the current time.

func (*ExternalActivityService) Get

Get an externalActivity object via its ID

type ExternalActivityType

type ExternalActivityType struct {
	Type      string `json:"type,omitempty"`
	ID        int    `json:"id,omitempty,string"`
	CreatedAt int    `json:"createdAt,omitempty,string"`
	CreatedBy int    `json:"createdBy,omitempty,string"`
	Depth     string `json:"depth,omitempty"`
	Name      string `json:"name,omitempty"`
	UpdatedAt int    `json:"updatedAt,omitempty,string"`
	UpdatedBy int    `json:"updatedBy,omitempty,string"`
}

ExternalActivityType represents a 'Type' of external activity.

type ExternalAsset

type ExternalAsset struct {
	Type                string `json:"type,omitempty"`
	ID                  int    `json:"id,omitempty,string"`
	CreatedAt           int    `json:"createdAt,omitempty,string"`
	CreatedBy           int    `json:"createdBy,omitempty,string"`
	Depth               string `json:"depth,omitempty"`
	Name                string `json:"name,omitempty"`
	UpdatedAt           int    `json:"updatedAt,omitempty,string"`
	UpdatedBy           int    `json:"updatedBy,omitempty,string"`
	ExternalAssetTypeID int    `json:"externalAssetTypeId,omitempty,string"`
}

ExternalAsset represents an Eloqua ExternalAsset object.

type ExternalAssetService

type ExternalAssetService struct {
	// contains filtered or unexported fields
}

ExternalAssetService provides access to all the endpoints related to External Assets within eloqua

Eloqua API docs: https://goo.gl/lntJIr

func (*ExternalAssetService) Create

func (e *ExternalAssetService) Create(name string, externalAsset *ExternalAsset) (*ExternalAsset, *Response, error)

Create a new externalAsset in eloqua

func (*ExternalAssetService) Delete

func (e *ExternalAssetService) Delete(id int) (*Response, error)

Delete an existing externalAsset from eloqua During testing this did not seem to function but it is in the documentation and does not return an error so it will remain for now.

func (*ExternalAssetService) Get

Get an externalAsset object via its ID

func (*ExternalAssetService) List

List many eloqua externalAssets

func (*ExternalAssetService) Update

func (e *ExternalAssetService) Update(id int, name string, externalAsset *ExternalAsset) (*ExternalAsset, *Response, error)

Update an existing externalAsset in eloqua

type ExternalAssetType

type ExternalAssetType struct {
	Type          string                 `json:"type,omitempty"`
	ID            int                    `json:"id,omitempty,string"`
	CreatedAt     int                    `json:"createdAt,omitempty,string"`
	CreatedBy     int                    `json:"createdBy,omitempty,string"`
	Depth         string                 `json:"depth,omitempty"`
	Name          string                 `json:"name,omitempty"`
	UpdatedAt     int                    `json:"updatedAt,omitempty,string"`
	UpdatedBy     int                    `json:"updatedBy,omitempty,string"`
	ActivityTypes []ExternalActivityType `json:"activityTypes,omitempty,string"`
}

ExternalAssetType represents an Eloqua ExternalAssetType object.

type ExternalAssetTypeService

type ExternalAssetTypeService struct {
	// contains filtered or unexported fields
}

ExternalAssetTypeService provides access to all the endpoints related to External Assets within eloqua

Eloqua API docs: https://goo.gl/UhnlB0

func (*ExternalAssetTypeService) Create

func (e *ExternalAssetTypeService) Create(name string, externalAssetType *ExternalAssetType) (*ExternalAssetType, *Response, error)

Create a new externalAssetType in eloqua. New activity types can be created by sending them through this request.

func (*ExternalAssetTypeService) Delete

func (e *ExternalAssetTypeService) Delete(id int) (*Response, error)

Delete an existing externalAssetType from eloqua

func (*ExternalAssetTypeService) Get

Get an externalAssetType object via its ID

func (*ExternalAssetTypeService) List

List many eloqua externalAssetTypes

func (*ExternalAssetTypeService) Update

func (e *ExternalAssetTypeService) Update(id int, name string, externalAssetType *ExternalAssetType) (*ExternalAssetType, *Response, error)

Update an existing externalAssetType in eloqua. New activity types can be created by sending them through this request.

type FieldMerge

type FieldMerge struct {
	Type                  string                `json:"type,omitempty"`
	ID                    int                   `json:"id,omitempty,string"`
	Depth                 string                `json:"depth,omitempty"`
	Name                  string                `json:"name,omitempty"`
	FolderID              int                   `json:"folderId,omitempty,string"`
	Syntax                string                `json:"syntax,omitempty"`
	UpdatedAt             int                   `json:"updatedAt,omitempty,string"`
	UpdatedBy             int                   `json:"updatedBy,omitempty,string"`
	ContactFieldID        int                   `json:"contactFieldId,omitempty,string"`
	DefaultValue          string                `json:"defaultValue,omitempty"`
	MergeType             string                `json:"mergeType,omitempty"`
	DefaultContentSection DynamicContentSection `json:"defaultContentSection,omitempty"`
}

FieldMerge is an Eloqua FieldMerge Object. The fields available depend on the merge source (or type).

type FieldValidation

type FieldValidation struct {
	Type        string     `json:"type,omitempty"`
	ID          int        `json:"id,omitempty,string"`
	Depth       string     `json:"depth,omitempty"`
	Name        string     `json:"name,omitempty"`
	Description string     `json:"description,omitempty"`
	Condition   TypeObject `json:"condition,omitempty"`
	IsEnabled   bool       `json:"isEnabled,omitempty,string"`
	Message     string     `json:"message,omitempty"`
}

FieldValidation represents the Eloqua model for a validation rule, Typically found on a form field

type FieldValue

type FieldValue struct {
	Type  string `json:"type,omitempty"`
	ID    int    `json:"id,omitempty,string"`
	Value string `json:"value,omitempty"`
}

FieldValue represents the structure in which custom field values are passed via the API.

type Form

type Form struct {
	Type          string      `json:"Type,omitempty"`
	CurrentStatus string      `json:"currentStatus,omitempty"`
	ID            int         `json:"id,omitempty,string"`
	CreatedAt     int         `json:"createdAt,omitempty,string"`
	CreatedBy     int         `json:"createdBy,omitempty,string"`
	Depth         string      `json:"depth,omitempty"`
	FolderID      int         `json:"folderId,omitempty,string"`
	Name          string      `json:"name,omitempty"`
	Permissions   []string    `json:"permissions,omitempty"`
	UpdatedAt     int         `json:"updatedAt,omitempty,string"`
	UpdatedBy     int         `json:"updatedBy,omitempty,string"`
	FormFields    []FormField `json:"elements,omitempty"`

	EmailAddressFormFieldID int        `json:"emailAddressFormFieldId,omitempty,string"`
	HTML                    string     `json:"html,omitempty"`
	HTMLName                string     `json:"htmlName,omitempty"`
	ProcessingType          string     `json:"processingType,omitempty"`
	ProcessingSteps         []FormStep `json:"processingSteps,omitempty"`
	Size                    Size       `json:"size,omitempty"`
	Style                   string     `json:"style,omitempty"`
}

Form represents an Eloqua form object.

type FormData

type FormData struct {
	Type                 string       `json:"type,omitempty"`
	Name                 string       `json:"name,omitempty"`
	ID                   int          `json:"id,omitempty,string"`
	FieldValues          []FieldValue `json:"fieldValues,omitempty"`
	SubmittedAt          int          `json:"submittedAt,omitempty,string"`
	SubmittedByContactID int          `json:"submittedByContactId,omitempty,string"`
}

FormData represents an Eloqua form record.

type FormDataService

type FormDataService struct {
	// contains filtered or unexported fields
}

FormDataService provides access to all the endpoints related to form data within eloqua.

Eloqua API docs: https://goo.gl/tcISkr

func (*FormDataService) Create

func (e *FormDataService) Create(formID int, formData *FormData) (*FormData, *Response, error)

Create a new form record in eloqua

func (*FormDataService) List

func (e *FormDataService) List(formID int, opts *ListOptions) ([]FormData, *Response, error)

List many eloqua form records

type FormField

type FormField struct {
	Type         string `json:"type,omitempty"`
	ID           int    `json:"id,omitempty,string"`
	Name         string `json:"name,omitempty"`
	Instructions string `json:"instructions,omitempty"`
	Style        string `json:"style,omitempty"`
	DataType     string `json:"dataType,omitempty"`
	DisplayType  string `json:"displayType,omitempty"`
	FieldMergeID int    `json:"fieldMergeId,omitempty,string"`
	HTMLName     string `json:"htmlName,omitempty"`

	Validations []FieldValidation `json:"validations,omitempty"`

	CreatedFromContactFieldID int `json:"createdFromContactFieldID,omitempty,string"`
}

FormField represents the Eloqua model for a single field and its settings on a form.

type FormService

type FormService struct {
	// contains filtered or unexported fields
}

FormService provides access to all the endpoints related to form assets within eloqua

Eloqua API docs: https://goo.gl/WW0ehX

func (*FormService) Create

func (e *FormService) Create(name string, form *Form) (*Form, *Response, error)

Create a new form in eloqua

func (*FormService) Delete

func (e *FormService) Delete(id int) (*Response, error)

Delete an existing form from eloqua

func (*FormService) Get

func (e *FormService) Get(id int) (*Form, *Response, error)

Get an form object via its ID

func (*FormService) List

func (e *FormService) List(opts *ListOptions) ([]Form, *Response, error)

List many Eloqua form objetcs

func (*FormService) Update

func (e *FormService) Update(id int, name string, form *Form) (*Form, *Response, error)

Update an existing form in eloqua

type FormStep

type FormStep struct {
	Type     string `json:"type,omitempty"`
	ID       int    `json:"id,omitempty,string"`
	Name     string `json:"name,omitempty"`
	Exectute string `json:"execute,omitempty"`
}

FormStep is a generic representation of an Eloqua form Step object. Within Eloqua there is really a range of 'FormStep*' object. FormStep just holds the common fields.

A list of the various 'FormStep*' types can be found here: https://goo.gl/EhRfbg

type HTMLContent

type HTMLContent struct {
	Type          string `json:"type,omitempty"`
	ContentSource string `json:"contentSource,omitempty"`
	HTML          string `json:"html,omitempty"`
}

HTMLContent represents the htmlContent model of an Eloqua email or landing page object

type Hyperlink struct {
	Type string `json:"type,omitempty"`
	ID   int    `json:"id,omitempty,string"`
	Name string `json:"name,omitempty"`
	Href string `json:"href,omitempty"`
}

Hyperlink is an Eloqua hyperlink object that is commonly contained in Eloqua assets such as emails and landing pages.

type Image

type Image struct {
	Type      string `json:"type,omitempty"`
	ID        int    `json:"id,omitempty,string"`
	CreatedAt int    `json:"createdAt,omitempty,string"`
	CreatedBy int    `json:"createdBy,omitempty,string"`
	Depth     string `json:"depth,omitempty"`
	Name      string `json:"name,omitempty"`
	FolderID  int    `json:"folderId,omitempty,string"`

	UpdatedAt    int      `json:"updatedAt,omitempty,string"`
	UpdatedBy    int      `json:"updatedBy,omitempty,string"`
	Permissions  []string `json:"permissions,omitempty"`
	FullImageURL string   `json:"fullImageUrl,omitempty"`
	Size         Size     `json:"size,omitempty"`
	ThumbnailURL string   `json:"thumbnailUrl,omitempty"`
}

Image represents an Eloqua image object. Images are often in other Eloqua models such as Emails & Landing Pages

type ImageService

type ImageService struct {
	// contains filtered or unexported fields
}

ImageService provides access to all the endpoints related to image data within eloqua

Eloqua API docs: https://goo.gl/oHGGLv

func (*ImageService) Create

func (e *ImageService) Create(name string, image *Image) (*Image, *Response, error)

Create a new image in eloqua

func (*ImageService) Delete

func (e *ImageService) Delete(id int) (*Response, error)

Delete an existing image from eloqua

func (*ImageService) Get

func (e *ImageService) Get(id int) (*Image, *Response, error)

Get an image object via its ID

func (*ImageService) List

func (e *ImageService) List(opts *ListOptions) ([]Image, *Response, error)

List many eloqua images

func (*ImageService) Update

func (e *ImageService) Update(id int, name string, image *Image) (*Image, *Response, error)

Update an existing image in eloqua

type InterfacePermission

type InterfacePermission struct {
	Type                       string                `json:"type,omitempty"`
	InterfaceCode              string                `json:"interfaceCode,omitempty"`
	NestedInterfacePermissions []InterfacePermission `json:"nestedInterfacePermissions,omitempty"`
}

InterfacePermission is a permission assigned to a user to control the parts of the Eloqua interface they see.

type LandingPage

type LandingPage struct {
	Type                string           `json:"type,omitempty"`
	CurrentStatus       string           `json:"currentStatus,omitempty"`
	ID                  int              `json:"id,omitempty,string"`
	CreatedAt           int              `json:"createdAt,omitempty,string"`
	CreatedBy           int              `json:"createdBy,omitempty,string"`
	Depth               string           `json:"depth,omitempty"`
	FolderID            int              `json:"folderId,omitempty,string"`
	Name                string           `json:"name,omitempty"`
	Permissions         []string         `json:"permissions,omitempty"`
	UpdatedAt           int              `json:"updatedAt,omitempty,string"`
	UpdatedBy           int              `json:"updatedBy,omitempty,string"`
	AutoRedirectURL     string           `json:"autoRedirectURL,omitempty"`
	AutoRedirectWaitFor int              `json:"autoRedirectWaitFor,omitempty,string"`
	ContentSections     []ContentSection `json:"contentSections,omitempty"`
	DeployedAt          int              `json:"deployedAt,omitempty,string"`
	DynamicContents     []DynamicContent `json:"dynamicContents,omitempty"`
	Forms               []Form           `json:"forms,omitempty"`
	HTMLContent         HTMLContent      `json:"htmlContent,omitempty"`
	Hyperlinks          []Hyperlink      `json:"hyperlinks,omitempty"`
	Images              []Image          `json:"images,omitempty"`
	Layout              string           `json:"layout,omitempty"`
	MicrositeID         int              `json:"micrositeId,omitempty,string"`
	Style               string           `json:"style,omitempty"`
	RefreshedAt         int              `json:"refreshedAt,omitempty,string"`
	RelativePath        string           `json:"relativePath,omitempty"`

	IsContentProtected        bool `json:"isContentProtected,omitempty,string"`
	ExcludeFromAuthentication bool `json:"excludeFromAuthentication,omitempty,string"`
}

LandingPage represents an Eloqua landingPage object.

type LandingPageService

type LandingPageService struct {
	// contains filtered or unexported fields
}

LandingPageService provides access to all the endpoints related to landingPage assets within eloqua

Eloqua API docs: https://goo.gl/FlLqLz

func (*LandingPageService) Create

func (e *LandingPageService) Create(name string, landingPage *LandingPage) (*LandingPage, *Response, error)

Create a new landingPage in eloqua

func (*LandingPageService) Delete

func (e *LandingPageService) Delete(id int) (*Response, error)

Delete an existing landingPage from eloqua

func (*LandingPageService) Get

func (e *LandingPageService) Get(id int) (*LandingPage, *Response, error)

Get an landingPage object via its ID

func (*LandingPageService) List

List many Eloqua landingPage objetcs

func (*LandingPageService) Update

func (e *LandingPageService) Update(id int, name string, landingPage *LandingPage) (*LandingPage, *Response, error)

Update an existing landingPage in eloqua

type ListOptions

type ListOptions struct {
	// Level of detail returned from request
	// Values: "minimal", "partial", "complete"
	Depth string `url:"depth,omitempty"`
	// Number of entities to return
	Count int `url:"count,omitempty"`
	// The page count of entities to return, Starting at 1
	Page int `url:"page,omitempty"`
	// A term for searching through entities
	Search string `url:"search,omitempty"`
	// The property on which to sort the returned data
	Sort string `url:"sort,omitempty"`
	// The direction of the applied sort
	SortDir string `url:"dir,omitempty"`
	// The field on which to order results
	OrderBy string `url:"orderBy,omitempty"`
	// A minimum last updated timestamp
	LastUpdatedAt int `url:"lastUpdatedAt,omitempty"`
}

ListOptions represents the options available for making listing requests.

type Microsite

type Microsite struct {
	Type      string `json:"type,omitempty"`
	ID        int    `json:"id,omitempty,string"`
	CreatedAt int    `json:"createdAt,omitempty,string"`
	CreatedBy int    `json:"createdBy,omitempty,string"`
	Depth     string `json:"depth,omitempty"`
	Name      string `json:"name,omitempty"`
	UpdatedAt int    `json:"updatedAt,omitempty,string"`

	Domains                []string `json:"domains,omitempty"`
	EnableWebTrackingOptIn string   `json:"enableWebTrackingOptIn,omitempty"`
	IsAuthenticated        bool     `json:"isAuthenticated,omitempty,string"`
	IsSecure               bool     `json:"isSecure,omitempty,string"`
}

Microsite represents an Eloqua microsite object. Microsites are often in other Eloqua models such as Emails & Landing Pages

type MicrositeService

type MicrositeService struct {
	// contains filtered or unexported fields
}

MicrositeService provides access to all the endpoints related to microsite data within eloqua

Eloqua API docs: https://goo.gl/lm34HJ

func (*MicrositeService) Create

func (e *MicrositeService) Create(name string, microsite *Microsite) (*Microsite, *Response, error)

Create a new microsite in eloqua

func (*MicrositeService) Delete

func (e *MicrositeService) Delete(id int) (*Response, error)

Delete an existing microsite from eloqua

func (*MicrositeService) Get

func (e *MicrositeService) Get(id int) (*Microsite, *Response, error)

Get an microsite object via its ID

func (*MicrositeService) List

func (e *MicrositeService) List(opts *ListOptions) ([]Microsite, *Response, error)

List many eloqua microsites

func (*MicrositeService) Update

func (e *MicrositeService) Update(id int, name string, microsite *Microsite) (*Microsite, *Response, error)

Update an existing microsite in eloqua

type Option

type Option struct {
	Type        string `json:"type,omitempty"`
	DisplayName string `json:"displayname,omitempty"`
	Value       string `json:"value,omitempty"`
}

Option represents an Eloqua select/picklist option.

type OptionList

type OptionList struct {
	Type        string   `json:"type,omitempty"`
	ID          int      `json:"id,omitempty,string"`
	Depth       string   `json:"depth,omitempty"`
	Name        string   `json:"name,omitempty"`
	Permissions []string `json:"permissions,omitempty"`
	Elements    []Option `json:"elements,omitempty"`
}

OptionList represents an Eloqua Option List object. OptionLists are also known as picklists or select lists

type OptionListService

type OptionListService struct {
	// contains filtered or unexported fields
}

OptionListService provides access to all the endpoints related to Option List data within eloqua

Eloqua API docs: https://goo.gl/KyNNO1

func (*OptionListService) Create

func (e *OptionListService) Create(name string, optionList *OptionList) (*OptionList, *Response, error)

Create a new optionList in eloqua

func (*OptionListService) Delete

func (e *OptionListService) Delete(id int) (*Response, error)

Delete an existing optionList from eloqua

func (*OptionListService) Get

func (e *OptionListService) Get(id int) (*OptionList, *Response, error)

Get an optionList object via its ID

func (*OptionListService) List

func (e *OptionListService) List(opts *ListOptions) ([]OptionList, *Response, error)

List many eloqua optionLists

func (*OptionListService) Update

func (e *OptionListService) Update(id int, name string, optionList *OptionList) (*OptionList, *Response, error)

Update an existing optionList in eloqua Updating will delete all current options.

type Position

type Position struct {
	Type string `json:"type,omitempty"`
	X    int    `json:"x,omitempty,string"`
	Y    int    `json:"y,omitempty,string"`
}

Position simply stores x/y coordinates. It's used for the positioning of other elements such as campaign elements.

type ProductPermission

type ProductPermission struct {
	Type        string `json:"type,omitempty"`
	ProductCode string `json:"productCode,omitempty"`
}

ProductPermission displays the access that the user has to particular Eloqua prouducts such as Profiler.

type Response

type Response struct {
	*http.Response

	// The main body containing the request entities
	Elements json.RawMessage `json:"elements,omitempty"`
	// The current page of the response
	Page int `json:"page,omitempty"`
	// The page size of the response
	PageSize int `json:"pageSize,omitempty"`
	// The total entities found in the query
	Total int `json:"total,omitempty"`

	// The returned response body in the event of an error
	// Use this to help debug in the event of unknown errors
	ErrorContent string `json:"-"`
}

Response is a custom http response that, upon a standard http response, contains eloqua specific details such as listing properies and error details.

type Size

type Size struct {
	Type   string `json:"type,omitempty"`
	Width  int    `json:"width,omitempty,string"`
	Height int    `json:"height,omitempty,string"`
}

Size is a universal Eloqua object to simply track width & height of other assets such as images.

type TextValueCondition

type TextValueCondition struct {
	Type     string `json:"type,omitempty"`
	Operator string `json:"operator,omitempty"`
	Value    string `json:"value,omitempty"`
}

TextValueCondition represents the conditional matching of simple text values.

type TypeObject

type TypeObject struct {
	Type string `json:"type,omitempty"`
}

TypeObject is a very simple model of an eloqua object containing only the 'type' field. This is used in cases where there are no extra field, Just a type available.

type TypePermission

type TypePermission struct {
	Type        string          `json:"type,omitempty"`
	ObjectType  string          `json:"objectType,omitempty"`
	Permissions TypePermissions `json:"permissions,omitempty"`
}

TypePermission represents the user's permissions for a particular Eloqua Type.

type TypePermissions

type TypePermissions struct {
	Type   string `json:"type,omitempty"`
	Create bool   `json:"create,omitempty,string"`
}

TypePermissions are the actual permission set on a TypePermission.

type User

type User struct {
	Type                 string   `json:"type,omitempty"`
	AccessedAt           int      `json:"accessedAt,omitempty,string"`
	CurrentStatus        string   `json:"currentStatus,omitempty"`
	ID                   int      `json:"id,omitempty,string"`
	CreatedAt            int      `json:"createdAt,omitempty,string"`
	CreatedBy            int      `json:"createdBy,omitempty,string"`
	Description          string   `json:"description,omitempty"`
	Depth                string   `json:"depth,omitempty"`
	FolderID             int      `json:"folderId,omitempty,string"`
	Name                 string   `json:"name,omitempty"`
	Permissions          []string `json:"permissions,omitempty"`
	UpdatedAt            int      `json:"updatedAt,omitempty,string"`
	UpdatedBy            int      `json:"updatedBy,omitempty,string"`
	ScheduledFor         int      `json:"scheduledFor,omitempty,string"`
	SourceTemplateID     string   `json:"sourceTemplateId,omitempty"`
	BetaAccess           []string `json:"betaAccess,omitempty"`
	Capabilities         []string `json:"capabilities,omitempty"`
	Company              string   `json:"company,omitempty"`
	DefaultAccountViewID int      `json:"defaultAccountViewId,omitempty,string"`
	DefaultContactViewID int      `json:"defaultContactViewId,omitempty,string"`
	EmailAddress         string   `json:"emailAddress,omitempty"`

	LoggedInAt string `json:"loggedInAt,omitempty"`
	LoginName  string `json:"loginName,omitempty"`

	InterfacePermissions []InterfacePermission `json:"interfacePermissions,omitempty"`
	Preferences          UserPreferences       `json:"preferences,omitempty"`
	TypePermissions      []TypePermission      `json:"typePermissions,omitempty"`
	ProductPermissions   []ProductPermission   `json:"productPermissions,omitempty"`
}

User represents an Eloqua system user.

type UserPreferences

type UserPreferences struct {
	Type       string `json:"type,omitempty"`
	TimezoneID int    `json:"timezoneId,omitempty,string"`
}

UserPreferences holds user-specific Eloqua preferences. This may be limited compared to what can possibly be fetched/set.

type UserService

type UserService struct {
	// contains filtered or unexported fields
}

UserService provides access to all endpoints related to managing Eloqua system users.

Eloqua API docs: https://goo.gl/5LXJ7q

func (*UserService) Get

func (e *UserService) Get(id int) (*User, *Response, error)

Get an user object via its ID

func (*UserService) List

func (e *UserService) List(opts *ListOptions) ([]User, *Response, error)

List many Eloqua users

func (*UserService) Update

func (e *UserService) Update(id int, name string, user *User) (*User, *Response, error)

Update an existing user in eloqua This endpoint does not seem to be fully stable and/or working fully Could not get reliably functioning during testing

type Visitor

type Visitor struct {
	Type                 string `json:"type,omitempty"`
	VisitorID            int    `json:"visitorId,omitempty,string"`
	CreatedAt            int    `json:"createdAt,omitempty,string"`
	IPAddress            string `json:"V_IPAddress,omitempty"`
	LastVisitDateAndTime int    `json:"V_LastVisitDateAndTime,omitempty,string"`
	ExternalID           string `json:"externalId,omitempty"`
	ContactID            int    `json:"contactId,omitempty,string"`
	CurrentStatus        string `json:"currentStatus,omitempty"`
}

Visitor represents an Eloqua Visitor object.

type VisitorService

type VisitorService struct {
	// contains filtered or unexported fields
}

VisitorService provides access to all the endpoints related to Visitor data within eloqua

Eloqua API docs: https://goo.gl/r5Ctvr

func (*VisitorService) List

func (e *VisitorService) List(opts *ListOptions) ([]Visitor, *Response, error)

List many eloqua visitors

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL