---
schema_version: "1"
id: c13035e9ba90c627c558cd2ef32a6e5fad1b5a63ab2d51583ec1a5b8650e91c8
title: autoResponseAPI
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/messaging-web/references/autoResponseAPI.md
canonical_url: https://developer.salesforce.com/docs/service/messaging-web/references/m4w-reference/autoResponseAPI.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 25ecd54a2332cdd5cb1c61a261d288189827c09d62d68b9b114ead708565ae77
products:
  - Enhanced Web Chat
  - Service Cloud Developer Content
---
# autoResponseAPI

This object contains all the APIs associated with the auto-response experience. For a guide, see [Auto-Response API](/docs/service/messaging-web/guide/auto-response.html).

## `setAutoResponseParameters({parameters})`

Adds values to the list of parameters. These parameters are passed to the auto-response component in Salesforce. This method must be called after the [`onEmbeddedMessagingReady`](/docs/service/messaging-web/guide/event-listeners.html) event is dispatched.

### Parameters

`{parameters}`: Required. A JSON object containing a list of key-value pairs of the parameter names and their values.

### Example

```javascript
embeddedservice_bootstrap.autoResponseAPI.setAutoResponseParameters({
  cartValue: "123",
  cartDescription: "My cart description",
});
```

## `removeAutoResponseParameters({parameters})`

Removes parameters from the list of parameters. This method must be called after the [`onEmbeddedMessagingReady`](/docs/service/messaging-web/guide/event-listeners.html) event is dispatched.

### Parameters

`{parameters}`: Required. An array of strings. Each string is a parameter to be removed from the auto-response data.

### Example

```javascript
embeddedservice_bootstrap.autoResponseAPI.removeAutoResponseParameters(["cartDescription"]);
```
