8

I am attempting to post a new API Event that can be added to a Journey as an entry source.

I am able to make this call via Rest and see the new event when I open Entry Sources under Journey Builder. I am NOT, however, able to see this new source on a Journey so I cannot add it.

I was able to get an event to show by adding a sourceApplicationExtensionId to the POST body, BUT only the Id from an API Event that was created manually via Journey Builder-->Entry Sources-->New that I found thru a GET interaction/v1/eventDefinitions.

For instance, this works as expected:

{
    "type": "APIEvent",
    "name": "PMCNO",
    "description": "Attempt to create fromm Api",
    "mode": "Production",
    "eventDefinitionKey": "PmcNO-3CF1CBA3-6F3D-4AB9-95B1-0D8CC2D2944B",
    "dataExtensionId": "f5959669-183f-e711-b410-38eaa7142c91",
    "dataExtensionName": "Mike Data Extension",
    "iconUrl": "/events/images/customer.png",
    "sourceApplicationExtensionId": "7db1f972-f8b7-49b6-91b5-fa218e13953d",
    "arguments": {
        "serializedObjectType": 11,
        "criteria": "",
        "useHighWatermark": false,
        "eventDefinitionKey": "PmcNO-3CF1CBA3-6F3D-4AB9-95B1-0D8CC2D2944B",
        "dataExtensionId": "f5959669-183f-e711-b410-38eaa7142c91"
    },
    "metaData": {
        "criteriaDescription": "",
        "scheduleState": "No Schedule"
    },
    "isVisibleInPicker": true,
    "category": "Event"
}

Note the sourceApplicationExtensionId -- that is the Id on a manually created API Event.

This DOES NOT work (as in the Entry Source is created, but the Source does not show on a Journey):

{
    "type": "APIEvent",
    "name": "PMCOHYA",
    "description": "Attempt to create fromm Api",
    "mode": "Production",
    "eventDefinitionKey": "PmcYA-3CF1CBA3-6F3D-4AB9-95B1-0D8CC2D2944B",
    "dataExtensionId": "f5959669-183f-e711-b410-38eaa7142c91",
    "dataExtensionName": "Mike Data Extension",
    "iconUrl": "/events/images/customer.png",
    "sourceApplicationExtensionId": "e7703c10-06db-41cb-910c-cd78552c7b7b",
    "arguments": {
        "serializedObjectType": 11,
        "criteria": "",
        "useHighWatermark": false,
        "eventDefinitionKey": "PmcYA-3CF1CBA3-6F3D-4AB9-95B1-0D8CC2D2944B",
        "dataExtensionId": "f5959669-183f-e711-b410-38eaa7142c91"
    },
    "metaData": {
        "criteriaDescription": "",
        "scheduleState": "No Schedule"
    },
    "isVisibleInPicker": true,
    "category": "Event"
}

That sourceApplicationExtensionId is the Id of my test application created in AppCenter.

This also DOES NOT work (as in, the Entry Source is successfully created, but the Entry Source does show on a Journey):

{
    "type": "APIEvent",
    "name": "PMCOHYA",
    "description": "Attempt to create fromm Api",
    "mode": "Production",
    "eventDefinitionKey": "PmcYA-3CF1CBA3-6F3D-4AB9-95B1-0D8CC2D2944B",
    "dataExtensionId": "f5959669-183f-e711-b410-38eaa7142c91",
    "dataExtensionName": "Mike Data Extension",
    "iconUrl": "/events/images/customer.png",
    "arguments": {
        "serializedObjectType": 11,
        "criteria": "",
        "useHighWatermark": false,
        "eventDefinitionKey": "PmcYA-3CF1CBA3-6F3D-4AB9-95B1-0D8CC2D2944B",
        "dataExtensionId": "f5959669-183f-e711-b410-38eaa7142c91"
    },
    "metaData": {
        "criteriaDescription": "",
        "scheduleState": "No Schedule"
    },
    "isVisibleInPicker": true,
    "category": "Event"
}

The Dev docs (https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/createEventDefinition.htm) claim this property is not needed, but I am seeing differently in my testing and I cannot quite determine what it should actually be in reference to my app or Marketing Cloud instance.

5
  • 2
    I have just figured out where I found the sourceApplicationExtensionId that works. This is the sourceApplicationExtensionId of an API Event that I created manually thru Journey Builder-->Entry Sources-->New Event. I got this Id thru a GET interaction/v1/eventDefinitions and just added it to POST interaction/v1/eventDefinitions on a whim. So, the issue I am having is what, exactly, is this Id, where do I get it when I want to create an API Event thru the API, and, I guess, why is it needed and not documented as needed? Thanks for any help!
    – Mike
    Commented Jun 14, 2017 at 22:36
  • Great, please can you post your comment as an answer for the benefit of others. Commented Jun 15, 2017 at 23:13
  • I do not have an answer, Eliot. I have made it 'work', but I do not know if this is the solution. For instance, why does this Id from a manually created Api Event work? Where should this Id actually come from? Why does the dev docs state it is not required when it clearly is? I am currently in development on an App and I would really dislike going to Production with an arbitrary Id being set. I would like to know what should actually be set. Thanks.
    – Mike
    Commented Jun 16, 2017 at 14:23
  • 1
    Had the same issue. Found out that by setting 597d9e4a-1c0d-4225-86b2-0a1e864b7ca3 I can make it appear in the Salesforce Entry Events. Now opening ticket, hope will be back with more details!
    – Doug
    Commented Apr 9, 2018 at 15:41
  • Good deal, Doug. I never bothered opening a ticket as I was able to get it functioning, but I would be interested to know what support tells you.
    – Mike
    Commented Apr 9, 2018 at 19:33

1 Answer 1

0

This seemed to work for me when trying to customise an API entry event for a specific journey with a specified DE...

First, used the Journey API ID to source the other ID details (sourceApplicationExtensionId & dataExtensionId) needed to POST a new Entry Event within the relative Journey setup - in order to get that, used this;

GET [PARAMS =] 
https://www.exacttargetapis.com/interaction/v1/eventDefinitions/key:{API Key of Journey}
Authorization : BEARER [Paste token from above call]
Content Type: application/json

Then pasted those retrieved ID's into the new Event Definition POST...

Host: https://www.exacttargetapis.com
POST /interaction/v1/eventDefinitions
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN

    {
"type": "APIEvent",
"name": "JOURNEY ALM eBrochure UAT",
"description": "Contacts submitting an eBrochure",
"mode": "Production",
"eventDefinitionKey": "UATeBrochure",
"dataExtensionId": "12345678-9101-e11e-1234-15g16hw17ie18",
"dataExtensionName": "SUBSCRIBERS_ALM_eBrochure_UAT",
"sourceApplicationExtensionId": "1grijm13-2abc-3456-78z9-de1011fg124",
"iconUrl": "/events/images/icon_journeyBuilder-event-api-blue.svg",
"arguments": {
    "serializedObjectType": 11,
    "eventDefinitionKey": "UATeBrochure",
    "dataExtensionId": "12345678-9101-e11e-1234-15g16hw17ie18",
    "criteria": "",
    "useHighWatermark": false
    },
"metaData": {
    "scheduleState": "No Schedule",
    "criteriaDescription": ""
    },
"isVisibleInPicker": true,
"category": "Event"
}

Went into the journey and was able to select the the API Entry Event, BUT NOT ABLE to customise anything within it, such as changes that can be done in a standard New API Entry Event Data Extension or Name.

Customised Entry Event

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .