Skip navigation

In the post Eloqua API How To: Query a Contact by Email Address, I showed how to use the Where can I find the documentation for the Eloqua API to retrieve contacts by a single field (in this case Email Address). 

 

But what if we want to narrow down the results by passing multiple fields into the query?

 

Well, the Eloqua API does support passing in multiple fields, and here's how it's done...

 

Using a piece of the Eloqua API How To: Query a Contact by Email Address, all we need to do is modify the searchQuery string, adding in the fields that we want to search on separated by and.

 

 

         static void Main()

         {

                         const string searchQuery = "C_FirstName='John' and C_LastName='Doe'";


            try
            {
               //Create the service instance using your credentials

               EloquaInstance service = new EloquaInstance("instance", "userid", "password");
               
                // Instantiate a Contact Entity Type
                EntityType contactEntityType = new EntityType
                                            {
                                                ID = 0,
                                                Name = "Contact",
                                                Type = "Base"
                                            };

                // Create a new list containing the fields you want populated
                List<string> fieldList = new List<string> { "C_EmailAddress", "C_FirstName", "C_LastName" };
             
                // Define a container for the Query results
                DynamicEntityQueryResults queryResult;


 

That's all there is to it!

 

The code above uses the First and Last name fields, but you can use any contact field you wish.

When building an Eloqua Cloud Connector, one very important component that is required is the configuration page.

 

What exactly is a Cloud Connector Configuration page?

 

The configuration page is simply a means of gathering the information from the user that your connector requires to function.

 

For a better understanding, let us take a look at how an Eloqua user would go about adding your connector to a Cloud Connector Step in Program Builder.

 

First, a new Step is added to their program.

 

NewStep.PNG

They then select Edit Step Default Action.

NewStepConfig.PNG

The following screen is then displayed.

 

NewStepEditAction.PNG

Under Action Parameters, the user selects your Cloud Connector from the list of those available, and clicks Configure.

 

This brings up the configuration screen for the chosen connector.

(IMPORTANT NOTE: In this example, the Form Submit Contact connector was developed by Eloqua, so the Eloqua Cloud Connector page is shown (see here for more information).  If the user is configuring your connector, your page will be displayed.)

 

NewStepConfigScreen.PNG

 

How does Eloqua know to call your screen when the user clicks on Configure? This was done when your Cloud Connectors: Step by Step Installation Instructions for use in a customer instance of Eloqua.

 

What information should the configuration screen gather?


The information you gather depends on what you are doing with the Cloud Connector that you are building. Examples of some basic information would be:

  • Credentials (for your service, as well as the Eloqua instance and login information, since the Connector will call into Eloqua through the API).
  • Program Builder Step ID (this is needed to act on members in a step see Cloud Connector API - Counting the Members in a Program Step ).
  • Field Mappings, needed for data operations between your system and objects in Eloqua.

 

As far as Look & Feel, a Cloud Connector configuration page can be as simple or as flashy as you wish.

 

Once you've gathered the information you need from the user through the configration page, your service can then go to work polling the Cloud Connector Step for members.