The status of each event instance is obtained by comparing the event instances of the current run of the agent to those of the previous run. You want to specify which event statuses will cause the agent to perform the report task.
You know that for the event condition you specified, the Product name, Retailer name, and Order method data items have duplicate values in two or more event instances. However, because the Order number data item has a different value for each event instance, you choose it as the event key.
You decide that the report task that you added previously should
be performed for both:
new event instances
New event instances are instances that are detected when the agent runs and were not previously detected.
ongoing event instances in which the return quantity has changed
Ongoing event instances are detected when the agent runs and have previously been detected. In this case, only ongoing event instances in which the return quantity has changed cause the report task to run.
In the summary area, click new report.
In the I want to area, click Manage the task execution rules.
Click the Event Key tab.
Click Include only selected items.
On the source tab ,
expand Returned items (query) and Order.
Under Order, click Order number, and drag it to the Event key box.
Click the Event Selection tab.
Under Select when to perform each task, select the New events and Ongoing events check boxes.
This chooses the event status for which the report task is performed.
Click OK.
Save the agent.
The next step in the creating an agent tutorial is to add an email task.