Get records from external database(s) via REST API and auto-populate fields within SuiteCRM.

Hi All,

I am fresh into the use of REST API, and I wonder if someone could tell me if the below scenario is possible.

Introduction
In this scenario SuiteCRM is the frontend system used to interact and engage with customers.
At the backend there are several databases under my control (with REST API) that hold data relevant to customers.
I need for an operator of SuiteCRM to enter a search term based on a piece of known information which then talks to the backend systems to match and return all associated records. From the records shown the operator can then select the appropriate data set and then automatically populate fields within SuiteCRM to display the data and also audit any future changes.

Example
The backend system holds record_a(b,c,d,etc) which has field_1, field_2, and field_3 within.

Step One
An operator creates a new account for a customer, and now needs to populate field_1, field_2, and field_3 within the account. They know what field_2 is, but not the rest. So they need to be able search the backend for field_2 which would bring up record_a and field_1, field_2, and field_3. The operator can now click and populate the fields within the account relative to that customer.

Step Two
In the backend record_a has field_3 altered as it is the authoritative system for that data.
SuiteCRM must now automatically pick up that field_3 has changed and update it’s own field to match, and audit the change without operator intervention.

Solutions
This is where I need your help in understanding if/how it is possible for SuiteCRM to be the application asking a system for information via REST API. And if/how the above would be possible.

If it isn’t possible to have a streamlined and light weight way of doing the above, could it be that I create a custom module with all fields matched exactly to those in the external backend system, and have the backend system use the SuiteCRM API to push data into the custom module automatically, so that we could then create a relationship within SuiteCRM between the modules for the operator to select and relate/link the records together?

I am keen to understand the mechanics behind such an operation, so any direction to further reading would be appreciated.

Many Thanks,

Tom.

Self hosted system information
Debian GNU/Linux 9 (stretch)
nginx/1.10.3
PHP 7.0.33-0+deb9u1
MariaDB 10.1.26-0+deb9u1
SuiteCRM Version 7.10.14

To get SuiteCRM to contact your system, it depends on what sorts of API’s it provides, that you can call from PHP. But I assume you will have options available, this should be straight-forward (like accessing a database through a driver, or calling some REST endpoint from PHP).

In the opposite direction, to make SuiteCRM react to changes in the backend, you can call SuiteCRM REST API but you can also look into other options. For example, you can have a custom entrypoint which is just an HTML page that receives POST data and does its magic.

https://docs.suitecrm.com/developer/entry-points/#_creating_an_entry_point