diff --git a/test/csit/plans/vnfsdk-marketplace/sanity-check/enterprise2DC.csar b/test/csit/plans/vnfsdk-marketplace/sanity-check/enterprise2DC.csar
index 29e08c1..0960b20 100644
--- a/test/csit/plans/vnfsdk-marketplace/sanity-check/enterprise2DC.csar
+++ b/test/csit/plans/vnfsdk-marketplace/sanity-check/enterprise2DC.csar
Binary files differ
diff --git a/test/csit/plans/vnfsdk-refrepo/sanity-check/enterprise2DC.csar b/test/csit/plans/vnfsdk-refrepo/sanity-check/enterprise2DC.csar
index 29e08c1..0960b20 100644
--- a/test/csit/plans/vnfsdk-refrepo/sanity-check/enterprise2DC.csar
+++ b/test/csit/plans/vnfsdk-refrepo/sanity-check/enterprise2DC.csar
Binary files differ
diff --git a/test/csit/tests/vnfsdk-marketplace/provision/enterprise2DC.csar b/test/csit/tests/vnfsdk-marketplace/provision/enterprise2DC.csar
index f18d52d..0960b20 100644
--- a/test/csit/tests/vnfsdk-marketplace/provision/enterprise2DC.csar
+++ b/test/csit/tests/vnfsdk-marketplace/provision/enterprise2DC.csar
Binary files differ
diff --git a/test/mocks/sniroemulator/src/main/java/org/onap/integration/test/mocks/sniroemulator/extension/WebhookDefinition.java b/test/mocks/sniroemulator/src/main/java/org/onap/integration/test/mocks/sniroemulator/extension/WebhookDefinition.java
index 60592b3..3049715 100644
--- a/test/mocks/sniroemulator/src/main/java/org/onap/integration/test/mocks/sniroemulator/extension/WebhookDefinition.java
+++ b/test/mocks/sniroemulator/src/main/java/org/onap/integration/test/mocks/sniroemulator/extension/WebhookDefinition.java
@@ -74,6 +74,11 @@
         return body.isBinary() ? null : body.asString();
     }
 
+    public String getBase64BodyAsString() {
+        return body.asString();
+    }
+
+
     @JsonIgnore
     public byte[] getBinaryBody() {
         return body.asBytes();
diff --git a/test/mocks/sniroemulator/src/main/java/org/onap/integration/test/mocks/sniroemulator/extension/Webhooks.java b/test/mocks/sniroemulator/src/main/java/org/onap/integration/test/mocks/sniroemulator/extension/Webhooks.java
index e1e1726..78fb735 100644
--- a/test/mocks/sniroemulator/src/main/java/org/onap/integration/test/mocks/sniroemulator/extension/Webhooks.java
+++ b/test/mocks/sniroemulator/src/main/java/org/onap/integration/test/mocks/sniroemulator/extension/Webhooks.java
@@ -51,6 +51,9 @@
 
     private final ScheduledExecutorService scheduler;
     private final HttpClient httpClient;
+    private String tunnelResourceId = "NONE";
+    private String brgResourceId = "NONE";
+    private String vgResourceId = "NONE";
 
     public Webhooks() {
         scheduler = Executors.newScheduledThreadPool(10);
@@ -73,14 +76,37 @@
                 @Override
                 public void run() {
                     JsonNode node = Json.node(serveEvent.getRequest().getBodyAsString());
+               // set callback url from SO request
                     String callBackUrl = node.get("requestInfo").get("callbackUrl").asText();
                     notifier.info("!!! Call Back Url : \n" + callBackUrl);
                     definition.withUrl(callBackUrl);
+
+               // set servicesResourceIds for each resource from SO request placement Demand
+                    //System.out.println ("PI: \n" + node.textValue());
+                    JsonNode placementDemandList = node.get("placementInfo").get("demandInfo").get("placementDemand");
+                    if (placementDemandList !=null  &&  placementDemandList.isArray()){
+                        for (int i=0;i<placementDemandList.size();i++){
+                             JsonNode resourceInfo  = placementDemandList.get(i);
+                             String resourceModuleName = resourceInfo.get("resourceModuleName").asText();
+                             if (resourceModuleName.toLowerCase().matches("(.*)tunnel(.*)")){
+                                 tunnelResourceId = resourceInfo.get("serviceResourceId").asText();
+                             } else if (resourceModuleName.toLowerCase().matches("(.*)brg(.*)")) {
+                                 brgResourceId = resourceInfo.get("serviceResourceId").asText();
+                             }else {
+                                 vgResourceId = resourceInfo.get("serviceResourceId").asText();
+                             }
+                        }
+                    }
+
+                    String stubbedBodyStr = definition.getBase64BodyAsString();
+                    String newBodyStr = stubbedBodyStr.replace("TUNNEL-RESOURCE-ID-REPLACE",tunnelResourceId).replace("VGW-RESOURCE-ID-REPLACE",vgResourceId).replace("BRG-RESOURCE-ID-REPLACE",brgResourceId);
+
+                    definition.withBody(newBodyStr);
+                    notifier.info("SNIRO Async Callback response:\n" + definition.getBody());
+
                     HttpUriRequest request = buildRequest(definition);
 
                     try {
-                       // notifier.info("This is a request: \n" + Json.prettyPrint(serveEvent.getRequest().getBodyAsString()));
-
                         HttpResponse response = httpClient.execute(request);
                         notifier.info(
                             String.format("Webhook %s request to %s returned status %s\n\n%s",
@@ -90,13 +116,13 @@
                                 EntityUtils.toString(response.getEntity())
                             )                            
                         );
-                        System.out.println(String.format("Webhook %s request to %s returned status %s\n\n%s",
-                                	definition.getMethod(),
-                                	definition.getUrl(),
-                                	response.getStatusLine(),
-                                	EntityUtils.toString(response.getEntity())                              
-                        		)
-                        );
+                        //System.out.println(String.format("Webhook %s request to %s returned status %s\n\n%s",
+                        //        	definition.getMethod(),
+                        //        	definition.getUrl(),
+                        //        	response.getStatusLine(),
+                        //        	EntityUtils.toString(response.getEntity())
+                        //		)
+                        //);
                     } catch (IOException e) {
                         e.printStackTrace();
                         throwUnchecked(e);
@@ -114,6 +140,7 @@
                 definition.getUrl().toString()
         );
 
+
         for (HttpHeader header: definition.getHeaders().all()) {
             request.addHeader(header.key(), header.firstValue());
         }
