ROQL for RightNow Integration

There are many applications that are creating their own query language namely:

  • ROQL in RightNow
  • SOQL in Salesforce
  • JQL in JIRA


This flexibility allows other integrated applications to perform SQL like queries and filter for specific records that need to be retrieved.


I came across ROQL recently while using the RightNow CX connector to integrate with other application. This connector is provisioned by Boomi. The following sample scenarios show the utilisation of ROQL using the RightNow CX connector. The filter parameter for using ROQL is identified as –RAW_QUERY.


Scenario #1 – Standard query:

Search against all RightNow contact emails if such email exist –


Form a RAW_QUERY using the following ROQL:

SELECT Distinct Contact FROM Contact WHERE ((Emails.EmailList.Address = “” AND Emails.EmailList.AddressType = 0) OR (Emails.EmailList.Address = “” AND Emails.EmailList.AddressType = 1) OR (Emails.EmailList.Address = “” AND Emails.EmailList.AddressType = 2))



Scenario #2 – Custom query:

Model: A custom object – Opportunity_Products is created as a child object to Opportunity and many-to-one relationship.Get all the opportunity product records that are associated with Opportunity ID=56862.

Form a RAW_QUERY using the following ROQL:SELECT¬†Distinct¬†CO.opportunity_products from CO.opportunity_products where oid=”56862″
For more detailed information on how ROQL can be implemented with other clients: