---
schema_version: "1"
id: 9589f0aa4f5595ff8777fdef7f22da548bbc86037083d37bcf6f01be15faeb75
title: enqueueAction()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/ref-jsapi/ref-jsapi-dollara-enqueueaction.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-dollara-enqueueaction.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: c1058e08af461a32909ea6bc8ae2784963f5eaba935918bc1e4e0f485a943468
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# enqueueAction()

Queue a call to an Apex action. The framework queues up actions before sending them to the server. This mechanism is largely transparent to you when you’re writing code but it enables the framework to minimize network traffic by batching multiple actions into one request (XHR).

The batching of actions is also known as _boxcar’ing_, similar to a train that couples boxcars together.

The framework uses a stack to keep track of the actions to send to the server. When the browser finishes processing events and JavaScript on the client, the enqueued actions on the stack are sent to the server in a batch.

## Signature

`enqueueAction (Action action, Boolean background)`

## Parameters

**_action_:** Type: `Action`. The action to enqueue.

**_background_:** Type: `Boolean`. Deprecated. Do not use.

**See Also**  


-   [Queuing of Server-Side Actions](https://developer.salesforce.com/docs/platform/aura-platform/controllers-server/controllers-server-actions-queue.md)
-   [Calling a Server-Side Action](https://developer.salesforce.com/docs/platform/aura-platform/controllers-server/controllers-server-actions-call.md)

