Consume arbitrary external REST API to display in low-code Page?

Hello there,

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 ?)

Thank you very much for any explanation.

1 Like

@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!

appreciate any input

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.

1 Like

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!

@tjerman for the second option: yes the telesale_call has a reference to the customer.
I’m not sure how to reference the fields

could you please provide me with the query?
here are the fields

  • Customer module > customer_id
  • Order module > order_id, customer_id
  • telesale_call module > call_id, customer_id

thanks

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.

The output on the record page for my customer is:

All registered orders are:

Hope this helps

thank you very much @tjerman, will try it as soon as I get back to the office
is this allowed? which version?
I’m still using 2021.9

It should work there as well yes

1 Like

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

1 Like

Here is the source code for prefilter evaluation; so you can use:

  • record
  • recordID
  • ownerID
  • userID

And the source code for Record type definition.

I hope you can make sense of these references; I’ll see how we can improve the docs in regards to this.

1 Like

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).

1 Like

@tjerman thank you so much, really valuable inputs as usual :heart:

1 Like