Retrieve changed data using a GetConnector

You can use a GetConnector to retrieve data that was added or changed on or after a particular time and date.

For many tables, Profit logs when records are added or changed, and by which user. This is registered in the audit fields. In the audit fields, you only see the last change, not the preceding changes. You can use this logging to filter records.

If you have used an UpdateConnector to add new records, a general message is returned that does not contain the code or the number of the new record. For example, when adding an organisation, the UpdateConnector does not return the number of the new organisation. You can retrieve this number by immediately running a GetConnector, so you can immediately run follow-up actions for the new organisation.

You need two filters in this GetConnector:

  • Fixed filter, that applies to every call.
  • Variable filter, with for example the name of the new organisation. If you call the GetConnector, you must enter the name of the organisation in the variable filter.

Contents

Retrieve changed records using Audit fields

GetConnector with a fixed filter with Audit fields:

  1. Go to: General / Output / Management / GetConnector.
  2. Open the properties of the GetConnector.
  3. Click on: Next.
  4. Click on: Data.
  5. Add the audit fields from the Logging heading to the data collection.

    App_Conn TR Gewijzigde gegevens opvragen met een GetConnector

  6. Click on: Next
  7. Select Advanced filter.
  8. Enter the filter criteria.

    An absolute filter on the add date increases the effectiveness of the filter. Please refer to the filter criteria for more information. In this example a filter is also applied by organisation, to exclude people. A filter is also applied to the user name of the CONNECTOR user, to make sure that only new records that were added using an UpdateConnector, comply with the filter.

    App_Conn TR Gewijzigde gegevens opvragen met een GetConnector

    Note:

    If you want to retrieve all the records from a particular day, you must use the filter criterion >=[Today]. Using the [Today] tag, you filter exactly on 00:00 of the current day.

  9. Click on: Next.
  10. Click on: Example.

    Check the result. This result corresponds to the result if you were to run the GetConnector now.

    App_Conn TR Gewijzigde gegevens opvragen met een GetConnector

  11. Click on: Close.
  12. Click on: Finish.
  13. Click on: Finish.

GetConnector with variable filter by name:

If in a short span of time multiple records are added using the UpdateConnector, the GetConnector will return multiple records based on the fixed filter. You can solve this by applying a variable filter to for example name and/or postal code when running the GetConnector.

  1. Select the GetConnector.
  2. Click on the action: Run.
  3. Specify a filter.

    App_Conn TR Gewijzigde gegevens opvragen met een GetConnector

  4. Click on: XML Filter.

    App_Conn TR Gewijzigde gegevens opvragen met een GetConnector

Retrieve dates of financial entry changes

GetConnector for retrieving dates on which financial entries have changed. This eliminates the need to use a GetConnector to retrieve a large number of entries and then search for the changes. Instead, you first use the GetConnector to retrieve the dates that have changes. You then use another GetConnector to retrieve all financial entries on those dates.

GetConnector name: Profit_Fin_ChangedEntrydate

Procedure:

Your external system contains all financial entries from Profit.

  1. Call the 'Profit_Fin_ChangedEntrydate' GetConnector. Use the following filter in the call:

    Ltst. wijz. (datum) => Date of previous call

    This ensures the GetConnector only retrieves the dates on which something has changed since the last call.

    For example, you have retrieved entries that have been changed since 01-09-2016. The result:

    The GetConnector lists the dates on which financial entries have been added, deleted or changed.

  2. Use a GetConnector to retrieve all financial entries for the dates on which entries have changed.

    So in the example you run the GetConnector with the dates in the Boekingsdatum column.

  3. In the external database, delete the entries on the dates in question and replace them by the newly retrieved entries.

Directly to

  1. GetConnector
  2. Supplied GetConnectors
  3. Add a GetConnector in Profit
  4. Test a GetConnector in Profit
  5. Use and test filters using the Web service
  6. Import and export a GetConnector