CFO allows to connect with external apis aggregating buttons in the view in each row and creating a new CFO emulated from the API.
Example to send an email to a user.
We will define the field as type:virtual and we will add external_apis array with objects following this structure:
....
"fields": {
...
"SendEmail": {"name": "Send Contract", "type":"virtual" ,"only_if_filters": [{"status":["active"]}]
,"external_apis": [
{"title": "Send Contract"
,"method":"POST"
,"url": "<https://api.bnext.es/cfi_bnext/tempu/cfo>"
,"js_condition":"\\"{{status}}\\" == 'active'"}]
}
}
When you click on the button the system we will do a [POST] or [{{method}}] to the url sending the fields that appear in the view. T
The response from the API has to have a compatible structure with a CFO APP.