Integrations menu?

@paul121 @gbathree and I have been discussing the idea of adding a core farm_integration module to farmOS. The main problem we’re trying to solve is:

There are community modules being built that add integrations between farmOS and other third-party services and applications, but there isn’t a standard place to put the menu items for these in farmOS.

So, at the very least, a core farm_integration module could add an “Integrations” menu item and/or route that other modules could add to. This would be essentially equivalent to the core farm_report module, which just adds a “Reports” item to the menu.

So the first question for others in the community is: what do you think? Does adding something like this to core make sense?

The second question is: where should the menu item go? We’ve discussed putting it in the main menu, so it’s available right under “Records”, for example. Another option is to put it under Setup > Integrations.

A third question: where should the “settings” for integrations go? Under Integrations > [integration name] > Settings? Or under the existing Setup > Settings > [integration name]? It feels to me that each “integration” should be encapsulated in the UI as much as possible, so it’s easy to find what you’re looking for. But it means splitting things out of the Setup > Settings, which could also cause confusion.

It’s also possible that some integrations won’t want to put their routes in any of those places, and will just want to add widgets or other features to existing farmOS UIs.

I’d like to use this forum topic to centralize the discussion and open it up to the rest of the community. We can’t control what downstream module maintainers do, but we can provide some patterns and guidance in core to encourage consistency.

Perhaps a good starting point is to list out all of the integration modules that exist right now, and think through where each of their routes/features would be best suited in the UI.

It would also be worth looking at other systems that have third-party integrations (eg: Quickbooks? Stripe? others?) to see how they handle things.

I think there is an important balance between making the integrations visible to end users, without cluttering the UI with things that are not used often. A lot of these decisions will be case-by-case, but perhaps we can come to some consensus on general guidance for module maintainers.

2 Likes

Integration modules that I am aware of (please add more if I missed any!)

Doesn’t look like this one provides any additional UI or settings - it just extends the core Sensor Asset + Basic data streams. So probably doesn’t need any additional consideration.

Adds UI routes (but notably no menu items to get to these):

  • farmlab/boundaries
  • farmlab/boundaries/geojson
  • farmlab/cadastral
  • farmlab/cadastral/geojson
  • farmlab/boundaries/add

And settings routes (accessible from Setup > Settings menu):

  • farm/settings/farmlab
  • farm/settings/farmlab/server

Also these for connecting OAuth:

  • farmlab/auth/connect
  • farmlab/auth/grant
  • farmlab/connect-farm
  • farmlab/auth/revoke

Adds UI routes (accessible from Setup > John Deere menu):

  • setup/farm_jd/status
  • setup/farm_jd/import/equipment
  • setup/farm_jd/import/land
  • setup/farm_jd/import/operation

And settings routes (accessible from Setup > Settings menu AND Setup > John Deere > Settings):

  • farm/settings/jd

Also these for connecting OAuth:

  • jd/auth/connect
  • jd/auth/grant
  • jd/auth/revoke
  • jd/auth/organization

Adds UI routes (but notably no menu items to get to these):

  • looc-c/estimates/create
  • looc-c/estimates/{estimate_id}/update
  • looc-c/estimates/{estimate_id}/delete
  • looc-c/co-benefits

And settings routes (accessible from Setup > Settings menu):

  • farm/settings/looc-c

Adds UI routes:

  • import/myfarmkey (accessible from Setup > Import menu):

(no settings)

1 Like

My two cents on this:

  1. Yes, integrations in the top level menu! If possible, if no integrations are installed, it’s hidden and thus not cluttering (?) when it’s not helpful. But I do think there’s clarity for the user (admin or non-admin) to see available integrations at the top (especially for certain use cases where they are used a lot).
  2. IMO integrations links should all be in that Integrations menu. It’s confusing to look in settings or worse setup->settings to find information about an integration especially if all other information about the integration is at the top level.
  3. Last - Integrations will also have components embedded in other places in the app (adding buttons to existing pages, etc.). That’s a separate issue from unique pages added by the integration or integration setup.
1 Like

I went back and edited my first comment to include where the UI and settings routes are currently available from in the menus.

Seems like a lot of them are in Setup > Import currently.

I created a simple contrib module: https://www.drupal.org/project/farm_integration

And a merge request to use it in the FarmLab module: https://www.drupal.org/project/farm_farmlab/issues/3521943