dotmailer / dotmailer-magento2-extension

The official Dotdigital for Magento2 extension
https://dotdigital.com/integrations/magento
MIT License
48 stars 63 forks source link

Refactor code to clarify import/export terminology #534

Closed scottsb closed 5 years ago

scottsb commented 5 years ago

The extension, both in the code and in the admin, seems to use the term "import" and "export" inconsistently. Both terms are used to refer to data flowing from Magento to Dotmailer.

For example, the class \Dotdigitalgroup\Email\Model\Newsletter\SubscriberExporter passes the data off to \Dotdigitalgroup\Email\Model\Importer to be handled.

This makes interpreting the code unnecessarily difficult.

sta1r commented 5 years ago

Hi @scottsb - thanks for your thoughts here.

As a rule, the logic is:

That's the distinction we're aiming for, although for sure it seems we've got our terminology a bit tangled in some places. We'll tidy these up going forward.

scottsb commented 5 years ago

@sta1r Got it. So both "export" and "import" are used to refer to different phases of the data move from Magento into Engagement Cloud?

Perhaps I'm wrong, but I believe there are also some cases where data moves from Engagement Cloud into Magento, right? In these cases, what terminology is expected?

sta1r commented 5 years ago

Our connector is essentially a one-way data transport tool, moving data from Magento to Engagement Cloud. In terms of data moving the other way, there are no scripted syncs as such (or formal terminology), just occasional status checks and validation of data against matching records in EC. For example: