Many AppCloud Services require that you configure a Notification URL when registering the service. The Notification URL is essentially a webhook: it is the URL that Eloqua should call out to when something happens.
For example, when an Eloqua contact visits a landing page containing an AppCloud Content service instance, Eloqua calls out to the service provider's Notification URL to request the HTML content needed to populate the landing page. Similarly, when contacts flow into an AppCloud Decision or AppCloud Action step during a campaign, Eloqua calls out to the Notification URL to notify the App that contacts have reached that step.
The Notification URL is a templated URL which supports the common parameters, including {InstanceId}, {InstallId}, {AssetId}, {AssetName}, {UserName}, {UserId}, and {UserCulture}. The AppCloud Content Service Notification URL also supports {VisitorId}, which maps to the ID of a visitor when called from a landing page, to enable delivery of visitor-specific content.
When the Notification URL is called for AppCloud Actions, Decisions, or Content, Eloqua also sends, as parameters, the fields specified by your App during the Instantiation Phase. For example, AwesomeApp has an AppCloud Decision service. Its notification URL is:
https://example.com/awesomeapp/decide/notify?instance={InstanceId}&asset={AssetId}
During Instantiation, ExampleApp specified that it requires the Contact Id, email address, field1, field2, and field3 in the recordDefinition field of the service instance data transfer object. The recordDefinition field was:
"recordDefinition": {
"contactID" : "{{Contact.Id}}",
"email" : "{{Contact.Field(C_EmailAddress)}}",
"field1" : "{{Contact.Field(C_Field1)}}",
"field2" : "{{Contact.Field(C_Field2)}}",
"field3" : "{{Contact.Field(C_Field3)}}"
}
Suppose that two contacts, fred@example.com and sylvie@example.com, flowed into an AppCloud Decision step. Eloqua's call to the Notification URL would then resemble:
POST https://example.com/awesomeapp/decide/notify?instance=123&asset=456
{
"offset" : 0,
"limit" : 1000,
"totalResults" : 2,
"count" : 2,
"hasMore" : false,
"items" :
[
{
"contactID" : "1",
"email" : "fred@example.com",
"field1" : "stuff",
"field2" : "things",
"field3" : "et cetera"
},
{
"contactID" : "2",
"email" : "sylvie@example.com",
"field1" : "more stuff",
"field2" : "other things",
"field3" : "and so on"
}
]
}
The appropriate response to the Notification URL call varies slightly depending on which service you're developing. You can see the appropriate responses for each service type in the following documents: