Define a Step Through Collection Action

Use the Step Through Collection Action to step through each item or object in a collection or array of XML or JSON data and store it as a variable for use in CSM.

This allows users to extract pieces of information that can be used within CSM (example: Create new records and set fields using JSON or XML variables).

To define a Step Through Collection Action for a One-Step™ Action:

  1. Open the One-Step Editor.
  2. Add a Step Through Collection Action to the Designer Board.
  3. Define General properties for the Step Through Collection Action:
    OptionDescription
    NameProvide a display name for the Action (this is how the Action is identified within the One-Step Action).
    Collection to step throughProvide the collection for the Action to step through (a variable that is a JSON Array or XML Collection, such as the result of a web service call).
    OrderSelect the Step through in reverse order check box to have the action step through the items in the XML or JSON collection in reverse order.
    Item Variable Name Provide a name for the variable that stores the value of each item in the specified collection. This variable can be used in child actions (example: Display values in a popup, populate fields in a Business Object, etc.). Use Modifiers on the variable to extract the appropriate pieces of information from the XML or JSON data.
    Stop on Error Select if the Action should be terminated if an error occurs.
  4. Define child Actions for the Step Through Collection Action:
    1. Double-click the Step through collection graphic.
    2. Add child Actions to the Designer Board.
    3. Define properties for each Action.
    4. Select Save to save changes and return to the main Designer Board.
  5. Define Annotation properties.
  6. Select Save to return to the Designer Board for the main One-Step Action.

(Optional) Define conditions that limit when an Action is executed

  1. Right-click an Action on the Designer Board, and then select Action Condition in the context menu. You can also select Expression on the One-Step Editor toolbar to add conditions to a selected Action.
  2. Select the Only run action [name of action] if condition is true check box to define an expression that controls when the Action is executed.
  3. Define an expression for the condition:
    Option Description
    Most recently used Expression Select the drop-down list to choose a most recently used expression.
    Stored Expression Select the ellipsis to open the Expression Manager, and then select an existing stored expression or create a new stored expression. Stored expressions can be reused in numerous places in CSM.
    Custom Expression Select Custom Expression to open the Custom Expression Builder, and then create a custom expression specifically for this scenario.
  4. Select OK.