Some tips for using Dream It:

Search: It's possible your idea has already been submitted and is collecting votes. Use the box to the right to search for keywords. Beware of duplicating ideas, since votes can get diluted between multiple submissions.

Create: Click here to create a new idea if your idea is not already submitted.

Browse: Use the links below to check out what's already been submitted, and don't forget to vote when you find something you want to see in Eloqua!

Oracle Eloqua

Enable setting "CDO Default Entity Field Mapping" via Application API — oracle-topliners

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Enable setting "CDO Default Entity Field Mapping" via Application API

User_31X4JUser_31X4J Posts: 8 Red Ribbon
edited August 10 in Dream It

On CDO Create and/or Update via Application API, enable setting of "CDO Default Entity Field Mapping". including Entity Type and Entity Field.  Without this functionality, data card uploads via the import wizard do not always automatically map to corresponding records.

Post edited by Unknown User on
1 votes

Active · Last Updated

Comments

  • Lou PatrickLou Patrick Posts: 222 Gold Badge

    The ability to map Custom Object records is currently available using the Application API and the Bulk API.

    Application API (Contacts only, by Contact Id only):

         Endpoint: Create custom object data

         Example request creating a new Custom Object record for a Custom Object with an id of 14, and mapping the record to a Contact record with the id of 1:

              Request

    POST  /api/REST/2.0/data/customObject/14/instance

              Request - Body

    {  "type": "CustomObjectData",  "contactId": "1",  "fieldValues": [    {      "id": "107",      "value": "[email protected]"    }  ]}

              Response

    {  "type": "CustomObjectData",  "id": "31",  "contactId": "1",  "fieldValues": [    {      "id": "107",      "value": "[email protected]"    }  ]}

              Note, I confirmed Custom Object record was successfully mapped to Contact in Eloqua.

    Bulk API (Contacts and Accounts):

         Endpoints and Tutorial:

         Example import definition request to import Custom Object records for a Custom Object with an id of 14, and map them to Account records using the Company Name Account field:

              Request

    POST /api/bulk/2.0/customObjects/14/imports

              Request - Body

    {  "name": "Map to Accounts Import",  "fields": {    "email": "{{CustomObject[14].Field[107]}}",    "companyName": "{{CustomObject[14].Field[108]}}"   },  "identifierFieldName": "email",  "mapDataCards": true,  "mapDataCardsEntityType": "Company",  "mapDataCardsEntityField": "{{Account.Field(M_CompanyName)}}",  "mapDataCardsSourceField": "companyName",  "mapDataCardsCaseSensitiveMatch": false}

              Response

    {  "id": 20,  "parentId": 14,  "mapDataCards": true,  "mapDataCardsCaseSensitiveMatch": false,  "mapDataCardsEntityField": "{{Account.Field(M_CompanyName)}}",  "mapDataCardsSourceField": "companyName",  "mapDataCardsEntityType": "Company",  "name": "Map to Accounts Import",  "fields": {    "email": "{{CustomObject[14].Field[107]}}",    "companyName": "{{CustomObject[14].Field[108]}}"  },  "identifierFieldName": "email",  "isSyncTriggeredOnImport": false,  "dataRetentionDuration": "P7D",  "isUpdatingMultipleMatchedRecords": false,  "uri": "/customObjects/14/imports/20",  "createdBy": "Lou.Patrick",  "createdAt": "2016-07-29T22:13:27.9841117Z",  "updatedBy": "Lou.Patrick",  "updatedAt": "2016-07-29T22:13:27.9841117Z"}
  • User_31X4JUser_31X4J Posts: 8 Red Ribbon

    Thanks for the response, Lou!

    Sorry, I wasn't specific enough - Using API script, we'd like to be able to set Email Address as the Default Entity Mapping field for CDOs upon CDO creation and/or update via API.  Using API script, we're scheduling SQL data to automatically create CDOs and regularly upload current data to them but there doesn't appear to be a way, using API script, to pre-set Email Address as the Default Entity Mapping field for each CDO in order to map CDO data cards to contact records on email address.

    Appreciate any additional input!

    map using EmailAddress on the contact object

  • Lou PatrickLou Patrick Posts: 222 Gold Badge

    Thanks for the response, Lou!

    Sorry, I wasn't specific enough - Using API script, we'd like to be able to set Email Address as the Default Entity Mapping field for CDOs upon CDO creation and/or update via API.  Using API script, we're scheduling SQL data to automatically create CDOs and regularly upload current data to them but there doesn't appear to be a way, using API script, to pre-set Email Address as the Default Entity Mapping field for each CDO in order to map CDO data cards to contact records on email address.

    Appreciate any additional input!

    map using EmailAddress on the contact object

    Using the Bulk API this can be accomplished using the mapDataCards parameters as detailed in previous comment.

  • User_31X4JUser_31X4J Posts: 8 Red Ribbon

    Lou, will the solution you provided above still work for SQL contacts that don't initially have an Eloqua ContactID (i.e., new contacts being loaded to Eloqua)?  Thanks again!

  • Lou PatrickLou Patrick Posts: 222 Gold Badge

    Lou, will the solution you provided above still work for SQL contacts that don't initially have an Eloqua ContactID (i.e., new contacts being loaded to Eloqua)?  Thanks again!

    Yes, the Bulk API allows you to choose the field to match on when importing, i.e. you can match on email address. See Import data into Eloqua for a tutorial on importing data via the Bulk API.

  • User_31X4JUser_31X4J Posts: 8 Red Ribbon

    Thanks much!  We'll look into this.  Appreciate your insight!

  • User_31X4JUser_31X4J Posts: 8 Red Ribbon

    We tested three different Bulk API scripts (below) with the same request structure you provided but with different values for the following variables and got this note upon execution:  "Request 3 will not add records into contact object"

    1) Identifier field as "EloquaKey"

    2) mapCardsEntityType as "Contact" instead of "Company"

    3) mapcardsourcefield as "EmailAdress"

    What did we miss?  Thanks!

    Bulk API Scripts:

    Script #1

    {

    "identifierFieldName": "EloquaKey",

    "name": "cdo_import_definition_TestCDO_For_ContactMap_WithoutBuild_1_20200521_637256176675882899",

    "fields": {

    "EloquaKey": "{{CustomObject[1183].Field[68904]}}",

    "EmailAddress": "{{CustomObject[1183].Field[68905]}}",

    "EntityType1": "{{CustomObject[1183].Field[68906]}}",

    "FirstName1": "{{CustomObject[1183].Field[68907]}}",

    "LastName11": "{{CustomObject[1183].Field[68908]}}",

    "LastName21": "{{CustomObject[1183].Field[68909]}}"

        },

    "isSyncTriggeredOnImport": false,

    "updateRule": "always",

    "mapDataCardsEntityType": "Contact",

    "mapDataCardsSourceField": "EmailAddress",

    "mapDataCardsEntityField": "{{Contact.Field(C_EmailAddress)}}",

    "dataRetentionDuration": "P2D",

    "mapDataCards": "true",

    "autoDeleteDuration": "P2D",

    "isUpdatingMultipleMatchedRecords": true

    }

    Script #2

    {

    "identifierFieldName": "EloquaKey",

    "name": "cdo_import_definition_TestCDO_For_ContactMap_WithoutBuild_1_20200521_637256429148674591",

    "fields": {

    "EloquaKey": "{{CustomObject[1183].Field[68904]}}",

    "EmailAddress": "{{CustomObject[1183].Field[68905]}}",

    "EntityType1": "{{CustomObject[1183].Field[68906]}}",

    "FirstName1": "{{CustomObject[1183].Field[68907]}}",

    "LastName11": "{{CustomObject[1183].Field[68908]}}",

    "LastName21": "{{CustomObject[1183].Field[68909]}}"

        },

    "isSyncTriggeredOnImport": false,

    "updateRule": "always",

    "mapDataCardsEntityType": "1",

    "mapDataCardsSourceField": "EmailAddress",

    "mapDataCardsEntityField": "{{Contact.Field(C_EmailAddress)}}",

    "dataRetentionDuration": "P2D",

    "mapDataCards": true,

    "autoDeleteDuration": "P2D",

    "isUpdatingMultipleMatchedRecords": true

    }

    Script #3

    {

    "identifierFieldName": "EloquaKey",

    "name": "cdo_import_definition_TestCDO_For_ContactMap_WithoutBuild_1_20200521_637256440496358808",

    "fields": {

    "EloquaKey": "{{CustomObject[1183].Field[68904]}}",

    "EmailAddress": "{{CustomObject[1183].Field[68905]}}",

    "EntityType1": "{{CustomObject[1183].Field[68906]}}",

    "FirstName1": "{{CustomObject[1183].Field[68907]}}",

    "LastName11": "{{CustomObject[1183].Field[68908]}}",

    "LastName21": "{{CustomObject[1183].Field[68909]}}"

        },

    "isSyncTriggeredOnImport": false,

    "updateRule": "always",

    "mapDataCardsEntityType": "Contact",

    "mapDataCardsSourceField": "EmailAddress",

    "mapDataCardsEntityField": "{{Contact.Field(ContactIDExt)}}",

    "dataRetentionDuration": "P2D",

    "mapDataCards": true,

    "autoDeleteDuration": "P2D",

    "isUpdatingMultipleMatchedRecords": true

    }

  • Lou PatrickLou Patrick Posts: 222 Gold Badge

    We tested three different Bulk API scripts (below) with the same request structure you provided but with different values for the following variables and got this note upon execution:  "Request 3 will not add records into contact object"

    1) Identifier field as "EloquaKey"

    2) mapCardsEntityType as "Contact" instead of "Company"

    3) mapcardsourcefield as "EmailAdress"

    What did we miss?  Thanks!

    Bulk API Scripts:

    Script #1

    {

    "identifierFieldName": "EloquaKey",

    "name": "cdo_import_definition_TestCDO_For_ContactMap_WithoutBuild_1_20200521_637256176675882899",

    "fields": {

    "EloquaKey": "{{CustomObject[1183].Field[68904]}}",

    "EmailAddress": "{{CustomObject[1183].Field[68905]}}",

    "EntityType1": "{{CustomObject[1183].Field[68906]}}",

    "FirstName1": "{{CustomObject[1183].Field[68907]}}",

    "LastName11": "{{CustomObject[1183].Field[68908]}}",

    "LastName21": "{{CustomObject[1183].Field[68909]}}"

        },

    "isSyncTriggeredOnImport": false,

    "updateRule": "always",

    "mapDataCardsEntityType": "Contact",

    "mapDataCardsSourceField": "EmailAddress",

    "mapDataCardsEntityField": "{{Contact.Field(C_EmailAddress)}}",

    "dataRetentionDuration": "P2D",

    "mapDataCards": "true",

    "autoDeleteDuration": "P2D",

    "isUpdatingMultipleMatchedRecords": true

    }

    Script #2

    {

    "identifierFieldName": "EloquaKey",

    "name": "cdo_import_definition_TestCDO_For_ContactMap_WithoutBuild_1_20200521_637256429148674591",

    "fields": {

    "EloquaKey": "{{CustomObject[1183].Field[68904]}}",

    "EmailAddress": "{{CustomObject[1183].Field[68905]}}",

    "EntityType1": "{{CustomObject[1183].Field[68906]}}",

    "FirstName1": "{{CustomObject[1183].Field[68907]}}",

    "LastName11": "{{CustomObject[1183].Field[68908]}}",

    "LastName21": "{{CustomObject[1183].Field[68909]}}"

        },

    "isSyncTriggeredOnImport": false,

    "updateRule": "always",

    "mapDataCardsEntityType": "1",

    "mapDataCardsSourceField": "EmailAddress",

    "mapDataCardsEntityField": "{{Contact.Field(C_EmailAddress)}}",

    "dataRetentionDuration": "P2D",

    "mapDataCards": true,

    "autoDeleteDuration": "P2D",

    "isUpdatingMultipleMatchedRecords": true

    }

    Script #3

    {

    "identifierFieldName": "EloquaKey",

    "name": "cdo_import_definition_TestCDO_For_ContactMap_WithoutBuild_1_20200521_637256440496358808",

    "fields": {

    "EloquaKey": "{{CustomObject[1183].Field[68904]}}",

    "EmailAddress": "{{CustomObject[1183].Field[68905]}}",

    "EntityType1": "{{CustomObject[1183].Field[68906]}}",

    "FirstName1": "{{CustomObject[1183].Field[68907]}}",

    "LastName11": "{{CustomObject[1183].Field[68908]}}",

    "LastName21": "{{CustomObject[1183].Field[68909]}}"

        },

    "isSyncTriggeredOnImport": false,

    "updateRule": "always",

    "mapDataCardsEntityType": "Contact",

    "mapDataCardsSourceField": "EmailAddress",

    "mapDataCardsEntityField": "{{Contact.Field(ContactIDExt)}}",

    "dataRetentionDuration": "P2D",

    "mapDataCards": true,

    "autoDeleteDuration": "P2D",

    "isUpdatingMultipleMatchedRecords": true

    }

    For script 3, assuming the custom object field set to "EmailAddress" is actually storing an email address, you'd need to set mapDataCardsEntityField to the contact email address field "{{Contact.Field(C_EmailAddress)}}" in order to successfully map.

  • User_31X4JUser_31X4J Posts: 8 Red Ribbon
    edited August 10

    Lou, if we make the last change you suggested, then it's the same as script 1, which is working but the issue is that it doesn't actually update the Default Entity Field Mapping in the CDO UI:

    pastedImage_0.png

  • Lou PatrickLou Patrick Posts: 222 Gold Badge

    Lou, if we make the last change you suggested, then it's the same as script 1, which is working but the issue is that it doesn't actually update the Default Entity Field Mapping in the CDO UI:

    pastedImage_0.png

    The Default Entity Field Mapping in the CDO UI only applies to uploads, and has no impact on the Bulk API. It only sets the default on step 4 of the Custom Object Record Upload Wizard, for which you can change it once you arrive on the step.

  • User_31X4JUser_31X4J Posts: 8 Red Ribbon
    edited August 10

    Yeah, so what we're trying to solve for is the automated setting of that Entity Field (=Email Address) for the Default Entity Mapping of the CDO UI (image in my last comment) using API - it sounds like that's not possible?  If not, then this would be a great feature to have for more full/completion functionality around CDO creation/upload via API.

    Post edited by Unknown User on
  • Lou PatrickLou Patrick Posts: 222 Gold Badge

    Yeah, so what we're trying to solve for is the automated setting of that Entity Field (=Email Address) for the Default Entity Mapping of the CDO UI (image in my last comment) using API - it sounds like that's not possible?  If not, then this would be a great feature to have for more full/completion functionality around CDO creation/upload via API.

    That is not possible today. I've updated this idea to reflect this feature request and re-opened.

  • User_31X4JUser_31X4J Posts: 8 Red Ribbon

    Okay.  Thanks much for your time and attention to this inquiry, Lou!  Greatly appreciated!

Sign In or Register to comment.