# Gathering Data

Before the server can produce billing reports, data must be gathered from the statistics that have been specified. Gathering data is a three-step process:

1. The current billing data file, which was created during the last gather, becomes the new previous billing data file. The server issues a warning because this step overwrites (and thereby destroys) the previous billing data file, which was also created during the last gather.

2. The server scans the statistics in all the mailboxes. The data that is collected becomes the new current billing data file.

3. The data gathered in step 1 is subtracted from the mailbox statistics. This update zeros the statistics in all the mailboxes (unless there was mailbox activity between steps 2 and 3 to prepare them for the next billing cycle.

When you run a billing report, the value that is obtained during the gather for each statistic in a mailbox is multiplied by the billing rate that you assigned to that statistic. The server then adds the charges for all statistics with billing rates greater than zero, plus any base rate that you may have specified, to give a total charge for each mailbox.

All billing data older than the previous billing data file is available using the regular backup procedures.

## Automatic Gather

You can initiate a gather as needed (single gather), or you can configure the server to run a gather automatically (automatic gather). Automatic gathers can be run weekly, monthly, or twice-monthly.

In a busy server a gather can slow down call processing, so it is best to schedule an automatic gather or request a gather in the early morning hours, when server resources are not in use processing calls.

To configure an automatic gather:

- Perform a Manual Gather

- Configure an Automatic Gather