<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [WarehouseAPI](./bitburner.warehouseapi.md) &gt; [setSmartSupplyOption](./bitburner.warehouseapi.setsmartsupplyoption.md)

## WarehouseAPI.setSmartSupplyOption() method

Set whether smart supply uses leftovers before buying.

**Signature:**

```typescript
setSmartSupplyOption(
    divisionName: string,
    city: CityName,
    materialName: CorpMaterialName,
    option: CorpSmartSupplyOption,
  ): void;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

divisionName


</td><td>

string


</td><td>

Name of the division


</td></tr>
<tr><td>

city


</td><td>

[CityName](./bitburner.cityname.md)


</td><td>

Name of the city


</td></tr>
<tr><td>

materialName


</td><td>

[CorpMaterialName](./bitburner.corpmaterialname.md)


</td><td>

Name of the material


</td></tr>
<tr><td>

option


</td><td>

[CorpSmartSupplyOption](./bitburner.corpsmartsupplyoption.md)


</td><td>

Smart supply option. Set "leftovers" to use leftovers, "imports" to use only imported materials, and "none" to not use stored materials.


</td></tr>
</tbody></table>

**Returns:**

void

## Remarks

RAM cost: 20 GB

