Previous Next JavaScript must be enabled to correctly display this content

## 3.11.11.1.12 Synchronizing Feedback Among Environments

Learn about best practices for synchronizing feedback from development, test, and production environments.

- About Synchronizing Feedback Among Environments
- Distinguishing Between DEV, TEST, and PROD Environments
- Exporting Feedback from Testing or Production
- Exporting Feedback from Development to Sync Back to Testing or Production
- Performing Incremental Feedback Export

Parent topic: Exporting and Importing Using SQLcl

### 3.11.11.1.12.1 About Synchronizing Feedback Among Environments

APEX applications application enable end users to report feedback that can be useful input to the development process. You can use SQLcl to export the feedback from your testing or production environments and import it into your development environment. After responding to and addressing the feedback as appropriate in development, you can later use SQLcl again in the development environment to separately export:

- Feedback that originated from the testing environment

- Feedback that originated from the production environment

This approach enables you to then import the appropriate feedback back into its originating environment, keeping that environment's feedback information in sync so testers and end users can appreciate the impact their feedback has had on the evolution of your application.

Parent topic: Synchronizing Feedback Among Environments

### 3.11.11.1.12.2 Distinguishing Between DEV, TEST, and PROD Environments

Distinguish between active development (`DEV`), testing (`TEST`), and production (`PROD`) environments by specifying a `Feedback Synchronization Source Identifier` and a workspace environment banner.

APEX development teams typically provision three environments that share the same workspace name and workspace ID. One is used for active development, another for testing purposes, and the third environment contains the production application and data used by end-users.

Since all three environments share the same workspace ID, you can easily distinguish them by configuring each workspace instance to have:

- A distinct value of the `Feedback Synchronization Source Identifier` to use for synchronizing feedback.

- A workspace environment banner to visually distinguish them while working in the App Builder.

For example, suppose you have a workspace named `TEAMWORK` in each of the three environments. Since all three workspace environments have the same workspace name ( `TEAMWORK`) and workspace ID (`1908816359534887`), you could use the values shown in the following table to distinguish them from one another.

Message Name | English Text
--- | ---
DEV | Development
TEST | Testing
PROD | Production

See Also:

- Configuring an Environment Banner for a Workspace

- Configuring an Environment Banner in Administration Services

Parent topic: Synchronizing Feedback Among Environments

### 3.11.11.1.12.3 Exporting Feedback from Testing or Production

To export feedback from the testing or production environment, connect to the appropriate database user with SQLcl and use `apex export` with the `-expFeedback` option and provide the workspace ID.

    SQL> apex export -expFeedback -workspaceid 1908816359534887
    Exporting Feedback for Workspace 1908816359534887:'TEAMWORK'

The previous example produces a file named `fb1908816359534887.sql` in the current directory. This file contains a line that reflects the PROD value of the `Feedback Synchronization Source Identifier` of the production environment, for example:

    :
    wwv_flow_api.set_feedback_origin('PROD', 'DEVELOPMENT');
    :

If this example been done in the Testing environment, this value would have been `TEST` in the exported SQL file.

To import the feedback into the development environment, run this SQL script when connected to the workspace schema user of the development environment's database.

Parent topic: Synchronizing Feedback Among Environments

### 3.11.11.1.12.4 Exporting Feedback from Development to Sync Back to Testing or Production

Once your development team has processed any imported feedback entries in the Development environment, you can export the feedback entries specific to a particular target environment by using the `-deploymentSystem` option. For example, to export the feedback from Development that originated from the PROD environment, the feedback export command would look similar to the following:

    SQL> apex export -expFeedback -workspaceid 1908816359534887 -deploymentSystem PROD
    Exporting Feedback for Workspace 1908816359534887:'TEAMWORK'

This example would produce a `fb1908816359534887.sql` file in the current directory. This file would contain only the feedback entries that are appropriate to import back into the Production environment to update it with the latest status of the feedback for the items that originated there. To import the feedback into the production environment, run this script when connected to the workspace schema user of the production environment's database.

Parent topic: Synchronizing Feedback Among Environments

### 3.11.11.1.12.5 Performing Incremental Feedback Export

When working with a lot of feedback entries, you consider exporting only feedback entries created or changed on or after a particular date. To perform this incremental feedback export, add the `-expFeedbackSince` option to your `apex export -expFeedback` command line, indicating the date is the format `YYYYMMDD`.

For example, to export feedback entries from production made on or after January 22, 2022, the command becomes:

    SQL> apex export -expFeedback -workspaceid 1908816359534887 -expFeedbackSince 20220122

To perform an incremental export of updated feedback entries in the Development environment that originated from the Production environment for the purposes of synchronizing the changes back to Production, then add the `-expFeedbackSince` option.

For example, to export feedback entries from development that originated in the production environment that were updated on or after March 21, 2022, the command becomes:

    SQL> apex export -expFeedback -workspaceid 1908816359534887 -deploymentSystem PROD -expFeedbackSince 20220321

Parent topic: Synchronizing Feedback Among Environments