Respond when a marketer copies a service instance

Marketers often create new campaigns, landing pages, and emails from existing resources. When a marketer creates a campaign, landing page, or email using the Save As option in the campaign canvas and landing page or email editors all of the objects in that resource are duplicated. For most items on a canvas, this is straightforward. For services that follow the instantiation-execution model, however, each instance has its own unique identifier. Thus, when an action, decision, feeder, or content service instance is copied, a new GUID needs to be assigned to the copy. The Oracle Eloqua app developer framework uses the Copy URL to communicate with the service's provider to configure and update the new service instance when a service is copied.

Sample copy URL call and response

Eloqua's call to the copy URL is similar to the call to the create URL when a service is first created. The following section provides step-by-step instructions for properly handling calls to the copy URL. This example uses a decision service, but the process is the same for actions, content, and feeders.

  1. A marketing user copies a campaign that includes an AwesomeApp decision service whose templated copy URL is:{InstanceId}&originalId={OriginalInstanceId}
  2. Eloqua calls out to the copy URL, replacing the templated parameters with the original service's GUID, and the new GUID of the copy. AwesomeApp can use the original service's GUID to determine the appropriate configuration options for the copy:

  3. AwesomeApp responds in one of two ways: either it replies with an HTTP 200 Ok response, and no content, in which case Eloqua will use the original service's configuration for the new service, or, AwesomeApp replies with a 200-level HTTP response along with a DTO specifying how the new service should be configured, as in the following:

    HTTP/1.1 200 OK
    "ContactId": "{{Contact.Id}}",
    "EmailAddress": "{{Contact.Field(C_EmailAddress)}}"

    Internally, Eloqua then updates the references in the campaign to the new service instance GUID, and the new campaign is created.

Persistent settings and data

As an app provider, you have control over what data and settings are persisted when a service is copied: if you wish to retain the configuration of the original service, simply return a blank DTO when Eloqua calls out to the copy URL. Conversely, if you wish to update the configuration of the new service, you can do so by replying with a new DTO.

Once a service has been copied, and the new service has been configured, there is no link between the original and new services: changing the configuration in one does not affect the other.

Learn more

App Developer Framework