Use the Query Objects activity to execute SData query on a specified object type from
Sage CRM.
About this task
Use this task to execute an SData query on a specified object type in the Sage CRM instance. The
call to this activity is a synchronous call where the input data is sent to the activity for
processing and the response is sent back to the orchestration.
Procedure
- Right click the Orchestrations section and select new orchestration.
- Drag the newly created Sage CRM endpoint to the orchestration and select
Query Objects activity.
- The Query Objects activity will be added to the orchestration. Select
the activity. The Sage CRM Query Objects Checklist is displayed.
- In the checklist, click Configure.
- Input the valid query parameters with a ‘?’ as a placeholder for the value. To configure
multiple query parameters, separate each query parameter with a ‘&’. Some query examples:
select=?&where=?
startIndex=?&count=?
orderBy=?
select=?&where=?orderBy=?
where=Lead_UpdatedDate lt @2016-01-10@
Note that the query string should not begin with a ‘?’.
- Click Browse to select the object type. The Browse Sage
CRM window is displayed.
- In Browse Sage CRM, you can select the object type from the object type
list. Click OK.
- Select the Map Inputs in the Checklist. The XML
Schemas generated from the selected object of the Query Objects activity are
displayed as nodes under the request input parameter in the To Activity
panel.
- In the Checklist, click Retry. Review the default
settings and make the required changes.
- Create a map between the orchestration variables and the input parameter of the activity.
Note: Values must be provided at run time for any mandatory elements of the input structure. A
value can be provided by specifying a default value for element or by linking the element with an
input node. During run time if no value is provided for a mandatory element, the activity throws an
exception, which is reported by the Web Management Console. If a value is not provided at run time
for an optional input parameter, no exception is thrown during run time.
- Select the Map Outputs in the Checklist. The XML
Schema generated to hold the response of the activity is displayed as nodes under the response
output parameter in the From Activity panel.
- Create a map between the output parameters and orchestration variables.
Query Parameter:
Table 1. Common Query parameters for the Query ObjectsField Name |
Description |
startIndex |
Start index of the record from which the result of the API call should
start |
count |
Count of number of objects to be displayed in the response. |
where |
Specifies a filtering criteria. Only the resources that match the criteria
specified in the where parameter are returned. |
orderBy |
Specifies an ordering criteria. The collection is sorted by ascending or
descending order of the attribute names specified in this parameter. |
select |
Selects the properties that will be returned in the payload. This parameter
allows a client to request that a specific list of properties be returned in the payload. It gives
precise control over the breadth and depth of information returned. |
Atleast one of the above query parameters should have a value mapped / default value for the
activity to execute successfully.
Results
You have configured the Sage CRM Query Objects activity.
Note: This activity works on fetching multiple records of a specified type. As such, the input response
would be single, which is applicable to a single retrieve all API call to fetch multiple objects.