As the title asks, is it possible to display in a low-code developed Page (for example with a Block of Record List) data that was fetched from an external (arbitrary) REST Api instead of using internal data of Corteza ? If not is there any “non-official” way to do so?
(Alternatively possibly also, is it possible to connect to an arbitrary database and its data ?)
@Fabio thank you for creating this
I really interested in the answer
in my case:
since corteza doesn’t support nested records links
it’s hard/can’t display a list in the records-list
for example:
I have a customer model that has many orders
also, I have a telesales-call which will call the customer on monthly bases
so both the order module and telesale_call module are linked to the customer
now, I want to show/display the orders of that customer in the telesales-call so they can see what’s the orders for that customer
I couldn’t achieve this even with messy workflows!
With current versions, you would need to create a module in Corteza and then either use our automation to pull in the data, or use an integration gateway to push in the data as a record of that module.
We are, however, working on some interesting features that would enable us to support things like having external APIs as data sources – v1 would be available with the 2022.9 release.
You could add an additional reference to the order module which would point to the corresponding telesale_call module and filter orders based on that.
Alternativelly, if the telesale_call record has a reference to the customer you should be able to filter over records for the given customer with a simple prefilter.
This is a really interesting feature that allow for example to use corteza as customer portal for any CRM solution without import data! Or a wide range of other possible applications!
In the record page for the call module, I’ve added a record list for the orders module with the prefilter of customer = '${record.values.customer}' – show all orders where the customer matches the customer of current call.
hey @tjerman, finally it worked … not I’ll stop a lot of automation just for copying and pasting the records ids … thank you so much
I wonder what’s the available list of variables can be used inside the pre-filters?
I may wanna do a complex dashboard and may need some kind of nested equality or aggregation
In regards to nested filters and pre-filters – those can’t be done (yet).
We’re doing a rework of how data is stored/accessed so we might do some improvements in the next release 2022.9.
Until nested querying is supported, what we usually do (when we need to access some related data) is we define a workflow that coppies some fields from the child record into the parent records (the fields we wish to query over).
Is there a way to handle oAuth for an external 3rd party API. I have the Client ID + Secret but I am not sure how to handle the oAuth 2.0 access token flow and refresh tokens that are provided via Corteza.
The provided link indicates you’d use authorization code grant type; can you configure it to use client credentials? There currently isn’t anything built-in which would allow you to collect access tokens for an external service using an authorization code.
I did need to connect to an external service via authorization code grant type and this is what I’ve done:
define a client script which redirects to the external services auth page
define a sink endpoint to which the external service redirects to; the sink endpoint fetches the access token
the sink endpoint saves the access token to some settings module.
Do you have any examples of how to create this module in Corteza and use automation to extract and display the data in the module?
We have a similar use case for this thread, where we need to get billing data through its APIs and display it in Corteza (only display in a module without store it on Corteza).