Action disabled: source

This is an old revision of the document!


Important - please read first

If you've upgraded to Moneyworks v7.1.9, please download and install an updated version of the Moneyworks component:

  • If you're using a recent version of the Connector (newer than October 2013), download the v13 version of the component here, otherwise download the v12 version here (or contact us to upgrade to the v13 version first).
    • To determine which version you have, right-click on MoneyworksConnector.exe, select Properties → Details
      • This example is v12.2
  • Extract the contents of the downloaded zip file to somewhere on your hard disk
  • Stop the Connector
  • Copy the entire Sussol_Moneyworks.4dbase folder extracted from the zip file into the Components folder where the Connector has been installed, overwriting the existing folder of the same name
  • Restart the Connector

Introduction

This is a standalone application (Windows or Mac) using our Moneyworks component which is designed to periodically (or manually) connect to Magento and import transactions into Moneyworks. Transctions may be imported as sales orders, sales invoices or receipts, depending on the customisation code entered and/or the import map used.

We call this process 'syncing', and it is controlled by the Sync menu items:

There are also some customised versions of the Connector which connect to MySQL databases, either directly or via an API. It can also be customised to support other ecommerce platforms e.g. Prestashop. Please contact us for more details if you're interested.

Entering the customisation code

Available from the Sync → Customisation code menu item. This code determines which options are available and must be entered first to enable the other menu items.

By default, the Connector works on the basis that all customers and products have the same codes in Magento and in Moneyworks. However, it is also possible to allow customers to be automatically created in Moneyworks if they don't already exist. By default, the Connector uses both name and code to determine if there's a match for either.

Setting up the sync parameters

Available from the Sync → Setup menu item. This consists of five tabs with settings for the Moneyworks connection and Magento connection parameters, and also some Moneyworks-specific options and advanced options to control the sync process.

Moneyworks connection

This tab controls how the Connector connects to Moneyworks:

It allows you to enter the parameters for the Moneyworks connection:

  • The connection type can be Local file, Gold client, Datacentre client, or Datacentre REST client (e.g. Moneyworks NOW).
  • The datafile location or filename must be entered (full path must be entered if a local file).
  • The location of the Moneyworks executable must be entered, unless the connection is via REST.
  • Enter the document user name and password (even if blank) in all cases.
  • The Gold client license key is only needed if connecting to a Gold server.
  • The server IP address and port number are not needed for connecting to a local file.
  • The DC user name and password should be entered (even if blank) if connecting to a Datacentre or Datacentre REST server. If it's a Datacentre REST server connection, you can specify if the connection is secure or not; if it's a regular Datacentre server connection, the operating system of the Datacentre server must be selected.

By default, there is a single connection to the Magento database, but for some customisations of the Connector it is possible to have multiple Magento connections e.g. you may want to apply different rules and settings for different Magento stores and/or sync them to different Moneyworks data files. If this is the case, you'll be able to switch connection settings using the drop-down list at the top right. Please contact us for more details if you're interested.

Moneyworks test

The second tab allows you to send commands to Moneyworks (see the Moneyworks CLI manual for details), and you can use the examples in the Input drop-down menu to check that the connection is setup correctly e.g. selecting evaluate expr=“documentpath” and then clicking on the Execute button should return the Moneyworks document name/path in the Output box (and nothing in the Errors box). Clicking on OK will save the current connection settings, and Cancel will discard any changes made. Note that you should avoid using normal single quotes here as these are used internally to pass the commands to Moneyworks.

For REST connections, the commands need to be formatted appropriately using the correct URL structure and using standard HTTP escape sequences - see the Moneyworks REST documentation for details.

Magento connection

This tab controls how the Connector connects to Magento:

  • Enter user name and password (API key) as supplied by the Magento site administrator.
  • Enter the IP address or hostname of the Magento site.
  • If a secure connection is required, check Use SSL.

Click on the Test button to verify the connection. Clicking on OK will save the current connection settings, and Cancel will discard any changes made.

If your customisation allows multiple connections, you'll be able to select which stores are synced for each connection. Clicking the Reload button will reload the list of stores from Magento.

Moneyworks settings

This tab allows you to customise how imported records appear in Moneyworks. When it is selected, the system attempts to read tax codes and shipping codes from the Moneyworks data file:

  • Highlight colour controls how the imported records are coloured in Moneyworks.
  • Base currency code should correspond to the base currency in the Moneyworks data file.
  • The default and shipping tax codes are applied to orders which have a non-zero tax amount in Magento, otherwise the tax code is set to blank.
  • If Use Moneyworks address for business customers is checked, then the mailing and delivery addresses are not passed across from Magento for customers which have a company name.
  • If required, you can define a mask for the order/invoice sequence numbers e.g. “W00000000” means that transactions will be assigned a sequence number of “W00000001” and so on, depending on the numeric value of the Magento ID.
    • If left blank, Moneyworks will use the ID assigned by Magento.
    • Depending on the customisation code entered, the same facility is available for assigning new customer codes.
    • Note that there is a limit of 11 characters in Moneyworks for transaction and customer codes, so this determines the maximum length of the mask.
    • Note that the numeric part of the Magento ID must not be longer than the number of trailing zeroes in the mask, otherwise it won't fit into the space available. The Connector will attempt to append extra trailing zeroes up to the maximum length of the mask - if that fails, then it reverts back to the original Magento ID.
  • If set, the Shipping code is applied to all orders which have a non-zero shipping amount in Magento. This will normally be shown as an extra line in the invoice.

Note that most of these settings can be overridden by using a customised Moneyworks import map e.g. it may be necessary to have different tax codes for different transaction currencies, different types of product or different shipping destinations. In this case, the tax codes should be left blank here, and the connector will use the tax amounts as entered in Magento to work out which tax code to apply on a per-line basis.

Other settings

This tab controls the sync process itself:

  • The Magento and Moneyworks sync timestamp fields control which records are imported into Moneyworks (and can be manually edited if needed e.g. to ignore failed records before a certain date):
    • Both refer to the local time on the Magento and Moneyworks server respectively (they can be in different time zones).
    • When a sync process has completed without errors, both timestamps are updated so that the records are not re-imported the next time (records imported into Moneyworks store the corresponding Magento timestamp in one of the user/custom fields).
    • If there is an error, then the sync timestamps are not updated, and the next sync will retry to import the failed record(s), and skip any which have previously been imported successfully.
  • If the Sync interval is set to any value other than zero, the connector will automatically attempt to perform a sync every X minutes. In this case, error messages are redirected to the log file (in the Logs folder) instead of popping up on the screen.
  • If Generate CSV import files is checked, the connector won't delete the temporary CSV import files that it generates (in the Database/Resources/Moneyworks_import folder). These can be useful to diagnose problems as you can manually import them into Moneyworks (using the corresponding import maps in the Resources folder).
  • In some circumstances, it is possible for the same record to have been modified both on Magento and in Moneyworks since the last time it was synced. You can choose to automatically use the Magento changes or the Moneyworks changes, or to be prompted each time there is a conflict.

Initial setup of Moneyworks datafile

  • Make sure that the item codes in Moneyworks are the same as those in Magento.
  • Make sure that the customer codes in Moneyworks are the same as those in Magento.
  • Make sure that there are open periods in Moneyworks for all of the transactions that you want to import from Magento.
  • Make sure that there is at least one shipping method defined in Moneyworks, and that the “we sell this” box is checked.
  • Make sure that the base currency in Moneyworks has been set correctly.
  • Make sure that the tax codes in Moneyworks have been setup correctly, with the same rates as in Magento.

Common errors

  • No period has been opened in Moneyworks for a new transaction
  • If you're connecting to a local datafile, make sure it isn't already open in Moneyworks
  • Mismatch between the item codes in Moneyworks and those in Magento

When an import fails, then the next sync will restart from the same point as the previous one, so any records deleted in Moneyworks may magically be resurrected! If the import error cannot be fixed, then it can be ignored by manually setting the timestamps on the Other Settings tab to a time after the timestamp of the offending record.

Troubleshooting

  1. Check log file created for each sync in the Database/Logs folder.
  2. Switch on Generate CSV import files on the Other Settings tab - this creates CSV files in the Database/Resources/Moneyworks_import folder, which can then be manually imported into Moneyworks (using corresponding import map in the Database/Resources folder).
  3. If connecting to Magento, enable XML debugging (enter “debug_xml_on” as a customisation code, and “debug_xml_off” to switch it back off again) - creates XML files for each Magento API call in the Database/Resources/Moneyworks_import folder.

Appendix: Magento API fields used by Connector

  • customer.info.customer_id
  • customer.info.firstname
  • customer.info.lastname
  • customer.info.middlename
  • sales_order.info.billing_address.city
  • sales_order.info.billing_address.country_id
  • sales_order.info.billing_address.postcode
  • sales_order.info.billing_address.street
  • sales_order.info.increment_id
  • sales_order.info.payment.additional_data
  • sales_order.info.payment.method
  • sales_order.info.shipping_address.city
  • sales_order.info.shipping_address.company
  • sales_order.info.shipping_address.country_id
  • sales_order.info.shipping_address.postcode
  • sales_order.info.shipping_address.street
  • sales_order.list.customer_firstname
  • sales_order.list.customer_id
  • sales_order.list.customer_lastname
  • sales_order.list.customer_middlename
  • sales_order.list.order_id
  • sales_order.list.state
  • sales_order_invoice.info.created_at
  • sales_order_invoice.info.grand_total
  • sales_order_invoice.info.increment_id
  • sales_order_invoice.info.invoice_id
  • sales_order_invoice.info.items.discount_amount
  • sales_order_invoice.info.items.item_id
  • sales_order_invoice.info.items.name
  • sales_order_invoice.info.items.qty
  • sales_order_invoice.info.items.row_total
  • sales_order_invoice.info.items.row_total_incl_tax
  • sales_order_invoice.info.items.sku
  • sales_order_invoice.info.items.tax_amount
  • sales_order_invoice.info.order_currency_code
  • sales_order_invoice.info.order_id
  • sales_order_invoice.info.order_increment_id
  • sales_order_invoice.info.shipping_amount
  • sales_order_invoice.info.shipping_tax_amount
  • sales_order_invoice.info.state
  • sales_order_invoice.info.store_id
  • sales_order_invoice.info.updated_at
  • sales_order_invoice.list.increment_id
  • sales_order_invoice.list.order_id
  • sales_order_invoice.list.updated_at
Edit this page
Back to top