# Scheduling

Schedules allow you to automate [distributions](https://docs.gradient.works/kb/bookbuilder/transfer-accounts/distributions) or [retrievals](https://docs.gradient.works/kb/bookbuilder/transfer-accounts/retrievals) to run at a particular time, either once or on a recurring basis.

{% hint style="info" %}
Most sales organizations that adopt [dynamic books](https://www.gradient.works/books) distribute and retrieve accounts on at least a weekly basis. We recommend scheduling those routine transfers.
{% endhint %}

### Scheduling a transfer

When you create a new distribution or retrieval and select "Next: Schedule" you'll be prompted to choose whether or not to schedule it.

<figure><img src="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-5d33434a7982de264f08127251b7dc24b736f9ef%2Fbb--transfer-accounts--scheduling-dialog-start.png?alt=media" alt=""><figcaption><p>Scheduling dialog</p></figcaption></figure>

The default option for "Distribution Schedule" is "Run Immediately". Leaving this option selected will skip all scheduling.

To enable scheduling, Change "Distribution Schedule" to "Schedule for Later".

#### Run once at a specific time

You can choose to run the transfer one time in the future, by entering the "Start Date and Time" want it to run and leaving "Automate Recurring" turned off.

<figure><img src="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-bbd781bb5f28966d57b8a19438702cb2dccff5fc%2Fbb--transfer-accounts--scheduling-dialog-once.png?alt=media" alt=""><figcaption><p>Schedule dialog for specific time</p></figcaption></figure>

Use this to set up a distribution or retrieval to run at the most opportune time. For example, you can prepare a distribution on Friday afternoon and have it run late Sunday night so that everything's in place when your reps login on Monday.

{% hint style="info" %}
The time component of the "Start Date and Time" uses the default timezone of your Salesforce organization.
{% endhint %}

#### Run repeatedly on a set schedule

Set the "Start Date and Time" and turn on "Automate Recurring" to set a schedule for the transfer. Choose how frequently you want to run the distribution or retrieval.

<figure><img src="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-1066e6611501f80d522944875aa52823398ad0d1%2Fbb--transfer-accounts--scheduling-dialog-recurring.png?alt=media" alt=""><figcaption><p>Schedule a recurring distribution to run once a week at 6am starting on Feb 6, 2023</p></figcaption></figure>

The first distribution or retrieval will run at the specified "Start Date and Time" and then will repeat at the same time at the specified interval. In the above example, the distribution will begin at 6am in your Salesforce org's default timezone on Monday February 6th. It will then repeat every week, running on Monday at 6am.

Once scheduling is complete, click "Next: Preview" and continue.

{% hint style="info" %}
Previews are not currently available for scheduled distributions or retrievals.
{% endhint %}

On the following screen, click "Continue and Schedule Distribution".

### Managing scheduled transfers

Scheduled distributions or retrievals are available under "Upcoming" in the left nav or on the Overview.

<figure><img src="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-7ccc68a929bdc175a51a11c45bc28edcb617d218%2Fbb--transfer-accounts--scheduling-upcoming-listing.png?alt=media" alt=""><figcaption><p>Upcoming distributions listing</p></figcaption></figure>

The listing shows each scheduled distribution or retrieval. There are 4 statuses:

* Scheduled - the transfer is scheduled to run once at a specific time
* Recurring - the transfer is scheduled to run repeatedly
* Recurring (Paused) - the transfer is configured to run repeatedly but is currently paused
* Processing - the distribution or retrieval is currently processing

#### Editing a scheduled transfer

You can edit the configuration of scheduled distributions and retrievals up until they actually run. Click the name of the transfer and edit as you normally would.

<figure><img src="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-43eb0a7624faff7503d0d33cc6318ddcafa1edc4%2Fbb--transfer-accounts--scheduling-edit-scheduled.png?alt=media" alt=""><figcaption><p>Edit scheduled distribution screen</p></figcaption></figure>

Click "Save and Exit" to save your changes.

#### Changing the schedule

You can change the schedule of one-time distribution or retrieval at any point until it actually runs. This includes the ability to change a one-time transfer to recurring. For recurring transfers, you can change the schedule at any time unless they're currently processing.

There are two ways to change the schedule:

* When editing a scheduled transfer, you can click "Edit Schedule" in the top left to bring up the schedule dialog
* From the "Upcoming" listing, click <img src="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-1417445ab93f3cdeb4ab6ffc953ed18e4fbd4032%2Ficons--action-button.png?alt=media" alt="" data-size="line"> and select "Edit Schedule"

#### Canceling a one-time transfer

You can cancel a one-time distribution or retrieval at any point until it actually runs.

There are two ways to cancel a one-time transfer:

* When editing a scheduled transfer, you can click "Cancel Distribution" or "Cancel Retrieval"
* From the "Upcoming" listing, click <img src="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-1417445ab93f3cdeb4ab6ffc953ed18e4fbd4032%2Ficons--action-button.png?alt=media" alt="" data-size="line"> and select "Cancel Distribution" or "Cancel Retrieval"

#### Pausing or canceling a recurring transfer

You can pause or cancel recurring retrievals or distributions. Paused transfers remain in the "Upcoming" list but will not run until restarted. Canceled transfers are removed from the "Upcoming" list.

There are two ways to pause or cancel a recurring transfer:

* When editing a scheduled transfer, you can click "Pause/Cancel Distribution" or "Pause/Cancel Retrieval"
* From the "Upcoming" listing, click <img src="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-1417445ab93f3cdeb4ab6ffc953ed18e4fbd4032%2Ficons--action-button.png?alt=media" alt="" data-size="line"> and select "Pause/Cancel Distribution" or "Pause/Cancel Retrieval"

<figure><img src="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-cc25d68ea0c8914494acc8f940b4862537202b0a%2Fbb--transfer-accounts--scheduling-pause-cancel-dialog.png?alt=media" alt=""><figcaption><p>Pause/Cancel dialog</p></figcaption></figure>

Select whether you would like to pause or cancel. You can optionally save the distribution or retrieval as a template for later use.

### Scheduling use cases

Scheduling allows you to automate routine account distributions or retrievals. Here are some scheduling examples:

* Retrieve accounts with a grace period - Suppose you want to do a one-time retrieval of unworked accounts from your reps but give them a chance to make sure they're engaging accounts they want to keep. You can set up the retrieval on Monday and schedule it to run at the end of day Friday, giving your reps plenty of time to catch up.
* Distribute accounts after an event - Suppose your field marketing team is going to a big conference and will be tagging a list of accounts who visit the booth for distribution. Configure a custom distribution for tagged accounts now and set it to run after the conference.
* Automate weekly book balancing - You want reps to get their books topped off with a fresh list of accounts to work every Monday morning while moving unengaged accounts out of reps' names. Set up a standard distribution and retrieval and set them to run early every Monday.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gradient.works/kb/bookbuilder/transfer-accounts/scheduling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
