Hi @vinayababu
In Adobe Experience Platform , the Environment File ID plays a crucial role in identifying which organization the data belongs to when using the AEP Mobile SDK. The Environment File ID is associated with a specific Adobe Experience Cloud organization (org_id) and contains configuration settings necessary for tracking and data collection.
Scenario: Sending Data to Two Different Organizations
When you need to send data to two different organizations using the AEP Mobile SDK, you will have to set up two distinct Environment File IDs. Each ID corresponds to a specific organization and its associated configuration. Here’s how you can manage this setup:
Steps to Configure Multiple Environment File IDs
-
Identify Your Environment File IDs:
- First, ensure that you have created two separate Environment File IDs in Adobe Launch or Adobe Experience Platform for the two organizations you want to target. Each of these files should contain the relevant settings (including the organization ID, tracking server, and other configurations) for the respective organizations.
-
Dynamic Switching of Environment File IDs:
- The AEP Mobile SDK allows you to dynamically switch between different Environment File IDs at runtime. You can achieve this using the
MobileCore.configureWithAppID() method or MobileCore.updateConfiguration() method to load the specific configuration based on your requirements.
Example Implementation
Here’s an example approach to implement this in your mobile application:
// Step 1: Configure and send data to Organization 1
MobileCore.configureWithAppID("environment-file-id-org1");
// Code to send data to Organization 1
// ...
// Step 2: Switch to Organization 2
MobileCore.configureWithAppID("environment-file-id-org2");
// Code to send data to Organization 2
// ...
Important Considerations
-
Sequential Data Sending: The AEP Mobile SDK can only maintain one active configuration at a time, which means you’ll be sending data sequentially to each organization. Ensure that events for one organization are sent and processed before switching to the other configuration.
-
Avoiding Data Conflicts: Manage the timing of your configuration switches to avoid potential data overlap or confusion in the events being sent.
Hope it will help you!
Kr,
Parvesh