Using the Sage CRM Query Objects Activity

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

  1. Right click the Orchestrations section and select new orchestration.
  2. Drag the newly created Sage CRM endpoint to the orchestration and select Query Objects activity.
  3. The Query Objects activity will be added to the orchestration. Select the activity. The Sage CRM Query Objects Checklist is displayed.
  4. In the checklist, click Configure.
  5. 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 ‘?’.

  6. Click Browse to select the object type. The Browse Sage CRM window is displayed.
  7. In Browse Sage CRM, you can select the object type from the object type list. Click OK.
  8. 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.
  9. In the Checklist, click Retry. Review the default settings and make the required changes.
  10. 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.
  11. 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.
  12. Create a map between the output parameters and orchestration variables.

    Query Parameter:

    Table 1. Common Query parameters for the Query Objects
    Field 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.




Feedback | Notices


Timestamp icon Last updated: Wednesday, 15 June 2016


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.doc/SageCRM_query_objects_activity.html