Why not external entities

Created on 30 July 2025, 3 months ago

You have a section in the description on why not migrate. I am asking Why not External Entities https://www.drupal.org/project/external_entities β†’

πŸ’¬ Support request
Status

Active

Version

5.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States frob US

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @frob
  • πŸ‡΅πŸ‡ͺPeru krystalcode

    Thank you for your question.

    I am aware of the External Entities module and let me clarify that I have not used it yet. My understanding may therefore be incomplete or even wrong. That said, from the module description and its code, it seems that it covers a quite different primary use case.

    Entity Synchronization

    You have the Commerce Product module installed. It provides a Product and a Variation entity already which have a functional purpose in the application - the commerce website is the Drupal application. You have an external ERP system where product editors manage the catalog; they add new SKUs, update prices etc. You want to bring such product data, like SKUs, prices, titles, descriptions, images etc. and store them as new or in existing products/variations so that the Drupal application is automatically updated. Entity Synchronization will bring in the data and store them into entity fields of the existing Product entity type.

    Customers then place orders using your Drupal application. You want to export these orders and its line items to the ERP so that they can be moved to fulfillment. Entity Synchronization provides the framework for automating these exports.

    Entity Synchronization does not provide an entity type for you. You bring in the data to whichever entity type you like.

    External Entities

    You have one or more external systems that provide certain entities, such as content or products. Maybe you run a Shopify store and a Wordpress blog/article publishing site. You want to use Drupal for its editing capabilities and as a central editing hub so that you can create and update those entities in one place. This way you don't have to go to different systems and edit items in different places.

    External Entities provides an "ExternalEntity" entity type for use in all these external entities so that you can bring them into Drupal. They are unlikely to serve a functional purpose in your Drupal application, you just want to edit them in Drupal.

    Another use case seems to be to bring in content from external sources and essentially use Drupal as a content aggregator. The content may then be displayed to end users or not. It depends on the exact use case, but I wouldn't use the External Entity entity type for that. I'd use the Node entity type provided by Drupal core and use Entity Synchronization to bring in the content.

    Summary

    There's lots of architectural differences and differences in the supported features, and that's a result of the two modules having a different primary objective; I won't get into analyzing all of them. I'd say that Entity Synchronization is by its nature more generic and flexible; all cases covered by External Entities can be covered by Entity Synchronization. So, if you are looking exactly for the use case that External Entities is designed for, use that. If your use case is not covered, or if you have multiple integrations some of them covered and some not and you don't won't to have to learn and use two different systems, then use Entity Synchronization.

    Let me know if you have further questions, reopen ticket.

Production build 0.71.5 2024