Eloqua REST Connector > Eloqua REST Operations > Eloqua REST Source Operations
  

Eloqua REST Source Operations

Create a Source transformation in the Mapping Task wizard to read data from Eloqua.
After you select a Eloqua REST connection for a Source transformation in a mapping, you can select an operation from the list of operations.
After you specify the connection, specify the operation on the Source tab of the Source transformation.
Select the operation you require, use the sample template to configure the request message in the JSON format, provide the sample template, and configure the advanced properties for the operation.

Configuring a Request Using Request Message Editor

When you create a Source transformation, configure an JSON request message for the operation that you want to perform in Eloqua.
Use the Request Message Editor to create a request message. The request message is in JSON format and contains request parameters exposed by Eloqua REST API for a specific operation. You can use the default request message for the operation and then customize the request message to specify the data that you want to include.
To customize your request, copy the request message from the sample template to the Request Message Editor pane where you can edit the JSON message and add the attributes for the request. Remove unnecessary and empty tags from the request message to avoid operation failure. You can hide the optional elements to see the mandatory elements required for the request message.
For example, you want to perform the GET_Contacts operation using Eloqua REST Connector to retrieve reports for all users.
The following JSON sample shows the filters used for the GET_Contacts operation:
{
"id" : 0,
"depth" : "",
"viewId" : 0
}
The following image shows the validated request message in a GET_Contacts operation in the Mapping Designer:
The following image shows the validated request message in a GET_Contacts operation in the Mapping Designer.
The request message format in Eloqua REST Connector follows the service request definition in Eloqua. Ensure that you use well-formed JSON formatting in the request message. You can verify if the JSON request is valid to ensure that the JSON matches the structure expected by the operation.

Field Mapping in a Source Transformation

The response message format follows the service response definition in Eloqua. You can map response fields from a hierarchical to a relational structure of output groups and fields.
After you configure an operation for a source and specify the request message, create the relational format from the hierarchical data to include groups and fields that you want in the output.
Select the elements in the response structure that you want to include as output fields. The Secure Agent converts the JSON response in the hierarchical structure to relational groups at run time.
The output groups along with the primary and foreign keys are generated. You can pause on the output field to view the XPath expression, which indicates which field the output field is mapped to in the response structure of the hierarchy tree.
The following image shows an example hierarchical response structure generated from the request JSON for the GET_Contacts operation and the corresponding relational output fields for the response:The following image shows an example hierarchical response structure generated from the request JSON for the GET_Contacts operation and the corresponding relational output fields for the response.
You can edit the data type, precision, and scale for the groups and fields after mapping the fields.