Eloqua Node API Helper
Table of contents
Getting Started
To start using the functions, require the module and initiate a new Eloqua
const ELQ = ;const eloqua = pod site username password;
For the pod, please use the full designation (with the p) like this : p06
Accounts
Functions
createAccounts
eloqua;
data
: array. This is an array composed of objects containing information of the accounts willing to be created.callback
: function. The callback function. Takes one parameter,res
, which is the data returned by the query.
Example request:
let data = name: "ACME Group" address1: "123 Fake Str." name: "DIST Corp" address1: "42 Unif Bvd.";eloqua
The response in the callback is an array containing the information of the created accounts.
Example response:
type: 'Account' id: '1382' createdAt: '1543784368' depth: 'complete' description: '' name: 'ACME Group' updatedAt: '1543784368' address1: '123 Fake Str.' address2: '' address3: '' businessPhone: '' city: '' country: '' fieldValues: postalCode: '' province: '' ...
getAccounts
eloqua;
ids
: array. An array containing integers that represent the IDs of the accounts in Eloqua.callback
: function. The callback function. Takes one parameter,res
, which is the data returned by the query.
Example request:
const ids = 1382 1384;eloqua
The response in the callback is an array containing the information of the accounts.
Example response:
type: 'Account' id: '1382' createdAt: '1543784368' depth: 'complete' description: '' name: 'ACME Group' updatedAt: '1543784368' address1: '123 Fake Str.' address2: '' address3: '' businessPhone: '' city: '' country: '' fieldValues: postalCode: '' province: '' ...
searchAccounts
eloqua;
criteria
: string. The value of the field you want to search on.field
: string. The field you want to perform a search on. Enternull
if you want to search on the standardCompany Name
field.complete
: boolean.true
if you need complete and detailed information about the account,false
if you only need the basic information.callback
: function. The callback function. Takes one parameter,res
, which is the data returned by the query.
Example request:
eloqua
Example response:
elements: type: 'Account' id: '1382' createdAt: '1543784368' depth: 'complete' description: '' name: 'ACME Group' updatedAt: '1543784368' address1: '123 Fake Str.' address2: '' address3: '' businessPhone: '' city: '' country: '' fieldValues: Array postalCode: '' province: '' ... total: 3
elements
: array. This is an array containing the informations from the accountstotal
: integer. This is the total number of the elements returned by the request
getAllAccounts
eloqua;
WARNING
Depending on the size of your Eloqua instance and the number of Accounts it has, using this function can take a lot of time. Be careful when using it.
callback
: function. The callback function. Takes one parameter,res
, which is the data returned by the query.
Example request:
eloqua
Example response:
elements: type: 'Account' id: '1382' createdAt: '1543784368' depth: 'complete' description: '' name: 'ACME Group' updatedAt: '1543784368' address1: '123 Fake Str.' address2: '' address3: '' businessPhone: '' city: '' country: '' fieldValues: Array postalCode: '' province: '' ... total: 6
elements
: array. This is an array containing the informations from the accountstotal
: integer. This is the total number of the elements returned by the request
deleteAccounts
eloqua;
ids
: array. An array containing integers that represent the IDs of the accounts in Eloqua.callback
: function. The callback function. Takes no parameter.
Exemple request:
const ids = 1382 1384;eloqua
Contacts
Functions
createContacts
eloqua;
data
: array. This is an array composed of objects containing information of the contacts willing to be created.callback
: function. The callback function. Takes one parameter,res
, which is the data returned by the query.
Example request:
let data = "emailAddress": "tst1@test.com" "emailAddress": "tst2@test.com";eloqua
The response in the callback is an array containing the information of the created contacts.
Example response:
type: 'Contact' currentStatus: 'Awaiting action' id: '33402' createdAt: '1543833282' depth: 'complete' name: 'tst1@test.com' updatedAt: '1543833282' emailAddress: 'tst1@test.com' emailFormatPreference: 'unspecified' fieldValues: ... isBounceback: 'false' isSubscribed: 'true' subscriptionDate: '1543833231' ...
getContacts
eloqua;
ids
: array. An array containing integers that represent the IDs of the contacts in Eloqua.callback
: function. The callback function. Takes one parameter,res
, which is the data returned by the query.
Example request:
const ids = 33402 33403;eloqua
The response in the callback is an array containing the information of the contacts.
Example response:
type: 'Contact' currentStatus: 'Awaiting action' id: '33402' createdAt: '1543833282' depth: 'complete' name: 'tst1@test.com' updatedAt: '1543833282' emailAddress: 'tst1@test.com' emailFormatPreference: 'unspecified' fieldValues: ... isBounceback: 'false' isSubscribed: 'true' subscriptionDate: '1543833231' ...
searchContacts
eloqua;
criteria
: string. The value of the field you want to search on.field
: string. The field you want to perform a search on. Enternull
if you want to search on the standardemailAddress
field.complete
: boolean.true
if you need complete and detailed information about the contact,false
if you only need the basic information.callback
: function. The callback function. Takes one parameter,res
, which is the data returned by the query.
Example request:
eloqua
Example response:
elements: type: 'Contact' currentStatus: 'Awaiting action' id: '33403' createdAt: '1543834309' depth: 'complete' name: 'tst1@test.com' updatedAt: '1543834309' emailAddress: 'tst1@test.com' emailFormatPreference: 'unspecified' fieldValues: Array isBounceback: 'false' isSubscribed: 'true' subscriptionDate: '1543833231' total: 1
elements
: type: array. This is an array containing the informations from the contactstotal
: type: integer. This is the total number of the elements returned by the request
getAllContacts
eloqua;
WARNING
Depending on the size of your Eloqua instance and the number of contacts it has, using this function can take a lot of time. Be careful when using it.
callback
: function. The callback function. Takes one parameter,res
, which is the data returned by the query.
Example request:
eloqua
Example response:
elements: type: 'Contact' currentStatus: 'Awaiting action' id: '33403' createdAt: '1543834309' depth: 'complete' name: 'tst1@test.com' updatedAt: '1543834309' emailAddress: 'tst1@test.com' emailFormatPreference: 'unspecified' fieldValues: Array isBounceback: 'false' isSubscribed: 'true' subscriptionDate: '1543833231' ... total: 12322
elements
: array. This is an array containing the informations from the contactstotal
: integer. This is the total number of the elements returned by the request
deleteContacts
eloqua;
ids
: array. An array containing integers that represent the IDs of the contacts in Eloqua.callback
: function. The callback function. Takes no parameter.
Exemple request:
const ids = 33402 33403;eloqua
Custom Objects
WIP
Roadmap
- Custom objects functions
- Import/Export function
License
MIT © Fabio Benoit