Develop an Oracle Eloqua app feeder service

Feeders allow external systems to determine and control which contacts or custom objects enter into a campaign or program canvas, and when. Developers can now build apps that utilize data in third-party systems to drive campaign or program membership.

Feeders follow the instantiation-execution model. The following sections describe feeder-specific details and provide the endpoints needed to develop a feeder service. If you are not familiar with the general flow for the instantiation-execution model, you should read that first.

Eloqua signs all outgoing calls with OAuth 1.0a so the receiving system can validate that the call was sent by Eloqua. Refer to the OAuth 1.0a spec or OAuth 1.0 RFC for more information.

If you prefer a more visual representation of the flow for feeder services, check out the following flow diagram:

Create URL

Eloqua's call to the CreateURL:

POST https://example.com/awesomeapp/feeders/create?siteid=123instance=9347bfe1-9c72-409c-a5cd-402ff74f0caa

{}

AwesomeApp's response is a 200-level HTTP response:

Note: The "Content-Type" header must be set to "application/json" for the response to the Create URL call.

HTTP/1.1 200 application/json; charset=utf-8

{  
   "requiresConfiguration": true
}

requiresConfiguration is an optional Boolean parameter which tells Eloqua whether user configuration is required before the app can be used. If set to true, users will be unable to activate a campaign or program containing the unconfigured app service instance. Eloqua will display an error message.

Configure URL

When a user clicks the edit button on the service instance and makes changes through the Configure URL, AwesomeApp must call out to Eloqua’s Cloud API PUT /feeders/instances/{id} endpoint:

PUT https://secure.eloqua.com/api/cloud/1.0/feeders/instances/9347bfe1-9c72-409c-a5cd-402ff74f0caa
{
    "requiresConfiguration": false
}

requiresConfiguration is an optional Boolean parameter which tells Eloqua whether user configuration is required before the app can be used. If set to true, users will be unable to activate a campaign or program containing the unconfigured app service instance. Eloqua will display an error message.

Use the Configure URL response to set requiresConfiguration to false when your app's configuration acceptance criteria have been met.

Note: X-Frame-Options must not be set to DENY for any configure page.

Warning: If the campaign or program is not in draft mode, attempting to set requiresConfiguration to true will result in an error.

Notification URL

Eloqua's call to the Campaign Status Notification URL tells AwesomeApp that the campaign or program is active and ready to receive contacts or custom object records. These calls are made using templated URLs to differentiate the call out. For example, the notification call for activating a campaign would resemble:

POST https://example.com/awesomeapp/feeders/notify?instance=9347bfe1-9c72-409c-a5cd-402ff74f0caa&asset=456&status=Activated

When the campaign or program is deactivated, Eloqua's call to the Campaign Status Notification URL tells AwesomeApp to stop sending contacts or custom object records. The deactivate notification would resemble:

POST https://example.com/awesomeapp/feeders/notify?instance=9347bfe1-9c72-409c-a5cd-402ff74f0caa&asset=456&status=Draft

After the campaign or program is activated, AwesomeApp responds with a 204 response, indicating that the response will be asynchronous, followed by an import to Eloqua's Bulk API, where AwesomeApp specifies a sync action. For AppCloud Feeders, the sync action sets the AppCloud Feeder instance's status to complete. Note that the maximum import size per batch is 5,000: if you have more than 5,000 records, break your data up into multiple batches.

Bulk API contact import

  1. Create the bulk import definition, setting the status of the AppCloud Feeder instance to complete. The "destination" field refers to the AppCloud Feeders service's instance - in this example, the instance ID is 9347bfe1-9c72-409c-a5cd-402ff74f0caa:

    Warning: When referencing service instances, you must transmit the GUID without dashes. The bulk API will error if you transmit the GUID with the dashes.

    Create a contact import definition where the sync action sets the record's status, where the instance ID is 9347bfe1-9c72-409c-a5cd-402ff74f0caa :

    POST https://secure.p03.eloqua.com/api/bulk/2.0/contacts/imports
    {
    "name" : "AwesomeApp Feeder Bulk Import",
    "updateRule" : "always",
    "fields" : {
    "emailAddress" : "{{Contact.Field(C_EmailAddress)}}"
    }
    "syncActions" : [
    {
    "destination" : "{{FeederInstance(9347bfe19c72409ca5cd402ff74f0caa)}}",
    "action" : "setStatus",
    "status" : "complete"
    }
    ],
    "identifierFieldName" : "emailAddress"
    }

    Warning: All field names and values in Eloqua data transfer objects are case sensitive. Be sure to reproduce them exactly. For example: {{Contact.id}} would fail if the correct form is {{Contact.Id}}.

    Eloqua's response will be a 201 Created response that includes a uri parameter, which you can use to identify the import:

    {
      "name": "AwesomeApp Feeder Bulk Import",
      "updateRule": "always",
      "fields": {
        "emailAddress": "{{Contact.Field(C_EmailAddress)}}"
      },
      "identifierFieldName": "emailAddress",
      "syncActions": [
        {
          "destination": "{{FeederInstance(9347bfe19c72409ca5cd402ff74f0caa)}}",
          "action": "setStatus",
          "status": "complete"
        }
      ],
      "isSyncTriggeredOnImport": false,
      "isUpdatingMultipleMatchedRecords": false,
      "uri": "/contacts/imports/6",
      "createdBy": "DocsExample",
      "createdAt": "2014-03-06T13:59:00.6600046Z",
      "updatedBy": "DocsExample",
      "updatedAt": "2014-03-06T13:59:00.6600046Z"
    }
  2. Send Eloqua the import data using the uri:

    POST https://secure.p03.eloqua.com/api/bulk/2.0/contacts/imports/6/data
    [
    {
    "emailAddress" : "fred@example.com"
    },
    {
    "emailAddress" : "sylvie@example.com"
    }
    ]
  3. Synchronize the data for import:

    AwesomeApp's request:

    POST https://secure.p03.eloqua.com/api/bulk/2.0/syncs
    {
    "syncedInstanceURI":"/contacts/imports/6"
    }

    Eloqua's response:

    201 Created

    {
    "syncedInstanceURI" : "/contacts/imports/6",
    "status" : "pending",
    "createdAt" : "2014-01-01T13:59:07.1375620Z",
    "createdBy" : "DocsExample",
    "uri" : "/syncs/6"
    }
  4. You can then use the sync's URI (/syncs/6) to check the status of the sync:

    GET https://secure.p03.eloqua.com/api/bulk/2.0/sync/6

    For a full description of the sync status codes, see: bulk API sync status codes

    When the sync is complete, Eloqua's response will resemble:

    200 OK

    {
    "syncedInstanceURI" : "/contacts/imports/6",
    "syncStartedAt" : "2014-01-01T13:59:07.1375620Z",
    "syncEndedAt" : "2014-01-01T13:59:14.1375620Z",
    "status" : "success",
    "createdAt" : "2014-01-01T13:59:07.1375620Z",
    "createdBy" : "DocsExample",
    "uri" : "/syncs/6"
    }

Bulk API custom object import

  1. Create the bulk import definition, setting the status to yes. The destination field refers to the feeder service's instance - in this example, the instance GUID is f82d50cd-86a9-4fca-b37e-4ec9a98b0339:

    Warning: When referencing service instances, you must transmit the GUID without dashes. The bulk API will error if you transmit the GUID with the dashes.

    Create a custom object import definition where the sync action sets the record's status, where the instance ID is f82d50cd-86a9-4fca-b37e4ec9a98b0339 :

    POST https://secure.p03.eloqua.com/api/bulk/2.0/customObjects/9/imports
    {
    "name" : "AwesomeApp Feeder Response Bulk Import",
    "updateRule" : "always",
    "fields" : {
    "email" : "{{CustomObject[9].Field[58]}}"
    },
    "syncActions" : [
    {
    "destination" : "{{FeederInstance(f82d50cd86a94fcab37e4ec9a98b0339)}}",
    "action" : "setStatus",
    "status" : "complete"
    }
    ],
    "identifierFieldName" : "email"
    }

    Eloqua’s response will be a 201 Created response that includes a uri parameter, which you can use to identify the import:

    HTTP/1.1 201 Created

    {
    "name" : "AwesomeApp Feeder Response Bulk Import",
    "updateRule" : "always",
    "fields" : {
    "email" : "{{CustomObject[9].Field[58]}}"
    },
    "identifierFieldName" : "email",
    "syncActions" : [
    {
    "destination" : "{{FeederInstance(f82d50cd86a94fcab37e4ec9a98b0339)}}",
    "action" : "setStatus",
    "status" : "complete"
    }
    ],
    "isSyncTriggeredOnImport" : false,
    "isUpdatingMultipleMatchedRecords" : false,
    "uri" : "/customObjects/imports/9",
    "createdBy" : "DocsExample",
    "createdAt" : "2014-03-06T13:59:00.6600046Z",
    "updatedBy" : "DocsExample",
    "updatedAt" : "2014-03-06T13:59:00.6600046Z"
    }
  2. Send Eloqua the data for import as a using the uri:
    POST https://secure.p03.eloqua.com/api/bulk/2.0/customObjects/imports/9/data
    [
    {
    "email" : "fred@example.com"
    },
    {
    "email" : "sylvie@example.com"
    }
    ]
  3. Synchronize the data for import:

    AwesomeApp’s request:

    POST https://secure.p03.eloqua.com/api/bulk/2.0/syncs
    {
    "syncedInstanceURI":"/customObjects/imports/9"
    }

    Eloqua’s Response:

    201 Created

    {
    "syncedInstanceURI" : "/customObjects/imports/9",
    "status" : "pending",
    "createdAt" : "2014-01-01T13:59:07.1375620Z",
    "createdBy" : "DocsExample",
    "uri" : "/syncs/9"
    }
  4. You can then use the sync’s uri (/syncs/9) to check the status of the sync:
    GET https://secure.p03.eloqua.com/api/bulk/2.0/sync/9

    For a full description of the sync status codes, see: Bulk API status codes

    When the sync is complete, Eloqua's response will resemble:

    200 OK

    {
    "syncedInstanceURI" : "/customObjects/imports/9",
    "syncStartedAt" : "2014-01-01T13:59:07.1375620Z",
    "syncEndedAt" : "2014-01-01T13:59:14.1375620Z",
    "status" : "success",
    "createdAt" : "2014-01-01T13:59:07.1375620Z",
    "createdBy" : "DocsExample",
    "uri" : "/syncs/9"
    }

Learn more: Bulk API imports.

If you run into trouble or have questions about the bulk API, check out the bulk API documentation.

Delete URL

The delete URL is a templated URL pointing to an endpoint for deleting an instance of your service.

The delete URL uses an HTTP DELETE request and there is no content sent in the request body. All common URL template parameters are available (the same as with a create URL). On success, this endpoint should return a 200-level response.

An example delete URL would look something like:

https://www.someurl.com/delete/{appId}/{installId}/{instanceId}/{userName}/{siteName}/{siteId}

Note: Delete calls are not sent in real time, but are done in a batch once daily.

Learn more

Service descriptions

Service level URL template parameters

App developer reference