Magento Query
The Magento Query activity retrieves the resources of an object from the Magento system.
Configuration
On the Settings tab, you can define the Magento connection, the type of object, and the resource to query.
Input
The input schema displayed for this activity depends on the object and the path that you selected on the Settings tab. Variable components are denoted by {}. For example, if the selected path is: /products/{sku} then the input for sku must be mapped to a specific value.
Filtering Criteria
Some Paths allow you to enter filtering criteria using the filter input property. It has the following syntax:
(fieldname1 condition value or fieldname2 condition value) and (fieldname3 condition value or fieldname4 condition value) and ...
(field1=a or field2=b) and field3=C (field1 like $ or field2=b) and (field3=C or field4=D) field1=a or field2=a field1=a and field2=a
For example, this syntax is valid: (field1=a or field2=b) and field3=C
Whereas, these are invalid:
(field1=a and field2=b) or field3=C
(field1=a and field2=b) and field3=C
(field1=a or field2=b) or field3=C
Following is a list of available conditions that can be used in the syntax.
Field names are top-level properties seen on the activity's input tab.
Condition | Description |
---|---|
eq, = | Equals. |
finset | A value within a set of values. |
from | The beginning of a range. Must be used with to. |
gt, > | Greater than. |
gteq, >= | Greater than or equal to. |
in | In. The value can contain a comma-separated list of values. |
like | Like. The value can contain the SQL wildcard characters when like is specified. Note that % matches everything, as opposed to * commonly used in wildcards. |
lt, < | Less than. |
lteq, <= | Less than or equal to. |
moreq, >= | More or equal to. |
neq, != | Not equal to. |
nfinset | A value that is not within a set of values. |
nin | Not in. The value can contain a comma-delimited list of values. |
notnull | Not null. |
null | Null. |
to | The end of a range. Must be used with from. |
Using Quotation Marks
You can surround values and field names with double quotation marks (""). This is useful if your value contains a space, or one of the following characters: <, >, (, ), =, !.
If you need a double quote as a part of a quoted value, you will need to duplicate it.
For example: field="Hello, ""John"", how are you"
Searches for: Hello, "John", how are you
Specifying Sort Order
Some paths in Query allow you to specify sort order using the sort field. For example:
fieldname1 ASC, fieldname2 DESC, fieldname3, fieldname4 desc
"ASC" and "DESC" specify the search order. If omitted (such as in the example for fieldname3 ), the default sort is "DESC".
Field names are top-level properties seen on the activity's input tab.
Output
The Output data corresponds to the activity for the selected path. The output schema depends on the activity and the path. For example, you can set a page size for optimal viewing of the output.
Iterator
If you would like this activity to iterate multiple times within the flow, enter an expression that evaluates to the iteration details. If you leave this tab blank, the activity will be executed only once. Refer to the "Using the Iterator in an Activity" topic in the TIBCO Flogo® Enterprisedocumentation.