1About Daily Extract

About the Daily Extract

The Daily Extract functionality extracts data from Oracle Field Service Cloud for storage, analysis and reporting of events. The extracted data contain details of the main entities such as activities, inventory, and messages and are stored as a set of XML files in the Daily Extract database.

You can configure the files that are extracted at the time of implementing the application and later modify as necessary.

Note: To access data elements that are not described here, use a different interface, such as REST APIs.

Set Permission for Daily Extract Configuration

User types that have appropriate permissions can define and modify the Daily Extract configuration. Permission is granted to user types through the Configuration tab.

To set up permissions for daily extract configuration:

  1. Click Configuration .

  2. In the Configuration page, select User Types.

    The User type info screen opens with a list of user types in the left column.

  3. Select the user type you want to allow to configure the Daily Extract fields.

  4. Click the Screen configuration tab.

  5. In the Manage screen, click Configuration.

    The Configuration screen opens with a list of actions in the left panel.

  6. Scroll down the Actions column and select Outbound Integration Channels.

    The screen displays a list of labels in various languages, and the bottom of the screen contains the visibility information.

  7. Click Add new visibility.

    The Outbound Integration Channels visibility window displays.

  8. Click Save.

  9. Click Close in the lower left corner of the screen.

About Extraction Files

The Daily Extract provides a set of XML files containing data for various entities such as activities and resources.

Data on the details of different entities processed during the extraction period or available by the end of extraction period can be collected and extracted in the files. This data can be divided into data sets, that is, groups of details related to one and the same entity in the application. In some cases data related to one entity is divided in several different data sets.

Note: Data from several data sets cannot be extracted in one file, but data from one data set can be divided to be extracted in any number of files. For example, the file created for the Activity Fields entity cannot also include data for the Resource Fields entity. At the same time, one file can refer to several database tables according to the exported field's configuration. For example, an Activity Fields file may include data from the queue table if it has been configured to do so.

About the Extraction Period

The Daily Extract files contain the collected and extracted data for entities that are processed:

  • during the extraction period — If an entity is available in the application at any time during the extraction period, it will be extracted.

  • by the end of the extraction period — Entities that were created during the extraction period but deleted before the end of the period will not be extracted.

Daily Extract files are typically generated once a day and contain all data that is processed since the previous extraction. If your company does not support overnight shifts, the extraction period covers the time since the previous extraction and until the end of the previous day. If your company supports overnight shifts, the Daily Extract data for the previous day is available for extraction after the overnight expiration, that is, at 00:00 AM + overnight. If the data is extracted before that time, the resulting files will contain data for two days before.

Note: A company can operate in several time zones, however, the Daily Extract functionality extracts data according to the time zone defined for the company in Business Rules. Only the following files are extracted in Greenwich Mean Time:
  • General Message Details

  • Message Text Details

  • PAS Answer Details

  • gpstracks Details

Upon the first extraction, all available data is collected.

Create Daily Extract Files

Users who have permission to configure the Daily Extract can access the Outbound Integration Channels screen and modify the set of files for the Daily Extract and their content.

The Outbound Integration Channels screen lists the files that will be extracted. Each row shows an entity and the extraction file it is related to, for example, the GPS Track entity and {COMPANY_NAME}_gps_tracks.xml file. The icon to the far right in the row lets you display the fields associated with the entity in the extraction file, and lets you remove the file.

To create daily extract files:

  1. Click the Configuration tab and select Outbound Integration Channels.

  2. On the Outbound Integration Channels screen, click Add new.

    The Add configuration window opens.

  3. Click Daily Extract and select the entity containing the data you want to extract.

    Examples for all entities can be found in the About Extraction Data Sets topic.

  4. Type the file name in the field using the format {COMPANY_NAME}_filename.xml.

    Note: The file name must include the {COMPANY_NAME}_ prefix. All Daily Extract files are created in the XML format.
  5. Click Submit.

    The Add configuration window closes and the new configuration appears in the list on the Daily Extract page.

Configure Daily Extract File Structure

You can configure the fields associated with the Daily Extract channel.

To add or remove the fields associated with the Daily Extract files of an entity:
  1. Click Configuration and select Outbound Integration.

  2. Click the Daily Extract channel to configure fields.

  3. In the Daily Extract screen, click the Properties icon next to the field to configure.

  4. To add fields to the entity, do the following:

    1. Click the Properties icon corresponding to that row and select Fields from the drop down menu.

      This figure shows the Properties icon to configure fields:

      Image shows Properties icon.

    2. Click the Plus icon and select the required field that you want to add to the entity.

    3. Click Add and Click OK.

  5. To delete any field from the list, select Delete from the drop-down menu.

    The fields you deleted are removed from the Field List immediately.

Remove Daily Extract Files

You can remove the Daily Extract files you no longer want to use permanently. Once removed, you cannot retrieve these files.

To remove daily extract files:
  1. On the Daily Extract screen, click the icon to the far right in the row for the file you want to delete.

    This figure shows the drop-down menu with Fields and Remove options that appear when you select Properties icon in the Daily Extract Configuration screen.

  2. Select Remove.

  3. Click OK.

    The configuration is removed from the list on the Daily Extract screen.

Download Daily Extract Files via REST Core API

You can use the Core API REST interface to access the Daily Extract files.

To access Daily Extract files using the Core API, you must install the cURL utility. You must also install the jq command-line processor if the target file list is unknown and the files are to be obtained from Oracle Field Service Cloud side.

Example files are shown below and may be modified according to your needs.

Note: For simplification of the sample code, these demo scripts have omitted argument and response validation.

credentials.sh

The credentials file must contain the company name, API user, and a valid password.

#!/bin/sh

# Credentials
export COMPANY=""
export LOGIN="api_user_name"
export PASSWORD=""

# API URL
export URL="https://api.etadirect.com"

file_list.sh<DATE>

To see a list of exported files, use the sample code with the date argument in YYYY-MM-DD format.

#!/bin/sh
# Arguments
DATE="$1"
 
. ./credentials.sh
 
curl -u ${LOGIN}:${PASSWORD} ${URL}/rest/ofscCore/v1/folders/dailyExtract/folders/${DATE}/files/?company=${COMPANY} | jq -r '.files.items[].name' 

get_file.sh<DATE><FILENAME>

#!/bin/sh
# Arguments
DATE="$1"
FILENAME="$2"
 
. ./credentials.sh
 
curl -u ${LOGIN}:${PASSWORD} ${URL}/rest/ofscCore/v1/folders/dailyExtract/folders/${DATE}/files/${FILENAME}?company=${COMPANY} -o ${FILENAME}

all_files.sh<DATE>

#!/bin/sh -x
# Arguments
DATE="$1"
 
for filename in `./file_list.sh ${DATE}`
do
    ./get_file.sh ${DATE} $filename
done

More information about APIs

Create a New Outbound Channel

You can now create new channels for Oracle BI Cloud Service and Oracle Database as a Service using this configuration page. Daily extract option will be available by default in this page. After creating new channels, you can transfer data in real time to your Oracle BI Cloud Service or Oracle Database as a Service instance.

To add a new Outbound Integration channel:
  1. Click Configuration and select Outbound integration.

    The Outbound Integration Channels configuration window opens

  2. To create a new channel, click Add.

    The Add Channel dialog opens.

  3. Select the Channel Type from the drop-down list.

    • If you select Business Intelligence Cloud Service, the Add Channel dialog displays the Name, URL and Identity Domain fields.

      The image shows the Add Channel dialog options for Oracle BI Cloud Service.


      Image shows Add Channel dialog for Oracle Business Intelligence Cloud Service.
    • If you select Database as a Service, the Add Channel dialog displays the Name, Host, Port, Connect with SID and Connect with Service Name fields.

      The image shows the Add Channel dialog options for Oracle Database as a Service.


      Image shows Add Channel dialog for Oracle Database as a Service.
  4. Complete the fields and click OK to add the channel.

The newly added outbound channel will now be available in the outbound integration page. Data transmission to Oracle BI Cloud Service or Oracle Database as a Service displayed in this page will be reset every day (24 hours). The data processing and transmission depends on the volume of data stored. You may expect a delay in transferring big volumes of data. Also, the daily transmission will be initiated as per the daily extraction period. Real-time data transfer of the following entities will be initiated only from next day: Activity, inventory, ActivityLink, Resources, Users and Route entities.