Hi all,
I'm just getting started on a new integration between Eloqua and our CRM system. For now I'm primarily interested in exporting Contacts from Eloqua.
I have 2 questions regarding the Eloqua REST API:
1. Searching for Contacts on most fields works fine. However, some fields result in an Internal Server Error 500. For instance, dateModified and dateCreated seem to cause this. Am I doing something wrong, or is this a known issue? I’m trying the following:
GET /Api/rest/1.0/data/contacts?search=C_DateModified%3D1389988359
2. In the JSON results returned from a Contact search, it seems like most fields are returned in the “fieldValues” array. This works well, and I’ve learned out how to look up the corresponding field definitions by their Ids in the results. However, a dozen fields are returned in a different format at the root level (e.g. updatedAt, accountName, businessPhone, country, emailAddress, firstName, lastName, etc.). I’m finding that this difference makes it difficult to work with the API consistently. I’m also not sure how to correlate these root-level fields with their field definitions. Is there any way to request that *all* fields be returned in the fieldValues array?
I also have a question regarding Filters in the Bulk API:
3. When creating an Export for exporting Contacts, it’s possible to specify a selection Filter, e.g.:
"filter":{"filterRule":"valueGreaterThanComparisonValue","value":"{{Contact.Field(C_DateModified)}}","comparisonValue":"2014-02-05 15:36:58"}
Is it possible to specify more than one Filter this way? (And if so, can one perform AND / OR operations on them?) Or must multiple selection criteria be accomplished by using a Segment Filter?
If a Segment Filter is required, I suppose I will need to programmatically create a new one for each export we do (and then delete it along with the export) since the dateModified we’re interested in will change with every export. Does that sound right, or is there a way to create a “reusable” Segment to which I could just pass in the desired date with each invocation?
Edit: I have another question regarding filters, so I'll add it here:
4. Using the filter from question #3 above, I'm finding that Eloqua will return contacts with a C_DateModified value of 2014-02-05 15:36:58 (Note that this is not *greater than* 2014-02-05 15:36:58, so I wouldn't expect to see such records returned). Is this a bug, or expected behavior? My guess is that internally the Eloqua platform is storing datetimes with millisecond precision, but delivering them rounded or floored to the second. In this case, the records in question probably have C_DateModified values slightly greater than 2014-02-05 15:36:58 (e.g. 15:36:58.342) so the logic is technically correct. Is there any way to request/query millisecond-precision datetimes?
To give this some context, I'm trying to query contacts for export to our CRM system. A process will run periodically and request all contacts updated since the last run. I don't want to risk missing any contact updates due to minor timing issues, so my plan was to set the C_DateModified filter for each run to be greater than the most recent C_DateModified value returned in the previous run. This approach is thwarted by the problem described though. Is there a better way to accomplish this?
Thanks for any help!
Message was edited by: Lorne McIntosh