This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »



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.

OperationDescription
createAContact Creates a new contact.
updateAContactUpdates an existing contact.
getAllContactsRetrieves 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.
deleteAContactDeletes 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.

createAContact
<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              : Last name field of the account to create an contact having the last name as it is.

  • emailAddress          : Email Id of the person of the contact.

  • isSubscribed          : Boolean value. This identifies whether the contact is set to accept emails.

  • emailFormatPreference : The accepted values for Email Format Preference are ; html, text and unspecified.

  • isBounceback          : When an email cannot be delivered, a non-deliverable message is created and the contact cannot be sent email once they are marked as having bounced.

  • accountName           : Name of the account associated to the contact record.

  • accountId             : The Identifier of the account associated to the contact record.

  • title                 : The title related to the contact.

  • 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         : The business contact phone number.
  • 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.

Sample request for createAContact
{
   "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.

updateAContact
<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              : Last name field of the account to update the contact's last name as it is.

  • emailAddress          : Email Id of the person of the contact.

  • isSubscribed          : Boolean value. This identifies whether the contact is set to accept emails.

  • emailFormatPreference : The accepted values for Email Format Preference are ; html, text and unspecified.

  • isBounceback          : When an email cannot be delivered, a non-deliverable message is created and the contact cannot be sent email once they are marked as having bounced.

  • accountName           : Name of the account associated to the contact record.

  • accountId             : The Identifier of the account associated to the contact record.

  • title                 : The title related to the contact.

  • 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         : The business contact phone number.
  • 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.

Sample request for updateAContact
{   
   "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.

getAllContacts
<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         : The RequestDepth. It can be 'Complete' or 'Reference' or 'Minimal' or 'Partial'.

  • search        : The search field, to search for that field.

  • page          : The page number to display. This must be greater than 1.

  • orderBy       : The order by property to order the fields.

  • lastUpdatedAt : The date time of the last update.

  • viewId        : The identifier of the view.

Sample Request

Following is a sample REST/JSON request that can be handled by getAllContacts operation.

Sample request for getAllContacts
{   
   "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.

getAContact
<eloqua.getAContact>
	<contactId>1</contactId>
	<depth>Complete</depth>
	<viewId>1</viewId>
</eloqua.getAContact>
properties
  • contactId : Unique identifier of the contact.

  • depth     : The RequestDepth. It can be 'Complete' or 'Reference' or 'Minimal' or 'Partial'.

  • viewId    : The identifier of the view.

Sample request

Following is a sample REST/JSON request that can be handled by the getAContact operation.

Sample request for getAContact
{   
   "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.

deleteAContact
<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.

Sample request for deleteAContact
{  
   "username" :"myusername",
   "password" :"mypassword",
   "siteName" :"mysiteName",
   "contactId":"1"
}

Get Subscribed Email Groups Of A Contact

The getSubscribedEmailGroups operation updates an account.

getSubscribedEmailGroups
<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        : The search field, to search for that field.

  • page          : The page number to display. This must be greater than 1.

  • orderBy       : The order by property to order the fields.

  • lastUpdatedAt : The date time of the last update.

Sample request

Following is a sample REST/JSON request that can be handled by the getSubscribedEmailGroups operation.

Sample request for getSubscribedEmailGroups
{   
   "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.

updateASubscribedEmailGroupOfAContact
<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.

Sample request for updateASubscribedEmailGroupOfAContact
{   
   "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.

Sample proxy
<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>
  • No labels