Create Response Page

An API Response Page is a page returned as a response to an API call and can be in HTML, XML, JSON, CSS or plain text format.

The non-HTML-types are meant to be used when you want to provide API-responses to external services, which contain data that is stored in Marigold Engage. This makes it possible to use data stored in the Engage database for content automation. The MIME-types of the streamed page/result will reflect this selection.

Example:
You want to send a message to a contact and put the hyperlinks in his favorite colors. This requires a dynamic CSS. By sending an API call and retrieving the favorite color for the contact, you can generate an updated CSS that displays the hyperlinks in his favorite color and send this CSS page back to the API.

Example2:
You want an existing form on the website to submit data to a journey, so all advanced journey capabilities can be used. This submit is done via an AJAX-request and expects a result saying “success” or a list of error messages. Setting up the journey has never been an issue, but serving the response as XML or JSON was trickier. With this native API Response Page, we can now very easily set this up. The journey can be called with the trigger-endpoint in the Custom journeys chapter.

 

Technical Note:
To use the information in a Response page, it needs to be added to a journey, after an Input Component. Every journey has an anonymous link. This link can be used on the website to retrieve the data from the Response Page.

 

Response Pages can be created in several ways:

  • From the fly-out menu in the content entry of the left navigation bar.
  • From the Content Start page, via the toolbar
  • From the global Home page, via the toolbar

1. To create a page, go to the Content entry, and select New from the fly-out menu and then the Response page type from the wizard:

 

2. Next, choose the type of page to create:

3. A Properties panel is displayed:

The properties are grouped by type of information. By default only the Basic fields are displayed. Switch to the Advanced fields tab to display all other fields. On the left hand side of the properties, on-screen help is provided. This helps the user filling out the form with accurate and comprehensive information.

Basic fields tab:

Basics

  • Folder path — This is the folder in which the asset is created. By default it takes the folder that is currently selected on the Start page when the asset is created. You can modify the path if required. Click the folder field to access the dialog and select a different folder
  • Name — Enter a Name for the page. Use a unique name to easily recognize the page when using it in a journey. The description can be helpful to describe what the page is used for.

Target

  • Audience — Select an Audience List. All fields from the selected audience can be used to personalize the page.
  • Languages — Select one or more Languages. The list of available languages depends on the organization for which the page is created. The Language field is pre-filled with the default languages defined at Organization level. For each of the selected languages you will be able to create a version of the page.

Advanced fields tab:

Basics

  • API name — Set the API-Name. By default the API name is filled out automatically based on the name of the page. Change it if needed. The API name is used to call the page via the API Explorer.
  • Labels — Optionally, add one or more Asset labels (These labels are configured in the Admin configuration.) Users with the proper Access permissions can also create new labels here by typing the new label value in the field.
  • Description — Set a clear description of what this content is used for.

4. Click Create Page when done.

Note: You can now create the content of the page. The content components available to you for a response page of type XML, JSON, CSS, plain text is the repeater. This allows you for example to generate a list of items in a JSON page.

Note: For a response page of type HTML all the standard page components are available.