Order Provider

The Order Provider is used to export and import Orders and Order lines.

When used as a source provider the following settings are available to you (Figure 2.1).

Figure 2.1 When used as a source provider, these are the settings available to you

You can:

  • Limit the export to orders which have not yet been exported (column OrderIsExported from table EcomOrders)
  • Limit the export to orders without an externalID (column in EcomOrders) from e.g. an ERP system
  • Limit the export to completed order (and not abandoned carts, which are technically also orders)
  • Bulk-set the orders exported to an order state

When used as a destination provider the following settings are available to you (Figure 3.1).

Figure 3.1 When importing order and order lines, these are the options available to you

You can:

  • Remove order lines not present in the import data
  • Check Discard duplicate key rows
  • Check to remove missing rows after import in the destination
  • Check Persist successful rows and skip failing rows to allow the activity to do partial imports by skipping problematic records and keeping the succesful ones.

The Order Provider uses only two tables; EcomOrders and EcomOrderLines.

For EcomOrders:

  • OrderID must be included, and should contain the ID of the order. If the OrderID already exists in Dynamicweb, the order will be updated (rather than created).
  • OrderStateID functions as a Foreign Key field to EcomOrderStates. If left blank, the order does not have a state.

For EcomOrderLines:

  • OrderLineID must be included, and should contain the ID of the order line. If the OrderLineID already exists in Dynamicweb, the order line will be updated (rather than created).
  • OrderLineOrderID must be included, and should contain the ID of the order you are creating relations from.
  • OrderLineParentID is optional, and can be used to create a relation between order lines by supplying a pared OrderLineID.

When a job using the Order provider as either source or destination is run, the table imports are automatically executed in the following order:

  • EcomOrders
  • EcomOrderLines
  • EcomOrderLineFields
  • EcomOrderLineFieldGroupRelation

Any manually defined order different to this sequence will be overwritten to maintain proper data relations.

When using the Order provider to either import or export EcomOrderLine data all related EcomOrders columns are automatically exposed as available column mappings for the EcomOrderLines table.

This, for example, enables setting up conditionals on the OrderLines table that filters on the basis of data from the related EcomOrders record. It might for instance be the case, that you wish to export only OrderLines where the OrderShippingFeeWithVAT meets some condition, which is a column that otherwise only exists in the EcomOrders table.