Introduction

This page explains how to deal with timestamps / change times at your documents in order to map them to Shopware successfully.

All information provided on this page is only relevant if the module runs in "delta-mode". So please read the documentation about import-modes carefully as these topics are closely related.

Change Time Traits

The data model provides multiple traits to add timestamps to a document:

  • Elio\CommonBundle\Traits\IndexableChangeTimeAware
  • Elio\CommonBundle\Traits\ChangeTimeAware
  • Elio\CommonBundle\Traits\ChangeTimeCollectionAware

Warning: The trait ChangeTimeCollectionAware is completely ignored by the module.

Only the fields createdAt, updatedAt and deletedAt provided by the traits IndexableChangeTimeAware and ChangeTimeAware are used in the calculation of the data to be processed.

Base Documents

In general a document is ignored, if all of its timestamp-values (createdAt, updatedAt or deletedAt) are before the value of lastSync in the module configuration.

Embedded Documents

Embedded documents do not cause a "parent" document to be part of the handled documents. If you need to update an entity that is mapped from an embedded document the timestamps of the owning base document must be updated as well.

Example: If you update the embedded document GeneralInformation of a Product and update its timestamps the owning Product will not be part of the next flow-execution. This is only the case if the timestamps of the main document are set accordingly.

Extracted Documents

The behavior of embedded documents does not apply to extracted documents . Example: If you update the embedded document PropertyOption (which is extracted before being mapped to Shopware) the only timestamp that matters is the timestamp of the embedded document itself.