diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties b/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties
index 2478804..c171ac0 100755
--- a/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties
+++ b/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties
@@ -159,6 +159,8 @@
 mso.max.polls=3
 mso.user.name=infraportal
 mso.password.x=OBF:1ghz1kfx1j1w1m7w1i271e8q1eas1hzj1m4i1iyy1kch1gdz
+#E2E is v3
+mso.restapi.svc.e2einstance=/e2eServiceInstances/v3
 mso.restapi.svc.instance=/serviceInstances/v6
 mso.restapi.vnf.instance=/serviceInstances/v6/<service_instance_id>/vnfs
 mso.restapi.network.instance=/serviceInstances/v6/<service_instance_id>/networks
diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system_template.properties b/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system_template.properties
index 06b2514..0f31f9a 100755
--- a/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system_template.properties
+++ b/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system_template.properties
@@ -102,6 +102,8 @@
 mso.max.polls=10
 mso.user.name=${VID_MSO_USER}
 mso.password.x=${VID_MSO_PASS}
+#E2E is v3
+mso.restapi.svc.e2einstance=/ecomp/mso/infra/e2eServiceInstances/v3
 mso.restapi.svc.instance=/ecomp/mso/infra/serviceInstances/v6
 mso.restapi.vnf.instance=/ecomp/mso/infra/serviceInstances/v6/<service_instance_id>/vnfs
 mso.restapi.network.instance=/ecomp/mso/infra/serviceInstances/v6/<service_instance_id>/networks
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetTenatns/GetTenantsResponse.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetTenatns/GetTenantsResponse.java
index bee9244..1d0e849 100644
--- a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetTenatns/GetTenantsResponse.java
+++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetTenatns/GetTenantsResponse.java
@@ -12,6 +12,9 @@
     @JsonProperty("cloudRegionID")
     public String cloudRegionId;
 
+    @JsonProperty("cloudOwner")
+    public String cloudOwner;
+    
     @JsonProperty("tenantName")
     public String tenantName;
 
@@ -24,8 +27,9 @@
     public GetTenantsResponse() {
     }
 
-    public GetTenantsResponse(String cloudRegionId, String tenantName, String tenantID, boolean isPermitted) {
+    public GetTenantsResponse(String cloudRegionId, String cloudOwner, String tenantName, String tenantID, boolean isPermitted) {
         this.cloudRegionId = cloudRegionId;
+        this.cloudOwner = cloudOwner;
         this.tenantName = tenantName;
         this.tenantID = tenantID;
         this.isPermitted = isPermitted;
diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Input.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Input.java
index 9f3ae42..6b2f39e 100644
--- a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Input.java
+++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Input.java
@@ -49,6 +49,12 @@
 	/** The required field. If not set, the default is true */
 	private boolean required = true;
 	
+	/** Details the inputs template */
+	private String templateName;
+	private String templateUUID;
+	private String templateInvariantUUID;
+	private String templateCustomizationUUID;
+	
 	/**
 	 * Instantiates a new input.
 	 */
@@ -165,4 +171,36 @@
 	public String toString() {
 		return "type=" + type + ",description=" + description + ",default=" + _default;
 	}
+
+    public String getTemplateName() {
+        return templateName;
+    }
+
+    public void setTemplateName(String templateName) {
+        this.templateName = templateName;
+    }
+
+    public String getTemplateUUID() {
+        return templateUUID;
+    }
+
+    public void setTemplateUUID(String templateUUID) {
+        this.templateUUID = templateUUID;
+    }
+
+    public String getTemplateInvariantUUID() {
+        return templateInvariantUUID;
+    }
+
+    public void setTemplateInvariantUUID(String templateInvariantUUID) {
+        this.templateInvariantUUID = templateInvariantUUID;
+    }
+
+    public String getTemplateCustomizationUUID() {
+        return templateCustomizationUUID;
+    }
+
+    public void setTemplateCustomizationUUID(String templateCustomizationUUID) {
+        this.templateCustomizationUUID = templateCustomizationUUID;
+    }
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java
index f0d056a..2200b79 100644
--- a/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java
+++ b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java
@@ -8,6 +8,7 @@
 import org.onap.sdc.tosca.parser.impl.SdcToscaParserFactory;
 import org.onap.sdc.tosca.parser.impl.SdcTypes;
 import org.onap.sdc.toscaparser.api.*;
+import org.onap.sdc.toscaparser.api.elements.Metadata;
 import org.onap.sdc.toscaparser.api.parameters.Input;
 
 import java.nio.file.Path;
@@ -238,7 +239,7 @@
     private Map<String, org.onap.vid.asdc.beans.tosca.Input> inputsListToInputsMap(List<org.onap.sdc.toscaparser.api.parameters.Input> inputList) {
         Map<String, org.onap.vid.asdc.beans.tosca.Input> inputs = new HashMap<>();
         for (org.onap.sdc.toscaparser.api.parameters.Input input : inputList) {
-            inputs.put(input.getName(), convertInput(input, new org.onap.vid.asdc.beans.tosca.Input()));
+            inputs.put(input.getName(), convertInput(input, new org.onap.vid.asdc.beans.tosca.Input(), null));
         }
         return inputs;
     }
@@ -297,7 +298,7 @@
             for (Input input: inputs){
                 if(input.getName().equals(key)){
                     org.onap.vid.asdc.beans.tosca.Input localInput = new org.onap.vid.asdc.beans.tosca.Input();
-                    localInput = convertInput(input, localInput);
+                    localInput = convertInput(input, localInput, nodeTemplate);
                     String name = property.getKey();
                     commandPropertyMap.put(name, extractCommands(name, key));
                     inputMap.put(name, localInput);
@@ -312,13 +313,23 @@
         return inputKey.substring(inputKey.indexOf(":") + 1);
     }
 
-    private org.onap.vid.asdc.beans.tosca.Input convertInput(Input parserInput, org.onap.vid.asdc.beans.tosca.Input localInput){
+    private org.onap.vid.asdc.beans.tosca.Input convertInput(Input parserInput, org.onap.vid.asdc.beans.tosca.Input localInput, NodeTemplate nodeTemplate){
         localInput.setDefault(parserInput.getDefault());
         localInput.setDescription(parserInput.getDescription());
         localInput.setRequired(parserInput.isRequired());
         localInput.setType(parserInput.getType());
         localInput.setConstraints(parserInput.getConstraints());
 //        localInput.setentry_schema()
+        
+        //if inputs of inner nodeTemplate - tell its details
+        if(nodeTemplate != null) {
+            Metadata metadata = nodeTemplate.getMetaData();
+            localInput.setTemplateName(metadata.getValue("name"));
+            localInput.setTemplateUUID(metadata.getValue("UUID"));
+            localInput.setTemplateInvariantUUID(metadata.getValue("invariantUUID"));
+            localInput.setTemplateCustomizationUUID(metadata.getValue("customizationUUID"));
+        }
+        
         return localInput;
     }
 
diff --git a/vid-app-common/src/main/java/org/onap/vid/controllers/MsoController.java b/vid-app-common/src/main/java/org/onap/vid/controllers/MsoController.java
index 420ae23..bbca06e 100644
--- a/vid-app-common/src/main/java/org/onap/vid/controllers/MsoController.java
+++ b/vid-app-common/src/main/java/org/onap/vid/controllers/MsoController.java
@@ -43,6 +43,7 @@
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.LinkedHashMap;
 import java.util.List;
 
 //import java.util.UUID;
@@ -109,6 +110,27 @@
         return (new ResponseEntity<>(w.getResponse(), HttpStatus.OK));
 
     }
+    
+    /**
+     * Creates the e2e svc instance.
+     *
+     * @param request the request
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "/mso_create_e2e_svc_instance", method = RequestMethod.POST)
+    public ResponseEntity<String> createE2eSvcInstance(HttpServletRequest request, @RequestBody LinkedHashMap<String, Object> mso_request) throws Exception {
+        String methodName = "createE2eSvcInstance";
+
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        // always return OK, the MSO status code is embedded in the body
+
+        MsoResponseWrapper w = msoBusinessLogic.createE2eSvcInstance(mso_request.get("requestDetails"));
+
+        return (new ResponseEntity<>(w.getResponse(), HttpStatus.OK));
+
+    }
 
     /**
      * Creates the vnf.
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java
index 8db7c3c..f38a7fc 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java
@@ -16,6 +16,8 @@
     // this function should get params from tosca and send them to instance at mso, then return success response.
     MsoResponseWrapper createSvcInstance(RequestDetails msoRequest) throws Exception;
 
+    MsoResponseWrapper createE2eSvcInstance(Object msoRequest) throws Exception;
+    
     MsoResponseWrapper createVnf(RequestDetails requestDetails, String serviceInstanceId) throws Exception;
 
     MsoResponseWrapper createNwInstance(RequestDetails requestDetails, String serviceInstanceId) throws Exception;
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java
index 95b175a..f15c7e5 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java
@@ -82,6 +82,21 @@
         return msoClientInterface.createSvcInstance(msoRequest, endpoint);
     }
 
+    @Override
+    public MsoResponseWrapper createE2eSvcInstance(Object msoRequest) throws Exception {
+        String methodName = "createE2eSvcInstance ";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        String endpoint;
+        try {
+            endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_E2E_SVC_INSTANCE);
+        } catch (Exception exception) {
+            throw exception;
+        }
+
+        return msoClientInterface.createE2eSvcInstance(msoRequest, endpoint);
+    }
+    
     void validateLineOfBusiness(RequestDetails requestDetails) {
 
         Object value = requestDetails.getAdditionalProperties();
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java
index 2d09630..a847756 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java
@@ -17,6 +17,9 @@
      * @throws Exception
      */
     MsoResponseWrapper createSvcInstance(RequestDetails requestDetails, String endpoint) throws Exception;
+    
+    //For VoLTE E2E services
+    MsoResponseWrapper createE2eSvcInstance(Object requestDetails, String endpoint) throws Exception;
 
     /**
      * will create a virtual network function using MSO service.
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java
index 584e858..f6b3f94 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java
@@ -70,6 +70,9 @@
 	public static final String MSO_PASSWORD = "mso.password.x";
 	
 	/** The Constant MSO_REST_API_SVC_INSTANCE. */
+    public static final String MSO_REST_API_E2E_SVC_INSTANCE = "mso.restapi.svc.e2einstance"; // /e2eServiceInstances/v3
+	
+	/** The Constant MSO_REST_API_SVC_INSTANCE. */
 	public static final String MSO_REST_API_SVC_INSTANCE = "mso.restapi.svc.instance"; // /serviceInstances/v2
 	
 	/** The Constant MSO_REST_API_VNF_INSTANCE. */
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java
index 20f22af..c3deec3 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java
@@ -33,6 +33,14 @@
 
         return createInstance(requestDetails, endpoint);
     }
+    
+    @Override
+    public MsoResponseWrapper createE2eSvcInstance(Object requestDetails, String endpoint) throws Exception {
+        String methodName = "createE2eSvcInstance ";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        return createInstance(requestDetails, endpoint);
+    }
 
     @Override
     public MsoResponseWrapper createVnf(RequestDetails requestDetails, String endpoint) throws Exception {
@@ -126,7 +134,7 @@
     }
 
 
-    public MsoResponseWrapper createInstance(RequestDetails request, String path) throws Exception {
+    public MsoResponseWrapper createInstance(Object request, String path) throws Exception {
         String methodName = "createInstance";
         logger.debug(dateFormat.format(new Date()) + "<== " + methodName + " start");
 
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js b/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js
index a9278c3..b08b2b1 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js
@@ -25,7 +25,8 @@
 	.constant("COMPONENT", (function() {
     return {
     A_LA_CARTE : "a la carte",
-    CLOUD_REGION_ID : "cloudRegionID",
+	CLOUD_OWNER : "cloudOwner",
+	CLOUD_REGION_ID : "cloudRegionID",
     COMPONENT_STATUS : "ComponentStatus",
     CREATE_COMPONENT : "createComponent",
     DELETE_RESUME_COMPONENT : "deleteResumeComponent",
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js
index 967a390..cbb9357 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js
@@ -120,7 +120,15 @@
 					
 					var serviceModel = getServiceResponse.data;
 					DataService.setServiceName(serviceModel.service.name);
-					
+
+					//VOLTE services need input list generated and macro style
+					DataService.setE2EService(false);
+					if(serviceModel.service.category === 'E2E Service') {
+						DataService.setE2EService(true);
+						DataService.setHideServiceFields(false);
+						VIDCONFIGURATION.MACRO_SERVICES.push(serviceModel.service.invariantUuid);
+					}
+
 					DataService.setModelInfo(COMPONENT.SERVICE, {
 						"modelInvariantId": serviceModel.service.invariantUuid,
 						"modelVersion": serviceModel.service.version,
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
index 53a941b..4b1d771 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
@@ -378,6 +378,7 @@
 
                 for (var i = 0; i < aaiLcpCloudRegionTenants.length; i++) {
                     lcpCloudRegionTenants.push({
+                        "cloudOwner": aaiLcpCloudRegionTenants[i][COMPONENT.CLOUD_OWNER],
                         "cloudRegionId": aaiLcpCloudRegionTenants[i][COMPONENT.CLOUD_REGION_ID],
                         "tenantName": aaiLcpCloudRegionTenants[i][COMPONENT.TENANT_NAME],
                         "tenantId": aaiLcpCloudRegionTenants[i][COMPONENT.TENANT_ID],
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js
index 56ec715..0e7dbe4 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js
@@ -199,8 +199,8 @@
     var getUserProvidedList = function() {
         var parameterList = [];
         var isUserProvidedNaming = false;
-        if ( (DataService.getModelInfo(_this.componentId).serviceEcompNaming != null)
-            && (DataService.getModelInfo(_this.componentId).serviceEcompNaming === "false") ) {
+        if ( ((DataService.getModelInfo(_this.componentId).serviceEcompNaming != null)
+            && (DataService.getModelInfo(_this.componentId).serviceEcompNaming === "false")) || DataService.getE2EService() ) {
             isUserProvidedNaming = true;
         }
 
@@ -228,8 +228,9 @@
                         FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN,
                         FIELD.PARAMETER.TENANT_DISABLED
                     ]);
-                    parameterList = parameterList.concat([ getAicZonesParameter() ]);
-
+                    if(!DataService.getE2EService()) {
+                        parameterList = parameterList.concat([getAicZonesParameter()]);
+                    }
 
                 }else{
                     parameterList = parameterList.concat([ getServiceId(),
@@ -239,8 +240,11 @@
                 }
             }
 
-            parameterList = parameterList.concat([ getProjectParameter() ]);
-            parameterList = parameterList.concat([ getOwningEntityParameter() ]);
+            if(!DataService.getE2EService()) {
+                parameterList = parameterList.concat([getProjectParameter()]);
+                parameterList = parameterList.concat([getOwningEntityParameter()]);
+            }
+
             //if service model has a pnf, add a PNF ID parameter
             if (DataService.getPnf()) {
                 parameterList = parameterList.concat([ FIELD.PARAMETER.PNF_ID ]);
@@ -516,7 +520,10 @@
                 return "mso_create_nw_instance/"
                     + DataService.getServiceInstanceId();
             case COMPONENT.SERVICE:
-                return "mso_create_svc_instance";
+                if(DataService.getE2EService() === true)
+                    return "mso_create_e2e_svc_instance";
+                else
+                    return "mso_create_svc_instance";
             case COMPONENT.VNF:
                 return "mso_create_vnf_instance/"
                     + DataService.getServiceInstanceId();
@@ -531,11 +538,98 @@
         }
     };
 
+    var getMsoE2ERequest = function(parameterList) {
+        var modelInfo = DataService.getModelInfo(_this.componentId);
+
+        //region id
+        var lcpRegion = getValueFromList(FIELD.ID.LCP_REGION, parameterList);
+        if (lcpRegion === FIELD.KEY.LCP_REGION_TEXT) {
+            lcpRegion = getValueFromList(FIELD.ID.LCP_REGION_TEXT,
+                parameterList);
+        }
+        var cloudOwner = _.find(DataService.getCloudRegionTenantList(), function(region){
+            return region.cloudRegionId === lcpRegion;
+        }).cloudOwner;
+
+        var params = [];
+        var displayInputs = modelInfo.displayInputs;
+        var groupBy = _.groupBy(displayInputs, "templateUUID");
+
+        _.forEach(groupBy, function(nodeTemplateInputs, nodeTemplateUUID) {
+            var reqParas = {};
+            var vfLocations = [];
+
+            nodeTemplateInputs.forEach(function(parameter){
+                if(parameter.type === 'vf_location') {
+                    var loc = {
+                        vnfProfileId: parameter.displayName,
+                        locationConstraints : {
+                            vimId: cloudOwner + '_' + lcpRegion
+                        }
+                    };
+                    vfLocations.push(loc);
+                } else if(parameter.type === 'sdn_controller') {
+                    if(parameter.value === undefined || parameter.value === null) {
+                        reqParas[parameter.name] = '';
+                    } else {
+                        reqParas[parameter.name] = parameter.value.value;
+                    }
+                } else {
+                    var name;
+                    _.forEach(displayInputs, function(item, key){
+                        if(item === parameter) {
+                            name = key;
+                        }
+                    });
+                    var value = _.find(parameterList, function(item){
+                        return item.id === name;
+                    }).value;
+                    reqParas[parameter.displayName] = value;
+                }
+            });
+
+            params.push({
+                resourceName: nodeTemplateInputs[0].templateName,
+                resourceInvariantUuid: nodeTemplateInputs[0].templateInvariantUUID,
+                resourceUuid: nodeTemplateInputs[0].templateUUID,
+                resourceCustomizationUuid: nodeTemplateInputs[0].templateCustomizationUUID,
+                parameters: {
+                    locationConstraints: vfLocations,
+                    //TODO resources: [],
+                    requestInputs: reqParas
+                }
+            });
+        });
+
+        var requestBody = {
+            service: {
+                name: getValueFromList(FIELD.ID.INSTANCE_NAME, parameterList),
+                description: modelInfo["description"],
+                serviceInvariantUuid: modelInfo["modelInvariantId"],
+                serviceUuid: modelInfo["modelNameVersionId"],
+                globalSubscriberId: DataService.getGlobalCustomerId(),
+                serviceType: getValueFromList(FIELD.ID.SERVICE_TYPE, parameterList) || modelInfo["serviceTypeName"],
+                parameters: {
+                    locationConstraints: [],
+                    resources: params,
+                    requestInputs: {} //TODO
+                }
+            }
+        };
+
+        return requestBody;
+    };
+
     var getMsoRequestDetails = function(parameterList) {
         console.log("getMsoRequestDetails invoked, parameterList="); console.log(JSON.stringify(parameterList,null,4));
         //console.log("getMsoRequestDetails invoked, DataService.getArbitraryParameters()=");
         //console.log(JSON.stringify(DataService.getArbitraryParameters(),null,4));
 
+        //VoLTE logic goes here
+        if(DataService.getE2EService() === true) {
+            return getMsoE2ERequest(parameterList);
+        }
+
         var modelInfo = DataService.getModelInfo(_this.componentId);
         var requestorloggedInId = DataService.getLoggedInUserId();
         var owningEntityId = getValueFromList(FIELD.ID.OWNING_ENTITY, parameterList);
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js
index 716854e..77523e9 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js
@@ -300,6 +300,12 @@
 		getArbitraryParameters : function () {
 			return _this.arbitraryParameters;
 		},
+		setE2EService:function(b){
+			_this.e2eService=b;
+		},
+		getE2EService:function(){
+			return _this.e2eService;
+		},
 		setHideServiceFields:function(b){
 			_this.hideServiceFields=b;
 		},
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/utilityService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/utilityService.js
index 8577e99..942bd79 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/utilityService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/utilityService.js
@@ -156,6 +156,11 @@
 										serviceModel.service.inputs[cmdObj.inputName] != null ) {
 									networkModelDisplayInputs[cmdObj.inputName] = (serviceModel.service.inputs[cmdObj.inputName]);
 									networkModelDisplayInputs[cmdObj.inputName][PARAMETER.DISPLAY_NAME] = cmdObj.displayName;
+									//E2E services need this
+									["templateInvariantUUID", "templateCustomizationUUID", "templateUUID", "templateName"].forEach(function(templateProp) {
+										networkModelDisplayInputs[cmdObj.inputName][templateProp] = networkModel.inputs[cmdObj.displayName][templateProp];
+									});
+
 								}
 						}
 								
@@ -237,6 +242,10 @@
 										serviceModel.service.inputs[cmdObj.inputName] != null ) {
 									vnfModelDisplayInputs[cmdObj.inputName] = (serviceModel.service.inputs[cmdObj.inputName]);
 									vnfModelDisplayInputs[cmdObj.inputName][PARAMETER.DISPLAY_NAME] = cmdObj.displayName;
+									//E2E services need this
+									["templateInvariantUUID", "templateCustomizationUUID", "templateUUID", "templateName"].forEach(function(templateProp) {
+										networkModelDisplayInputs[cmdObj.inputName][templateProp] = vnfModel.inputs[cmdObj.displayName][templateProp];
+									});
 								}
 						}
 								
diff --git a/vid-app-common/src/test/java/org/onap/vid/bl/AaiServiceTest.java b/vid-app-common/src/test/java/org/onap/vid/bl/AaiServiceTest.java
index b6990eb..e19bcbc 100644
--- a/vid-app-common/src/test/java/org/onap/vid/bl/AaiServiceTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/bl/AaiServiceTest.java
@@ -129,7 +129,7 @@
     @Test(dataProvider = "getTenantsData")
     public void testGetTenants(String userGlobalCustomerId, String userServiceType, String userTenantName, String serviceGlobalCustomerId,
                                String serviceServiceType, String serviceTenantName, String serviceTenantId, boolean expectedIsPermitted) {
-        GetTenantsResponse[] getTenantsResponses = new GetTenantsResponse[] {new GetTenantsResponse(null, serviceTenantName, serviceTenantId, false)};
+        GetTenantsResponse[] getTenantsResponses = new GetTenantsResponse[] {new GetTenantsResponse(null, null, serviceTenantName, serviceTenantId, false)};
         AaiResponse<GetTenantsResponse[]> aaiResponse = new AaiResponse<>(getTenantsResponses, null, 200);
         Mockito.doReturn(aaiResponse).when(aaiClientInterface).getTenants(serviceGlobalCustomerId, serviceServiceType);
         Role role = new Role(null, userGlobalCustomerId, userServiceType, userTenantName);
