Scenario
An agency needs to regularly import content in a GovCMS SaaS website to keep it in sync with an external system. In many cases, agencies will maintain other systems which hold the canonical source data. These datasets may be exceptionally large requiring them to be accessed with different filters and sorts to get at the correct data.
Challenge
The go-to solution of the Migrate module will not work because there are limitations in its capabilities on GovCMS. It is possible to define custom mappings, however, it is not possible to dynamically alter the endpoint for custom filters and sorts. It is also difficult to apply custom logic on each row. These are the kinds of things which require some custom code.
Solution
A more novel solution is to trigger a request on the GovCMS site which then uses theme code to make a request and process the results. Theoretically, this is possible if GET requests are the only thing being made. However, care needs to be taken. GovCMS is looking to formalise this pattern with the definition of allowed APIs for integrations such as the synchronisation of data.
Outcome
Government agencies need to provide more functional interfaces and experiences for their users, including the display of real-time data from other systems. This is achievable through the Migrate module and sometimes via other means when this is not possible. Stay tuned to GovCMS for more information on these capabilities.