Use the Sforce Object Query Language (SOQL) to run a query
on one or more Salesforce.com object types from this activity and
return a results set. The Query Objects activity automatically runs
a query or queryAll call,
followed by continuous queryMore calls for all
children and objects returned from Salesforce.com.
Note: Running the Query Objects activity
can result in a cursor being opened by Salesforce.com to track the
query results. If the activity reaches the cursor limit that Salesforce.com
allots to each user or if the cursor expires, the Integration Appliance
tries the activity again.
Using the Query Objects activity
- In the Activities tab, open the Salesforce.com
directory to find the Query Objects activity.
- Add the activity to your orchestration.
The Checklist and Summary for
the activity are displayed below the orchestration.
- Select a Salesforce.com endpoint.
For instructions on creating
or editing a Salesforce.com endpoint, see Creating or editing a Salesforce.com endpoint.
- Configure the activity, by specifying a query and setting query
options.
- Specify the Retry and Time out parameters
for the activity.
- Map the input of the activity.
- Map the output of the activity.
Map the input of the Query Objects activity
- In the Checklist, select Map
Inputs.
The parameters element
is displayed in the To Activity panel. The parameters element
has a child element for each parameter you specified in the SOQL query.
The context for the parameter in the query determines the parameter
type. If you did not specify any parameters, then no child elements
are displayed under the parameters element.
- Right-click the default node and choose Show
Optional Parameters, to show the optional input parameters
for this activity:
- MruHeader
- CallOptions
- connection
- sessionInfo
- Click Select Inputs... and select the input
variable or variables for the map.
For instructions about creating
variables, see Creating Variables.
- As appropriate, map the input parameters to the variable or variables.
For
mapping instructions, see Creating
a Map.
Map the output of the Query Objects activity
- In the Checklist, select Map
Outputs.
The objects element
is displayed in the From Activity panel. The
result parameter has a single element named objects with
a single repeating element named after the driving object of the query.
The driving object is the first object named in the FROM clause
of the query. For example, in the following SOQL statement Account is
the driving object:
Select Name from Account, Account.Contacts
The
driving object has child elements that correspond to the fields or
relationships listed in the
SELECT clause of a query.
The schema is defined as follows:
- For fields, the field type matches the SOAP type of the field.
The field type is nillable if the SOAP type is nillable.
- For relationships for parent elements, the element name is the
name of the parent. If there is no parent when the activity runs the
query, then the element is absent. The fields or relationships of
the parent is displayed immediately underneath the relationship element.
- For relationships for child elements, the element name is the
name of the child. The relationship element has a single repeating
element named after the object type of the child object. The fields
and relationship of the child is displayed underneath the object type
element. If there are no children when the activity runs the query,
then the element is absent.
- If you did not select any fields or relationships, but instead
request the count() in the SELECT clause, the entire
object type element is replaced with an element named count of
type unsignedInt.
- Click Select Outputs... and select the
output variable or variables for the map.
For instructions about
creating variables, see Creating
Variables.
- As appropriate, map the output parameters to the variable or variables.
For
mapping instructions, see Creating
a Map.