Documentation

Oracle ROQL

Overview

This documentation provides details for using the ROQL action to query Oracle Service Cloud data. The ROQL action allows you to retrieve data based on a specified query. This action will retrieve in a list all the results it will find

Inputs

HostStringOracle host
UsernameStringOracle username
PasswordStringOracle password
QueryStringROQL Query

Outputs

SuccessBooleanWhether successfully retrieved the incident
ResponseObjectQuery response

Examples

The following query will return the all the threads (i.e messages) and their IDs for the Incident associated to the Reference Number XXXXX:

SELECT Threads.Text, Threads.Account FROM Incidents WHERE ReferenceNumber = 'XXXXX'

This query returns the following data:

[
  {
    "text": "<div>Hi,</div>\n<div><br /></div>\n<div><span>I would like to know where my order is please.</span></div>\n\n",
    "account": "1772372"
  },
  {
    "text": "<SPAN><DIV><DIV><SPAN><SPAN>Thank you for contacting Charles Tyrwhitt Customer Support. We have received your email and your unique reference number is 240523-000000.</SPAN><BR />&#160;<BR /><SPAN>We aim to respond within 24 hours though during busy periods this may be longer. We appreciate your patience.</SPAN></SPAN></DIV><DIV><SPAN><SPAN><SPAN><SPAN><SPAN><SPAN>&#160;</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></DIV><DIV><SPAN><SPAN><SPAN><SPAN><SPAN><SPAN><SPAN><SPAN STYLE=\"font-style:italic;\">Please note, if you are emailing with any changes to your order, it may be best to contact us by phone or live chat as there is a limited amount of time to amend your order before it is despatched.</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></DIV><DIV><SPAN><SPAN><SPAN><SPAN><SPAN><SPAN><SPAN>&#160;</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></DIV><DIV><SPAN><SPAN><SPAN><SPAN><SPAN><SPAN><SPAN><SPAN STYLE=\"font-weight:bold;\">Need to track your order?</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></DIV><DIV><SPAN><SPAN><SPAN><SPAN><SPAN><SPAN><SPAN>&#160;</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></DIV><DIV><SPAN><SPAN>Did you know you can check the status of your order directly on our website or via the tracking link sent to you in your Despatch Confirmation?</SPAN></SPAN></DIV></DIV></SPAN>",
    "account": "1"
  }
]

The format is a list of dictionaries, in which every dictionary contains the data from the query. In the example above, the first items in the list is the Threads.Text and the second item is the Threads.Account.

Note that the output of Success will be false if any of the following occurs:

  • The API call is unsuccessful (i.e there is an error when making the API call) OR;
  • The API call is successful (response code 200) but the list is empty, i.e no items are found in the query