This guide will show how to create and configure a Saved Query in Slate in a manner that it can be utilized in Ocelot's direct integration.
Start at the navigation bar.
Click the "Queries" item in the "Queries/Reports" menu.
This will bring up the Queries page, where new Saved Queries can be created and existing Saved Queries are listed.
B] Create New Saved Query
In the Queries page, press the "New Query" button. This will bring up the "New Query" dialog.
Define a saved query according to the guide "Saved Queries" in the Slate Knowledge Base. The specific choices will depend on your instance of Slate.
Tip: Types and Bases for queries are described in the Slate Knowledge Base article "Query Builder Overview: Create a Quick Query" at the top of its expanded section.
Press the "Save" button. This will save the query and will bring up the "Edit Query" page.
Define the "Exports", "Filters", and "Sorts" section of the Query. The specifics will depend on your instance of Slate.
Importing a Contact List into Ocelot requires at least one phone-type field. Be sure to export at least one phone field from Slate. Examples of phone field are "Phone", "Mobile Phone", "Business Phone", or "Phone Number". The phone-like field in the Slate Saved Query result will need to be mapped to a phone field in Ocelot during the contact list import.
C]Configure the Saved Query
Next we configure the Saved Query so that it can be utilized in the integration with Ocelot. Configuration requires editing only a few settings in the Saved Queries.
Press the "Edit Permissions" button. This will bring up the "Edit Permissions" dialog.
Press on the "Add Grantee" link. This will bring up the "Edit Grantee" dialog. Set the type to "User Token".
The Name, Token, and Permissions fields will appear in the "Edit Grantee" dialog.
Enter "OcelotAPI" in the name field if you want this query to be automatically shown in Ocelot.
Select the Web Service permission.
Press "Save". This will return you to the "Edit Permissions" dialog. Our grantee will now be listed.
Press the "Save" button. This will return you to the "Edit Query" page.
Edit Web Service
From the Edit Query page, its Web Service settings are edited next. Find the set of buttons near the upper right corner of the page.
Press the "Edit Web Service" button. This will bring up the "Edit Web Service" dialog.
Leave the "Custom Parameters" blank. Set the "Service Type" to JSON.
Next we edit the permissions so that this web service can be called from Ocelot.
Press the "Save" button. This will return us to the "Edit Query" page. At this point, we will have a Saved Query in Slate.
If you configured the Grantee name to be OcelotAPI no further configuration is needed, this query will not show up in Ocelot. If you wish to manually add a query with a different Grantee name continue below.
Capture Web Service URL
Press the "JSON" link to the right of the "Web Service" label. This will bring up the "Web Service" dialog.
For the "Service Account", select the User Token that we created.
The "URL" field will then appear.
Capture the full URL and keep in a safe location.
The full URL will be used when defining a "Slate Query" in Ocelot.
Press "Close" button. This will return to the "Edit Query" page. At this point we have the Web Service URL that points to the Saved Query in Slate.