# How to pass dynamic value in String Body

**URL:** https://community.gatling.io/t/how-to-pass-dynamic-value-in-string-body/4045
**Category:** Gatling (Open-Source)
**Created:** [November 15, 2017, 12:00pm UTC](https://community.gatling.io/t/how-to-pass-dynamic-value-in-string-body/4045 "2017-11-15T12:00:15Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Naveen\_Goud](https://avatars.discourse-cdn.com/v4/letter/n/22d042/32.png) [@Naveen\_Goud](https://community.gatling.io/u/Naveen_Goud)
#### Post date: [November 15, 2017, 12:00pm UTC](https://community.gatling.io/t/how-to-pass-dynamic-value-in-string-body/4045/1 "2017-11-15T12:00:15Z")

</div>

```auto
Hi I have a scenario and I need to pass one dynamic value in the Body.

```

```auto

```

```auto
**For Example I have below scenario. I need to pass ${florgType} instead of "** DfolFleetOrgType **"**

```

```auto

```

```auto

```

```auto
val storeServiceMapping = scenario("StoreServiceMappingScenario")
  .exec(http("StoreServiceMapping")
    .post("/brimpx/operation/servicemapping")
    .headers(headers_store_service_mapping)
    .body(StringBody("{\"serviceId\":\"DF-VH\",\"florgType\":\"DfolFleetOrgType\"}"))
    .check(status.is(200)))

```

```auto

```

```auto
Can any one have idea on it. The above example working without any modifications.

```

```auto

```

```auto

```

```auto
Thanks,

```

```auto
Naveen

```

---

<div class="post-metadata">

### Author: ![deeptik2](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/deeptik2/32/1597_2.png) [@deeptik2](https://community.gatling.io/u/deeptik2)
#### Post date: [November 23, 2017, 4:28pm UTC](https://community.gatling.io/t/how-to-pass-dynamic-value-in-string-body/4045/2 "2017-11-23T16:28:47Z")

</div>

Just replace DfolFleetOrgType **with**  **${florgType}**

**So your Body will look like:**

```auto
.body(StringBody("{\"serviceId\":\"DF-VH\",\"florgType\":\" **${florgType}** \"}"))

```
