Overview
The following operations allow you to work with Contacts. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with Contacts, see Sample configuration .
For more details click Contacts.
Operation | Description |
---|---|
createAContact | Creates a new contact. |
updateAContact | Updates an existing contact. |
getAllContacts | Retrieves all contacts. |
getAContact | Retrieves the details of a contact specified by the contact id. |
getSubscribedEmailGroups | Retrieves subscribed email groups of a contact specified by the contact id. |
updateASubscribedEmailGroupOfAContact | Updates subscribed email group of a contact of specified by the contact id. |
deleteAContact | Deletes a contact associated with the specified contact id. |
Operation Details
This section provides further details on the operations related to Contacts.
Create A Contact
The createAContact
operation creates a new contact.
<eloqua.createAContact> <firstName>Kema</firstName> <lastName>Krish</lastName> <emailAddress>Kema@gmail.com</emailAddress> <isSubscribed>true</isSubscribed> <emailFormatPreference>html</emailFormatPreference> <isBounceback>true</isBounceback> <accountName>my account name</accountName> <accountId>1</accountId> <title>for testing</title> <subscriptionDate>1297278692</subscriptionDate> <unsubscriptionDate>1297278699</unsubscriptionDate> <bouncebackDate>1297278692</bouncebackDate> <mobilePhone>0111234567</mobilePhone> <fax>0111234568</fax> <salesPerson>Scott McNabb</salesPerson> <address1>20 palm Grove</address1> <address2>Kollupitiya</address2> <address3>Colombo</address3> <name>20 palm Grove</name> <city>Colombo</city> <province>Western</province> <postalCode>00300</postalCode> <country>Sri Lanka</country> <businessPhone>0111234567</businessPhone> <fieldValues>[{"id": "5","value": "new field value"}]</fieldValues> </eloqua.createAContact>
properties
firstName :
First name field of the contact to create a contact having the first name as it is.lastName
:emailAddres
s :isSubscribed
:emailFormatPreference
:isBounceback
:accountName
:accountId
:title
subscriptionDate :
Value of the subscription date in integer.unsubscriptionDate :
The date in integer, on which the Contact subscription status is set to not accept emails.bouncebackDate :
Value of the bounce back date in integer.mobilePhone :
The mobile contact number.fax :
The fax number.salesPerson :
The sales person.address1 :
This field will contain Street Number, Street Name, or maybe PO Box.address2 :
This field will contain Apartment, Floor, Suite, Bldg # or more specific information within Address1.address3 :
The will contain specific office/room in a building or apartment.name :
Name of the account to create an account on this name.city :
The city, in which the address 1 is located.province :
The province, in which the city is located.postalCode :
The postal code of the province.country :
The country of the address.businessPhone
:fieldValues :
A list of custom fields and their associated values.
Sample request
Following is a sample REST/JSON request that can be handled by the createAContact
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "firstName":"Kema", "lastName":"Krish", "emailAddress":"Kema@gmail.com", "isSubscribed":true, "emailFormatPreference":"html", "isBounceback":true, "accountName":"my account name", "accountId":"1", "title":"for testing", "subscriptionDate":1297278692, "unsubscriptionDate":1297278699, "bouncebackDate":1297278692, "mobilePhone":"0111234567", "fax":"0111234568", "salesPerson":"Scott McNabb", "name":"my account", "address1":"20 palm Grove", "address2":"Kollupitiya", "address3":"Colombo", "city":"Colombo", "province":"Western", "postalCode":"00300", "country":"Sri Lanka", "businessPhone":"0111234567", "fieldValues":[{"id": "5","value": "new field value"}] }
Update A Contact
The updateAContact
operation updates a contact.
<eloqua.updateAContact> <contactId>1</contactId> <firstName>Kema</firstName> <lastName>Krish</lastName> <emailAddress>Kema@gmail.com</emailAddress> <isSubscribed>true</isSubscribed> <emailFormatPreference>html</emailFormatPreference> <isBounceback>true</isBounceback> <accountName>my account name</accountName> <accountId>1</accountId> <title>for testing</title> <subscriptionDate>1297278692</subscriptionDate> <unsubscriptionDate>1297278699</unsubscriptionDate> <bouncebackDate>1297278692</bouncebackDate> <mobilePhone>0111234567</mobilePhone> <fax>0111234568</fax> <salesPerson>Scott McNabb</salesPerson> <address1>20 palm Grove</address1> <address2>Kollupitiya</address2> <address3>Colombo</address3> <name>20 palm Grove</name> <city>Colombo</city> <province>Western</province> <postalCode>00300</postalCode> <country>Sri Lanka</country> <businessPhone>0111234567</businessPhone> <fieldValues>[{"id": "5","value": "new field value"}]</fieldValues> </eloqua.updateAContact>
properties
contactId :
Unique identifier of the contact.firstName :
First name field of the contact to update a contact's first name as it is.lastName
:emailAddres
s :isSubscribed
:emailFormatPreference
:isBounceback
:accountName
:accountId
:title
subscriptionDate :
Value of the subscription date in integer.unsubscriptionDate
:bouncebackDate
:mobilePhone
fax
salesPerson
address1 :
This field will contain Street Number, Street Name, or maybe PO Box.address2 :
This field will contain Apartment, Floor, Suite, Bldg # or more specific information within Address1.address3 :
The will contain specific office/room in a building or apartment.name :
Name of the account to create an account on this name.city :
The city, in which the address 1 is located.province :
The province, in which the city is located.postalCode :
The postal code of the province.country :
The country of the address.businessPhone
:fieldValues :
A list of custom fields and their associated values.
Sample request
Following is a sample REST/JSON request that can be handled by the updateAContact
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "contactId":"1", "firstName":"Kema", "lastName":"Krish", "emailAddress":"Kema@gmail.com", "isSubscribed":true, "emailFormatPreference":"html", "isBounceback":true, "accountName":"my account name", "accountId":"1", "title":"for testing", "subscriptionDate":1297278692, "unsubscriptionDate":1297278699, "bouncebackDate":1297278692, "mobilePhone":"0111234567", "fax":"0111234568", "salesPerson":"Scott McNabb", "name":"my account", "address1":"20 palm Grove", "address2":"Kollupitiya", "address3":"Colombo", "city":"Colombo", "province":"Western", "postalCode":"00300", "country":"Sri Lanka", "businessPhone":"0111234567", "fieldValues":[{"id": "5","value": "new field value"}] }
Get All Contacts
The getAllContacts
operation retrieves all contacts.
<eloqua.getAllContacts> <count>2</count> <depth>1</depth> <search></search> <page>1</page> <orderBy></orderBy> <lastUpdatedAt>1426066807</lastUpdatedAt> <viewId>1</viewId> </eloqua.getAllContacts>
properties
count :
The number of results in a page to display. This must me in between 1 and 1000.depth
:search
:page
:orderBy
:lastUpdatedAt
:viewId
:
Sample Request
Following is a sample REST/JSON request that can be handled by getAllContacts
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "count":2, "page":1, "lastUpdatedAt":1426066807, "depth":"Complete", "viewId":"1" }
Get A Contact
The getAContact
operation retrieves the details of a contact associated with the specified contact id.
<eloqua.getAContact> <contactId>1</contactId> <depth>Complete</depth> <viewId>1</viewId> </eloqua.getAContact>
properties
contactId :
Unique identifier of the contact.depth
:viewId
:
Sample request
Following is a sample REST/JSON request that can be handled by the getAContact
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "accountId":"1", "depth":"Complete", "viewId":"1" }
Delete A Contact
The deleteAContact
operation deletes the contact associated with the specified contact id.
<eloqua.deleteAContact> <contactId>1</contactId> </eloqua.deleteAContact>
properties
contactId :
Unique identifier of the contact.
Sample request
Following is a sample REST/JSON request that can be handled by the deleteAContact
operation.
{ "username" :"myusername", "password" :"mypassword", "siteName" :"mysiteName", "contactId":"1" }
Get Subscribed Email Groups Of A Contact
The getSubscribedEmailGroups
operation updates an account.
<eloqua.getSubscribedEmailGroups> <contactId>1</contactId> <count>2</count> <search></search> <page>1</page> <orderBy></orderBy> <lastUpdatedAt>1426066807</lastUpdatedAt> </eloqua.getSubscribedEmailGroups>
properties
contactId :
Unique identifier of the contact.count :
The number of results in a page to display. This must me in between 1 and 1000.search
:page
:orderBy
:lastUpdatedAt
:
Sample request
Following is a sample REST/JSON request that can be handled by the getSubscribedEmailGroups
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "contactId":"1", "count":2, "page":1, "lastUpdatedAt":1426066807 }
Update A Subscribed Email Group Of A Contact
The updateASubscribedEmailGroupOfAContact
operation updates an account.
<eloqua.updateASubscribedEmailGroupOfAContact> <emailGroupId>1</emailGroupId> <contactId>1</contactId> <newContactId>2</newContactId> <isSubscribed>true</isSubscribed> <updatedAt>1426066807</updatedAt> <name>IT group</name> <isVisibleInOutlookPlugin>true</isVisibleInOutlookPlugin> <emailIds>["1"]</emailIds> <displayName>IT group</displayName> <subscriptionListId>12</subscriptionListId> <unSubscriptionListId>13</unSubscriptionListId> <subscriptionListDataLookupId>933089ea-224c-476c-a182-b34791557a71</subscriptionListDataLookupId> <unSubscriptionListDataLookupId>2770a778-81b8-4eaf-af16-b0cc9e2ea1b3</unSubscriptionListDataLookupId> <emailHeaderId>1</emailHeaderId> <emailFooterId>1</emailFooterId> <subscriptionLandingPageId>5</subscriptionLandingPageId> <unsubscriptionLandingPageId>6</unsubscriptionLandingPageId> <isVisibleInPublicSubscriptionList>true</isVisibleInPublicSubscriptionList> </eloqua.updateASubscribedEmailGroupOfAContact>
properties
emailGroupId :
Unique identifier of the email group.contactId :
The unique identifier of the contact.newContactId :
The unique identifier of the contact to update the contact id as it is.isSubscribed :
Boolean value, this indicates the subscription status.updatedAt :
The date time of updation.name :
Name of the email group.isVisibleInOutlookPlugin :
Boolean value, to indicate the visibility to public subscription list.emailIds :
List of email ids.displayName :
The name of the group visible for others.subscriptionListId :
Id of the subscription list.unSubscriptionListId :
Id of the unsubscription list.subscriptionListDataLookupId :
Data lookup id of the subscription list.unSubscriptionListDataLookupId :
Unsubscription Data lookup id.emailHeaderId :
Id of the email header.emailFooterId :
Id of the email footer.subscriptionLandingPageId :
Unique identifier of subscription landing page value.unsubscriptionLandingPageId
: Unique identifier of unsubscription landing page
value.isVisibleInPublicSubscriptionList :
Boolean value, to indicate the visibility to public subscription list.
Sample request
Following is a sample REST/JSON request that can be handled by the updateASubscribedEmailGroupOfAContact
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "emailGroupId":"1", "contactId":"1", "newContactId":"2", "isSubscribed":true, "updatedAt":1426066807, "name":"IT group", "isVisibleInOutlookPlugin":true, "emailIds":["1"], "displayName":"IT group", "subscriptionListId":"12", "unSubscriptionListId":"13", "subscriptionListDataLookupId":"933089ea-224c-476c-a182-b34791557a71", "unSubscriptionListDataLookupId":"2770a778-81b8-4eaf-af16-b0cc9e2ea1b3", "emailHeaderId":"1", "emailFooterId":"1", "subscriptionLandingPageId":"5", "unsubscriptionLandingPageId":"6", "isVisibleInPublicSubscriptionList":true }
Sample Configuration
Following is a sample proxy service that illustrates how to connect to Eloqua Standard API with the init
operation to use the getAllContacts
operation. The sample request for this proxy can be found in getAllContacts
sample request . You can use this sample as a template for using other operations in this category.
<proxy xmlns="http://ws.apache.org/ns/synapse" name="eloqua_getAllContacts" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property name="siteName" expression="json-eval($.siteName)"/> <property name="username" expression="json-eval($.username)"/> <property name="password" expression="json-eval($.password)"/> <property name="count" expression="json-eval($.count)"/> <property name="depth" expression="json-eval($.depth)"/> <property name="search" expression="json-eval($.search)"/> <property name="page" expression="json-eval($.page)"/> <property name="orderBy" expression="json-eval($.orderBy)"/> <property name="lastUpdatedAt" expression="json-eval($.lastUpdatedAt)"/> <property name="viewId" expression="json-eval($.viewId)"/> <eloqua.init> <siteName>{$ctx:siteName}</siteName> <username>{$ctx:username}</username> <password>{$ctx:password}</password> </eloqua.init> <eloqua.getAllContacts> <count>{$ctx:count}</count> <depth>{$ctx:depth}</depth> <search>{$ctx:search}</search> <page>{$ctx:page}</page> <orderBy>{$ctx:orderBy}</orderBy> <lastUpdatedAt>{$ctx:lastUpdatedAt}</lastUpdatedAt> <viewId>{$ctx:viewId}</viewId> </eloqua.getAllContacts> <respond/> </inSequence> <outSequence/> <faultSequence/> </target> <description/> </proxy>