<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0508</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2024-03-19</periodOfReport>

    <issuer>
        <issuerCik>0000723188</issuerCik>
        <issuerName>COMMUNITY BANK SYSTEM, INC.</issuerName>
        <issuerTradingSymbol>CBU</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001794595</rptOwnerCik>
            <rptOwnerName>MacPherson Kerrie D.</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>5790 WIDEWATERS PARKWAY</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>DEWITT</rptOwnerCity>
            <rptOwnerState>NY</rptOwnerState>
            <rptOwnerZipCode>13214</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>0</aff10b5One>

    <derivativeTable>
        <derivativeTransaction>
            <securityTitle>
                <value>Phantom Stock (Deferred Stock Units)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F1"/>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2024-03-19</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>1395</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <footnoteId id="F1"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F1"/>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>1395</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>4831.3349</value>
                    <footnoteId id="F2"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">The reporting person has received deferred stock units under the Community Bank System, Inc. 2022 Long-Term Incentive Plan, as amended (the &quot;Plan&quot;). Each phantom stock unit which represents a deferred stock unit is the economic equivalent of one share of Community Bank System, Inc. common stock and will be settled in common stock at a predetermined date.</footnote>
        <footnote id="F2">Includes 29.338, 33.0416, 35.5928, and 30.5001 units of phantom stock acquired on April 10, 2023, July 10, 2023, October 10, 2023, and January 10, 2024, respectively, as dividend equivalents under the Plan.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Danielle M. Cima, pursuant to a Confirming Statement executed by Kerrie D. MacPherson</signatureName>
        <signatureDate>2024-03-20</signatureDate>
    </ownerSignature>
</ownershipDocument>
