# Sequencing

`<Sequencing/>` elements exist in the Expere response file to give all esignature fields unique field ID's when using eSignature WKES `<eSignatureWKES`=true"> and merged PDF's ("`<PdfMerge`=true">). The sequencing itself appears in the `<FieldName>` element with incremental numbers using an underscore.

`<Sequencing/>` elements are added in the following field types:

- Signature
- Date
- Initials
- FillableText
- FillableCheckboxes

## Sequencing behavior when using the `<eSignatureWKES/>` and `<PdfMerge/>` elements

The sequencing behavior when using some combination of the `<eSignatureWKES/>` and `<MergePDF/>` elements consists of the following:

- If `<eSignatureWKES/>` and/or `<PdfMerge/>` is set to "true:"
  - All fillable fields and Signature Points are sequenced and grouped by email address.
  - Signature, Date, Initials, FillableCheckboxes and FillableText field types are sequenced in the `<FieldName/>` with incremental numbers using an underscore.
  - The format of this field type will adhere to the following pattern:

        <r:SignaturePoint>
           <r:Type>Initials</r:Type>
           <r:Sequencing>1</r:Sequencing>
           <r:FieldName>INI_Borrower_null_homer_false_1_SigField_1</r:FieldName>
        </r:SignaturePoint>

In the Expere response file, the `<FillableFieldSet/>` and `<SignaturePointSet/>` elements reside under the following elements in the response, depending on the `<PdfMerge/>` element value:

- `<Packet/>` - if `<MergePDF/>` is set to "true."
- `<DocInstance/>` - if `<MergePDF/>` is set to "false."

## WKES email address sequencing and naming behavior

The below example presents two WKES naming scenarios depending on if an email address is present when using eSignatures.

- When an email is present: `WKES_<Type>_<email>_<Sequence number>`;
- When an email is not present: `WKES_<Type>__<Sequence number>` with two underscores between `<Type>` and`<Sequence>`