5 Replies Latest reply on Sep 12, 2016 4:53 AM by Lou Patrick

    How to get the Step ID in Campaign Canvas via API?

    jmugo

      Hi,

      Has anyone successfully retrieved the Step ID of a particular element in Campaign Canvas via API? Is there documentation around this somewhere?

        • 1. Re: How to get the Step ID in Campaign Canvas via API?
          Lou Patrick

          Here is what's currently available related to Campaigns via the REST API - Campaigns API.

           

          With the GET /assets/campaign/{id}, the steps are returned in the "elements" array and the id is included for each step.

          • 2. Re: How to get the Step ID in Campaign Canvas via API?
            Shawn Chen-Oracle

            Below API can help to get the campaign step ID.

            GET /assets/campaign/<campaign id>

            • 3. Re: How to get the Step ID in Campaign Canvas via API?
              Lou Patrick

              As there is not an example that includes a complete response currently on the Developer Help Center, here is a complete example response that includes the elements array.

               

              Retrieve the campaign asset with Id #12:

               

              Request

              GET /API/REST/2.0/assets/campaign/12?depth=complete

               

              Response

              {

                "type": "Campaign",

                "currentStatus": "Draft",

                "id": "12",

                "createdAt": "1461773489",

                "createdBy": "11",

                "depth": "complete",

                "description": "Super simple nurture campaign.",

                "folderId": "308",

                "name": "Super Simple Nurture Campaign",

                "permissions": [

                  "Retrieve",

                  "SetSecurity",

                  "Delete",

                  "Update",

                  "Activate"

                ],

                "sourceTemplateId": "8589934608",

                "updatedAt": "1461775397",

                "updatedBy": "11",

                "elements": [

                  {

                    "type": "CampaignSegment",

                    "id": "257",

                    "name": "Segment members",

                    "memberCount": "0",

                    "outputTerminals": [

                      {

                        "type": "CampaignOutputTerminal",

                        "id": "252",

                        "connectedId": "258",

                        "connectedType": "CampaignWaitAction",

                        "terminalType": "out"

                      }

                    ],

                    "position": {

                      "type": "Position",

                      "x": "365",

                      "y": "39"

                    },

                    "isFinished": "false",

                    "isRecurring": "false"

                  },

                  {

                    "type": "CampaignWaitAction",

                    "id": "258",

                    "name": "Wait",

                    "memberCount": "0",

                    "outputTerminals": [

                      {

                        "type": "CampaignOutputTerminal",

                        "id": "253",

                        "connectedId": "259",

                        "connectedType": "CampaignEmail",

                        "terminalType": "out"

                      }

                    ],

                    "position": {

                      "type": "Position",

                      "x": "365",

                      "y": "131"

                    },

                    "waitFor": "3600"

                  },

                  {

                    "type": "CampaignEmail",

                    "id": "259",

                    "name": "Email 1",

                    "memberCount": "0",

                    "outputTerminals": [

                      {

                        "type": "CampaignOutputTerminal",

                        "id": "274",

                        "connectedId": "263",

                        "connectedType": "CampaignWaitAction",

                        "terminalType": "out"

                      }

                    ],

                    "position": {

                      "type": "Position",

                      "x": "365",

                      "y": "222"

                    },

                    "includeListUnsubscribeHeader": "false",

                    "isAllowingResend": "false",

                    "isAllowingSentToMasterExclude": "false",

                    "isAllowingSentToUnsubscribe": "false",

                    "sendTimePeriod": "sendAllEmailAtOnce"

                  },

                  {

                    "type": "CampaignWaitAction",

                    "id": "263",

                    "name": "Wait",

                    "memberCount": "0",

                    "outputTerminals": [

                      {

                        "type": "CampaignOutputTerminal",

                        "id": "270",

                        "connectedId": "279",

                        "connectedType": "CampaignEmail",

                        "terminalType": "out"

                      }

                    ],

                    "position": {

                      "type": "Position",

                      "x": "365",

                      "y": "316"

                    },

                    "waitFor": "259200"

                  },

                  {

                    "type": "CampaignEmail",

                    "id": "279",

                    "name": "Email 2",

                    "memberCount": "0",

                    "outputTerminals": [

                      {

                        "type": "CampaignOutputTerminal",

                        "id": "275",

                        "connectedId": "281",

                        "connectedType": "CampaignMoveToContactListAction",

                        "terminalType": "out"

                      }

                    ],

                    "position": {

                      "type": "Position",

                      "x": "365",

                      "y": "409"

                    },

                    "includeListUnsubscribeHeader": "true",

                    "isAllowingResend": "false",

                    "isAllowingSentToMasterExclude": "false",

                    "isAllowingSentToUnsubscribe": "false",

                    "sendTimePeriod": "sendAllEmailAtOnce"

                  },

                  {

                    "type": "CampaignMoveToContactListAction",

                    "id": "281",

                    "name": "Move to Shared List",

                    "memberCount": "0",

                    "position": {

                      "type": "Position",

                      "x": "365",

                      "y": "501"

                    }

                  }

                ],

                "isReadOnly": "false",

                "actualCost": "0.00",

                "budgetedCost": "0.00",

                "campaignCategory": "contact",

                "campaignType": "",

                "fieldValues": [

                  {

                    "type": "FieldValue",

                    "id": "4",

                    "value": ""

                  },

                  {

                    "type": "FieldValue",

                    "id": "5",

                    "value": ""

                  },

                  {

                    "type": "FieldValue",

                    "id": "6",

                    "value": ""

                  },

                  {

                    "type": "FieldValue",

                    "id": "7",

                    "value": ""

                  }

                ],

                "isEmailMarketingCampaign": "false",

                "isIncludedInROI": "true",

                "isMemberAllowedReEntry": "false",

                "isSyncedWithCRM": "true",

                "product": "",

                "region": ""

              }

               

              For reference, here is what the Campaign looks like in Eloqua:

                   get_campaign_example.png

              • 4. Re: How to get the Step ID in Campaign Canvas via API?
                james.papke

                Another option is to use the Live Docs page https://secure.p01.eloqua.com/api/docs/Dynamic/Rest/2.0/Reference.aspx. Note, you need to be logged into Eloqua and your user needs to have API access. Additionally, you need to modify the "p01" part of the URL dependent on the POD your Eloqua instance is on.

                 

                Once on the page, navigate to "/assets", then "GET /assets/campaign/{id}". Input your Eloqua Campaign ID into the "id" parameter value, then click "execute". You should get a response that includes the various campaign elements, and their associated IDs.

                 

                Note, this is live access into the API, so be careful not to run and PUT/POST/DELETE unintentionally!

                • 5. Re: How to get the Step ID in Campaign Canvas via API?
                  Lou Patrick

                  Please note the live docs are not officially supported or maintained. Usage of the live docs is at your own risk.

                   

                  All official developer framework and API documentation can be found here http://docs.oracle.com/cloud/latest/marketingcs_gs/OMCAB/index.html.