Create a Batch File {#batch-files-managing-batch-create}
========================================================

This topic shows how to create a transaction batch file by using a provided template or a custom template. A transaction batch file specifies a set, or *batch* , of payment transactions that you can upload to `Cybersource` for offline processing.  
Before you begin to create a batch file, be aware of these requirements, limitations, and recommendations:

* **File format** ---A batch file must be in CSV format. Use a template downloaded from the `Business Center` or a properly formatted custom template. See [Download a Batch File Template](/docs/cybs/en-us/batch/user/all/so/batch-upload/batch-files-managing/batch-files-managing-template-download.md "") and [Create a Custom Batch File Template](/docs/cybs/en-us/batch/user/all/so/batch-upload/batch-files-managing/batch-files-managing-template-create.md "").
* **File size**---A batch file must not be larger than 75 MB.
* **Number of transaction requests** ---`Cybersource` recommends that a batch file contains no more than 50,000 transaction requests.
* **Number of transaction types** ---Although a batch file can specify more than one type of transaction request, `Cybersource` recommends that you limit batch files to only one transaction request type. Doing so helps to maximize batch processing throughput.

1. Follow these steps to create a batch file using a template:

2. Begin to create your batch file by making a copy of a batch file template.

   #### ADDITIONAL INFORMATION

   * Filename format: `&lt;merchant-id&gt;.&lt;batch-id&gt;`.
   * Filename length: 255 characters or less
   * Valid characters: alphanumeric characters, non-ASCII characters, space characters, dashes, periods, and underscores only.
3. Open the new batch file using Excel or a similar application.

   #### ADDITIONAL INFORMATION

   If you use Excel, make sure to import the file. If you open the file instead, Excel does not process the CSV formatting correctly.

4. Specify up to 10 elements in the batch file header:

   #### ADDITIONAL INFORMATION

   Required fields are indicated in the template with an asterisk next to the name. Remove any asterisks from your batch file before you upload it, otherwise `Cybersource` will not process any transactions in your batch file.

5. Load your transaction data into the batch file, beginning in row 4.

   #### ADDITIONAL INFORMATION

   The information that you provide for each request in the batch file is the same information that you would provide for an individual service request. The templates specify the required and optional fields for each transaction type included in the batch file template. For descriptions of the fields in a batch file data record, see the tables in [Reference: Request Fields for Batch Files](/docs/cybs/en-us/batch/user/all/so/batch-upload/batch-ref-fields.md "").

6. You can enter the data in one of three ways:

   * Manually enter the information into the batch file.
   * Copy and paste the information into the batch file.
   * Write a script that loads the information into the batch file.

   #### ADDITIONAL INFORMATION

   Files that include non-ISO-8859-1 characters (letters with diacritical markings) are processed, but the characters appear as question marks when the transaction details are viewed in the `Business Center` and in the reports.

7. Change the value of the file header field recordCount from 0 to the number of data records (transactions) in the file.

8. Save the file.

