Now that you've built your Cloud Component Provider, and exposed your Endpoints, it's time to create your Service Definition.

 

The Service Definition is a publicly exposed JSON document that describes your Provider. 

 

The following must be outlined in the Service Definition:

 

  • Provider Name
  • Version
  • Logo
  • A list of the Cloud Components that are a part of your Provider.  Each item in the component section must define:
    • Component Name
    • A 64x64 icon
    • A list of exposed Endpoints

 

Let's look at an example of what a JSON Service Definition could look like:

 

{

"name": "My CCP Provider",

"version": "2.0.0",

"logoUrl": "https://mycompany.com/ccpservice/images/ccpLogo.png",

"components": [{

    "name": "My First Component",

    "description": "This is my first Eloqua Cloud Component",

    "iconURL": "https://mycompany.com/ccpservice/images/components/icon.png",

    "componentImage": {

      "height": "200",

      "width": "200",

      "url": "https://mycompany.com/ccpservice/images/components/placeholder.png"

    },

    "createInstance": "https://mycompany.com/ccpservice/components/create/{Id}",

    "removeInstance": "https://mycompany.com/ccpservice/components/remove/{Id}",

    "configurationUrl": "https://mycompany.com/ccpservice/components/configure/myComponentConfig.aspx?{Id}",

    "renderInstance": "https://mycompany.com/ccpservice/components/render/{Id}?assetId={AssetId}&contactId={ContactId}&visitorId={VisitorId}",

    "instanceImage": "https://mycompany.com/ccpservice/components/preview/{Id}?assetId={AssetId}&contactId={ContactId}&visitorId={VisitorId}"

  }]

}

 

The first section of the JSON document describes you Provider. This section contains the following:

 

  • The name property is the name of your provider service.  This will be displayed in both the cloud component setup and landing page editor areas of Eloqua. 
  • The version property contains your provider version information.
  • The logoUrl property points to the location of your provider’s logo. Your logo will show in the cloud component setup area of Eloqua.


Next is an array of components, with each item in the array representing a single component.  In the example JSON above, the provider has only a single component.  Below are the properties for this section, and how they are used:

 

  • name - Represents the name of the component.
  • description - This is a description for your component.  This is displayed cloud components setup area of Eloqua application and should contain some usage information.
  • iconUrl - The location of your component's icon (64x64).  This icon will be displayed in both the cloud component setup and landing page editor areas of Eloqua, and should provide an easy way for users to identify your component.
  • componentImage - The location of the image that will be displayed when your component is dragged onto a landing page in Eloqua.  This will serve as a placeholder image for your component until it is rendered on the page.

 

Now that you have your Service Definition built, it will be used to register your Provider with Eloqua.