Skip to content

Export Records from SugarAI

This task will execute a query against the SugarAI system and return the data in XML format. Custom modules and custom fields are supported. You can also export data from related modules.

Settings

Connection

Required
The SugarAI connection details to use. See Connecting to SugarAI.

Export Settings

Required
A group of settings to determine whether new, modified or all records will be exported.

  • Date Created - Only records created after this date will be exported. The date will update automatically each time the task runs.
  • Date Modified - Only records modified after this date will be exported. The date will update automatically each time the task runs.
  • Export Modified, New or All Records - Used to choose which records should be included in the export. Note that the 'Modified' setting will also export new records too.

Page Size

Required
Depending on the number of records the query returns, the data may need to be split into a series of pages during the export. This setting determines the maximum number of records that can appear on each page. 

The output file combines the records from all pages, so it will always contain all the results of the query. Therefore this setting only affects performance.

Query

Required
A group of settings that determine the query to run against SugarAI.

  • Fields - Select the fields you want the query to return. You can either select all fields, or your own custom selection of fields. When using your own selection, you can also select fields from related modules. Where this is possible, a 'Customise' button will appear next to the field.
  • Filter - A collection of filters to limit the results returned. Each filter can consist of a series of 'AND' and 'OR' clauses, which will be combined using the respective operator. Each clause represents a condition for a specific field.
  • Include Deleted Records - Set to True if you want the results to include deleted records.
  • Module - Select the module you want to export data from (i.e. the type of records to export).

Output File

Required
The file to saved queried records to.

Zynk Settings

See Common Task Settings

Examples

A sample output file is shown below.

<?xml version="1.0" encoding="utf-8"?>
<Records>
  <Record>
    <id>d0e14162-6966-11f1-99ff-0245ba833097</id>
    <name>Test Opportunity</name>
    <date_modified>2026-06-16T10:36:14</date_modified>
    <accounts>
      <next_offset>-1</next_offset>
      <records>
        <ArrayItem>
          <name>Test Account</name>
          <billing_address_street>6-8 Charlotte Square</billing_address_street>
          <billing_address_street_2></billing_address_street_2>
          <billing_address_street_3></billing_address_street_3>
          <billing_address_street_4></billing_address_street_4>
          <billing_address_city>Newcastle</billing_address_city>
          <billing_address_state>Tyne &amp; Wear</billing_address_state>
          <billing_address_postalcode>NE1 4XF</billing_address_postalcode>
          <billing_address_country>Great Britain</billing_address_country>
          <phone_office>0191 1234567</phone_office>
          <date_modified>2026-06-22T12:10:31</date_modified>
          <id>aa193b3e-659c-11f1-ad77-02c2108a1971</id>
          <locked_fields />
          <deleted>False</deleted>
          <_module>Accounts</_module>
        </ArrayItem>
      </records>
    </accounts>
    <revenuelineitems>
      <ArrayItem>
        <name>Zynk Test</name>
        <date_closed>2026-06-30</date_closed>
        <rli_templates_link>
          <next_offset>-1</next_offset>
          <records>
            <ArrayItem>
              <id>23a4f2b8-5a6c-11f1-a771-02c2108a1971</id>
              <name>Zynk Test</name>
              <description>test product</description>
              <mft_part_num>AAA01</mft_part_num>
              <vendor_part_num></vendor_part_num>
              <list_price>15.000000</list_price>
              <date_modified>2026-05-28T09:06:32</date_modified>
              <locked_fields />
              <deleted>False</deleted>
              <_module>ProductTemplates</_module>
            </ArrayItem>
          </records>
        </rli_templates_link>
        <quantity>1</quantity>
        <date_modified>2026-06-16T10:36:14</date_modified>
        <id>c76c7e1d-3e13-4622-a0e9-d4033cbfb66e</id>
        <locked_fields />
        <deleted>False</deleted>
        <_module>RevenueLineItems</_module>
      </ArrayItem>
      <ArrayItem>
        <name>Fluff</name>
        <date_closed>2026-06-30</date_closed>
        <rli_templates_link>
          <next_offset>-1</next_offset>
          <records />
        </rli_templates_link>
        <quantity>1</quantity>
        <date_modified>2026-06-16T10:36:14</date_modified>
        <id>11be1a46-e8d7-4cb8-b1f4-e0c1ca428a24</id>
        <locked_fields />
        <deleted>False</deleted>
        <_module>RevenueLineItems</_module>
      </ArrayItem>
    </revenuelineitems>
    <purchasedlineitems>
      <next_offset>-1</next_offset>
      <records />
    </purchasedlineitems>
    <locked_fields />
    <deleted>False</deleted>
    <_module>Opportunities</_module>
  </Record>
</Records>