diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceProxyConfigController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceProxyConfigController.js
index 8e3b5b8..c85187e 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceProxyConfigController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceProxyConfigController.js
@@ -60,25 +60,58 @@
 
         $scope.serviceTypes = [];
 
-        function init() {
-            loadServiceTypes();
+        $scope.isSourceSubscriberEnabled = function() {
+            return featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_2006_PORT_MIRRORING_LET_SELECTING_SOURCE_SUBSCRIBER)
+                && !$scope.configurationByPolicy;
+        };
 
+        function init() {
+            if ($scope.isSourceSubscriberEnabled())  {
+                loadSourceSubscriber();
+            }
+            loadServiceTypes(DataService.getGlobalCustomerId(), handleGetSourceAndCollectorServiceTypesResponse);
             generateMetadata(sourceServiceProxy);
             generateMetadata(collectorServiceProxy);
 
         }
 
+        function loadSourceSubscriber() {
+            AaiService.getSubList(function (response) {
+                $scope.sourceSubscribers = response;
+                $scope.sourceSubscriber = response.find((subscriber)=>{
+                    return subscriber.globalCustomerId === DataService.getGlobalCustomerId();
+                });
+            }, function (response) { // failure
+                $scope.sourceSubscribers = [];
+            });
+        }
+
+        function getSourceSubscriberId() {
+            return $scope.isSourceSubscriberEnabled()
+                ? $scope.sourceSubscriber && $scope.sourceSubscriber.globalCustomerId
+                : DataService.getGlobalCustomerId()
+        }
+
         function setDefaultCollectorServiceType() {
             const configServiceType = DataService.getServiceType();
             $scope.collectorServiceType = mustFind($scope.serviceTypes, {"service-type": configServiceType});
             loadCollectorProxies();
         }
 
-        function handleGetServiceTypesResponse(response) {
+        function handleGetSourceAndCollectorServiceTypesResponse(response) {
+            handleGetSourceServiceTypesResponse(response)
+            handleGetCollectorServiceTypesResponse(response)
+        }
+
+        function handleGetCollectorServiceTypesResponse(response) {
             $scope.serviceTypes = response.data;
             setDefaultCollectorServiceType();
         }
 
+        function handleGetSourceServiceTypesResponse(response) {
+            $scope.sourceServiceTypes = response.data;
+        }
+
         var handleGetParametersResponse = function(parameters) {
             $scope.serviceMetadataFields = parameters.summaryList;
             $scope.nodeTemplateFields =  DataService.getPortMirroningConfigFields();
@@ -97,11 +130,14 @@
             $window.history.back();
         };
 
+        $scope.onSourceSubscriberChange = function(selectedSubscriber) {
+            $scope.sourceSubscriber = selectedSubscriber
+            loadServiceTypes(selectedSubscriber.globalCustomerId, handleGetSourceServiceTypesResponse)
+        }
 
-        function loadServiceTypes() {
-            const subscriberId = DataService.getGlobalCustomerId();
+        function loadServiceTypes(subscriberId, handleGetServiceTypesResponseCallback) {
             AaiService.getSubscriberServiceTypes(subscriberId)
-                .then(handleGetServiceTypesResponse)
+                .then(handleGetServiceTypesResponseCallback)
                 .catch(function (error) {
                     $log.error(error);
                 });
@@ -288,7 +324,7 @@
             if (service.name === 'collectorInstanceName' && $scope.configurationByPolicy) {
                 var configurationModel = DataService.getModelInfo(COMPONENT.VNF);
                 AaiService.getPnfInstancesList(
-                    DataService.getGlobalCustomerId(),
+                    getSourceSubscriberId(),
                     serviceType,
                     serviceProxy.sourceModelUuid,
                     serviceProxy.sourceModelInvariant,
@@ -307,7 +343,7 @@
                     });
             } else {
                 AaiService.getVnfInstancesList(
-                    DataService.getGlobalCustomerId(),
+                    getSourceSubscriberId(),
                     serviceType,
                     serviceProxy.sourceModelUuid,
                     serviceProxy.sourceModelInvariant,
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceProxyConfig.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceProxyConfig.htm
index 42732bb..99d8305 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceProxyConfig.htm
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceProxyConfig.htm
@@ -64,10 +64,18 @@
             </div>
             <form name="proxiesInstanceName" class="bottom">
                 <div class="wrapper-list source-vnf">
-                    <div class="title-txt"><b>Source</b> Service Type</div>
+                    <div class="title-txt" ng-if="isSourceSubscriberEnabled()"><b>Source</b> Subscriber name </div>
+                    <select ng-model="sourceSubscriber"
+                            ng-change="onSourceSubscriberChange(sourceSubscriber)" name="sourceSubscriber" id="sourceSubscriber"
+                            ng-options="item['subscriberName'] disable when !(item['isPermitted']) for item in sourceSubscribers"
+                            ng-if="isSourceSubscriberEnabled()"
+                            required data-tests-id="sourceSubscriberName">
+                    </select>
+
+                    <div class="title-txt" ng-class="{'select-vnf-title': isSourceSubscriberEnabled()}"><b>Source</b> Service Type</div>
                     <select ng-model="sourceServiceType"
                             ng-change="onSourceServiceTypeSelected()" name="sourceServiceType" id="sourceServiceType"
-                            ng-options="item['service-type'] disable when !(item['is-permitted']) for item in serviceTypes"
+                            ng-options="item['service-type'] disable when !(item['is-permitted']) for item in sourceServiceTypes"
                             required data-tests-id="sourceServiceType">
                         <option value="" disabled>Select service type</option>
                     </select>
diff --git a/vid-automation/src/main/java/vid/automation/test/Constants.java b/vid-automation/src/main/java/vid/automation/test/Constants.java
index e639ee0..1130107 100644
--- a/vid-automation/src/main/java/vid/automation/test/Constants.java
+++ b/vid-automation/src/main/java/vid/automation/test/Constants.java
@@ -450,6 +450,7 @@
         public static final String SOURCE_DROPDOWN_TEST_ID = "sourceDropDown";
         public static final String COLLECTOR_DROPDOWN_TEST_ID = "collectorDropDown";
         public static final String COLLECTOR_INSTANCE_NAME_TEST_ID = "collectorInstanceName";
+        public static final String SOURCE_SUBSCRIBER_NAME = "sourceSubscriberName";
         public static final String SOURCE_INSTANCE_NAME_TEST_ID = "sourceInstanceName";
         public static final String MODEL_NAME_TEST_ID = "modelName";
         public static final String COLLECTOR_NO_RESULT_MSG_TEST_ID = "collectorNoResults";
diff --git a/vid-automation/src/main/java/vid/automation/test/sections/ServiceProxyPage.java b/vid-automation/src/main/java/vid/automation/test/sections/ServiceProxyPage.java
index b96a7d3..e3b924a 100644
--- a/vid-automation/src/main/java/vid/automation/test/sections/ServiceProxyPage.java
+++ b/vid-automation/src/main/java/vid/automation/test/sections/ServiceProxyPage.java
@@ -4,6 +4,7 @@
 import org.onap.sdc.ci.tests.utilities.GeneralUIUtils;
 import org.openqa.selenium.WebElement;
 import vid.automation.test.Constants;
+import vid.automation.test.Constants.ConfigurationCreation;
 import vid.automation.test.Constants.ViewEdit;
 import vid.automation.test.infra.SelectOption;
 
@@ -15,6 +16,13 @@
         SelectOption.byTestIdAndVisibleText(source, Constants.ConfigurationCreation.SOURCE_DROPDOWN_TEST_ID);
         return this;
     }
+
+    public ServiceProxyPage chooseSourceSubscriberName(String subscriberName){
+        SelectOption.byTestIdAndVisibleText(subscriberName, "sourceSubscriberName");
+        GeneralUIUtils.ultimateWait();
+      return this;
+    };
+
     public ServiceProxyPage chooseSourceServiceType(String sourceServiceType){
         SelectOption.byTestIdAndVisibleText(sourceServiceType, "sourceServiceType");
         GeneralUIUtils.ultimateWait();
@@ -25,6 +33,12 @@
         GeneralUIUtils.ultimateWait();
         return this;
     }
+
+    public void assertSourceSubscriberName(String sourceSubscriberName){
+        String displayedSubscriberName = SelectOption.getSelectedOption(ConfigurationCreation.SOURCE_SUBSCRIBER_NAME);
+        Assert.assertEquals("The displayed source subscriber name is not correct", sourceSubscriberName, displayedSubscriberName);
+    }
+
     public void assertCollectorServiceType(String collectorServiceType) {
         String displayedCollectorServiceType = SelectOption.getSelectedOption("collectorServiceType");
         Assert.assertEquals("The displayed collector service type is incorrect", collectorServiceType, displayedCollectorServiceType);
diff --git a/vid-automation/src/main/java/vid/automation/test/test/CreatePortMirroringConfigurationTest.java b/vid-automation/src/main/java/vid/automation/test/test/CreatePortMirroringConfigurationTest.java
index eac0951..a3699e3 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/CreatePortMirroringConfigurationTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/CreatePortMirroringConfigurationTest.java
@@ -1,6 +1,8 @@
 package vid.automation.test.test;
 
 import com.google.common.collect.ImmutableMap;
+import java.util.HashMap;
+import java.util.Map;
 import org.junit.Assert;
 import org.onap.sdc.ci.tests.utilities.GeneralUIUtils;
 import org.openqa.selenium.WebElement;
@@ -17,9 +19,6 @@
 import vid.automation.test.services.BulkRegistration;
 import vid.automation.test.services.SimulatorApi;
 
-import java.util.HashMap;
-import java.util.Map;
-
 public class CreatePortMirroringConfigurationTest extends VidBaseTestCase {
 
     private ViewEditPage viewEditPage = new ViewEditPage();
@@ -32,6 +31,7 @@
     private String pnfInstanceName = "AS-pnf2-10219--as988q";
     private String pnfServiceType = "DARREN MCGEE";
     private String vnfServiceType = "TYLER SILVIA";
+    private String sourceSubscriberName = "SILVIA ROBBINS";
     private String defaultCollectorServiceType = "TYLER SILVIA";
     private String vnfInstanceName = "zhvf6aepdg01";
     private String active = "Active";
@@ -42,6 +42,10 @@
         return Features.FLAG_1810_CR_LET_SELECTING_COLLECTOR_TYPE_UNCONDITIONALLY.isActive();
     }
 
+    private boolean featureFlagLetSelectingSourceSubscriber() {
+        return Features.FLAG_2006_PORT_MIRRORING_LET_SELECTING_SOURCE_SUBSCRIBER.isActive();
+    }
+
     private String expectedPnfCollectorServiceType() {
         return (featureFlagLetsSelectingCollector() ? pnfServiceType : defaultCollectorServiceType).replace(" ", "%20");
     }
@@ -234,6 +238,10 @@
 
         //select source & collector
         serviceProxyPage.assertCollectorServiceType(defaultCollectorServiceType);
+        if(featureFlagLetSelectingSourceSubscriber()){
+            serviceProxyPage.assertSourceSubscriberName(sourceSubscriberName);
+            serviceProxyPage.chooseSourceSubscriberName(sourceSubscriberName);
+        }
         serviceProxyPage.chooseCollectorServiceType(vnfServiceType);
         serviceProxyPage.chooseCollector(vnfInstanceName);
         serviceProxyPage.assertSelectedInstanceIcon(Constants.ConfigurationCreation.COLLECTOR_INSTANCE_SELECTED_ICON_TEST_ID);
