diff --git a/tcp_tests/managers/jenkins/client.py b/tcp_tests/managers/jenkins/client.py
index 79b248c..a31bbc8 100644
--- a/tcp_tests/managers/jenkins/client.py
+++ b/tcp_tests/managers/jenkins/client.py
@@ -4,6 +4,7 @@
 
 import jenkins
 import json
+import yaml
 import requests
 
 from devops.helpers import helpers
@@ -99,16 +100,47 @@
         job_params = job_params['parameterDefinitions']
         return job_params
 
-    def make_defults_params(self, name):
+    def make_defaults_params(self, name):
         job_params = self.job_params(name)
         def_params = dict(
             [(j['name'], j['defaultParameterValue']['value'])
              for j in job_params])
         return def_params
 
+    def _correct_yaml_params(self, job_name, params):
+        """
+        Params can be defined as a nested dict.
+        In that case 2nd-layer dict will be translated to YAML text and
+        added to default parameter value
+
+        :param job_name: Job name
+        :param params: dict of JenkinsJobs parameters
+        :return: nothing
+        """
+        for param_name, param_value in params.items():
+            if not isinstance(param_value, dict):
+                continue
+            default_param = self.make_defaults_params(job_name).get(param_name)
+            if default_param is None:
+                print("{param} param of {job} job doesn't exist. "
+                      "Ignoring enriching it with {value}".format(
+                        param=param_name,
+                        job=job_name,
+                        value=param_value
+                        ))
+                continue
+            yaml_param = yaml.load(default_param)
+            yaml_param.update(param_value)
+            params[param_name] = yaml.dump(yaml_param,
+                                           default_flow_style=False)
+        return params
+
     @retry()
     def run_build(self, name, params=None, timeout=600, verbose=False):
-        params = params or self.make_defults_params(name)
+        params = params or self.make_defaults_params(name)
+        params = self._correct_yaml_params(job_name=name,
+                                           params=params)
+
         num = self.__client.build_job(name, params)
         time.sleep(2)  # wait while job is started
 
