Extract Values from a Message

The amps-action-do-extract-values module extracts message values from a message and stores the values in a variable.

To extract values from a message, this module requires the MessageType and Value parameters. In addition to that, this module also accepts an optional parameter listed below:

ParameterDescription

MessageType (required)

The message type for the message to parse.

There is no default for this parameter.

Value (required)

An assignment statement that specifies the variable to store the extracted value in and the XPath identifier for the value to extract.

This action can contain any number of Value elements, each providing an assignment statement.

The format of the assignment is as follows:

 variable=amps-expression 

For example, the following assignment statement stores the value of the /previousRegionCode within the message to the variable PREVIOUS_REGION. After this action runs, the content of the variable can be referenced in subsequent action steps as {{PREVIOUS_REGION}}.

 PREVIOUS_REGION=/previousRegionCode 

Likewise, the following assignment statement creates a string from the values of the /firstName and /lastName fields within the message, and stores that to the variable COMBINED_NAME. After this action runs, the content of the variable can be referenced in subsequent action steps as {{COMBINED_NAME}}.

 COMBINED_NAME=CONCAT(/firstName, ' ', /lastName) 

There is no default for this option. If no Value options are provided, AMPS does not save any values from the parsed message.

Data

Contains the data to parse. Typically it is a message received from a publish event or retrieved from a SOW query.

There is no default value for this parameter. If it is omitted, AMPS will not parse data when the action is run.

The module amps-action-do-extract-values adds the variables specified by the Value options to the current context.

Last updated

Copyright 2013-2024 60East Technologies, Inc.