Export Data with the SiteExport Job Step

The out-of-the-box SiteExport job system step exports data. When you add this step to a job flow, you specify the export file name and use JSON syntax to describe the data units to export.

Table 1. Parameters for SiteExport
Parameter Description
ID Must be unique within the job and no more than 100 characters.
Description Optional. Can be up to 100 characters.
ExportFile Export file name and path relative to IMPEX/src. Required if not using FileNamePrefix.
FileNamePrefix Prefix for the export file. Can include a path relative to IMPEX/src. The timestamp is appended. To order the files chronologically, sort alphabetically. Required if not using ExportFile.
OverwriteExportFile If selected, the export overwrites an existing file. If not selected and a file exists, the job exits and reports an error.
DataUnits String in JSON format that describes the data to be exported.

DataUnits JSON Example

{
  "export_data_units_configuration" : {
    "sites" : {
        "siteDEMO" : {
            "active_data_feeds": true,
            "cache_settings": true,
            "campaigns_and_promotions": true,
            "content": true,
            "coupons": true,
            "customer_cdn_settings": true,
            "customer_groups": true,
            "custom_objects": true,
            "dynamic_file_resources": true,
            "distributed_commerce_extensions": true,
            "ocapi_settings": true,
            "payment_methods": true,
            "payment_processors": true,
            "redirect_urls": true,
            "search_settings": true,
            "shipping": true,
            "site_descriptor": true,
            "site_preferences": true,
            "static_dynamic_alias_mappings": true,
            "sitemap_settings": true,
            "slots": true,
            "sorting_rules": true,
            "source_codes": true,
            "stores": true,
            "tax": true,
            "url_rules": true,
            "gift_certificates": true
        },
        "otherSiteDEMO" : {
            "all": true
        }
    },
    "libraries" : {
      "libDEMO" : true
    },
    "library_static_resources" : {
      "siteDEMO" : true
    },
    "catalogs" : {
      "catalogDEMO" : true
    },
    "catalog_static_resources" : {
      "catalogStaticResDEMO" : true
    },
    "price_books" : {
      "pricebookDEMO" : true
    },
    "inventory_lists" : {
      "all" : true
    },
    "customer_lists" : {
      "siteDEMO" : true
    },
    "global_data" : {
        "preferences": true,
        "global_custom_objects": true,
        "job_schedules": true,
        "job_schedules_deprecated": true,
        "meta_data": true,
        "static_resources": true,
        "users": true,
        "access_roles": true,
        "geolocations": true,
        "custom_quota_settings": true,
        "oauth_providers": true,
        "ocapi_settings": true,
        "webdav_client_permissions": true,
        "services": true,
        "csc_settings": true,
        "page_meta_tags": true,
        "price_adjustment_limits": true,
        "csrf_whitelists": true,
        "sorting_rules": true,
        "system_type_definitions": true,
        "custom_types": true,
        "custom_preference_groups": true
    }    
  }
}

DataUnits JSON Syntax

The DataUnits parameter defines which objects are included in an export. Its function is similar to the Data Units to Export field on the Business Manager Site Import & Export page. You can export all objects of a certain type, for example, all sites or all libraries. Units not included in the JSON are not included in the export. The JSON syntax and data unit names are validated when you add the step to the job. If an object name is not found, a log message is written during run time.

Table 2. JSON Names and Values
Name Value
export_data_units_configuration Highest level array of the JSON.
sites Site-specific data to export. You can export individual sites by specifying their names, or all sites using the keyword all. You can specify which sub-data units to include in the export, or specify all to include all sub-data units for that site. The sub-data units are:
  • ab_tests
  • active_data_feeds
  • cache_settings
  • campaigns_and_promotions
  • content
  • coupons
  • customer_cdn_settings
  • customer_groups
  • custom_objects
  • distributed_commerce_extensions
  • dynamic_file_resources
  • gift_certificates
  • ocapi_settings
  • payment_methods
  • payment_processors
  • redirect_urls
  • search_settings
  • shipping
  • site_descriptor
  • site_preferences
  • static_dynamic_alias_mappings
  • sitemap_settings
  • slots
  • sorting_rules
  • source_codes
  • stores
  • tax
  • url_rules
libraries Shared libraries. To export only certain libraries, specify the library names. To export all shared libraries, use the keyword all.
library_static_resources Content images of private site libraries. To export the content images of only certain sites, specify the site names. To export the content images for all sites, use the keyword all.
catalogs Catalogs. To export only certain catalogs, specify the catalog names. To export all catalogs, use the keyword all.
catalog_static_resources Product images. To export only certain product images, specify the catalog names. To export product images of all catalogs, use the keyword all.
price_books Price books. To export only certain price books, specify the price book names. To export all price books, use the keyword all.
inventory_lists Inventory lists. To export only certain inventory lists, specify the inventory list names. To export all inventory lists, use the keyword all.
customer_lists Customer lists. To export the customer lists of only certain sites, specify the site names. To export the customer lists for all sites, use the keyword all.
global data Global data to export. Use the keyword all to include all global units. The global units are:
  • access_roles
  • csc_settings
  • csrf_whitelists
  • custom_preference_groups
  • custom_quota_settings
  • custom_types
  • geolocations
  • global_custom_objects
  • job_schedules
  • job_schedules_deprecated
  • meta_data
  • oauth_providers
  • ocapi_settings
  • page_meta_tags
  • preferences
  • price_adjustment_limits
  • services
  • sorting_rules
  • static_resources
  • system_type_definitions
  • users
  • webdav_client_permissions