Example

This example Data Stream demonstrates how to use these Agents to listen for a specific Recommendation's Action Requests, send low-inventory notifications, and close the Action Request.

Refer to the configuration for the Read Action Request and Close Action Request to understand all configuration options of these agents.

Step 1: Add the Agents

Drag the Read Action Request Recommendation Agent onto the canvas and link the output endpoint to the Deserialize Parameters JSON Agent.

Drag the Close Action Request Recommendation Agent onto the canvas, link the input endpoint to the Record Inventory Request Agent, and the output to the Event Printer. Save the Data Stream.

Step 2: Configure the Read Action Request

Select the Read Action Request Agent and click Configure. Keep the default Collection and polling interval.

Configure App Designer

Set the App Designer Url and Key.

Configure Action Request Filter

Select the Filter Type and criteria to monitor. In this case, set Filter Type to Recommendation Form, Form to Action Request Example Form, and Recommendation (optional) to Action Request Example Recommendation.

Apply the changes and save the Data Stream.

Step 3: Configure the Close Action Request

Select the Close Action Request Agent and click Configure. Keep the default Collection and polling interval.

Configure App Designer

Set the App Designer Url and Key, then select the Action Id. As the events from the Read Action Request have not been altered by the intervening Stream Objects, use the RequestId attribute.

Apply the changes and save the Data Stream.

Step 4: Results

Publish the Data Stream and open the Live Data View. No data will flow until you press a button on a Form in an Alert belonging to the Recommendation chosen in step 2.

Open an alert for that Recommendation, fill in some values, and click a button. It will be read by the Read Action Request, the inventory requested, and the request closed, and finally printed.

Files

See the Import, Export, and Clone - XMPro article for steps to import a Data Stream.

Last updated