<?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>0001475265</rptOwnerCik>
            <rptOwnerName>Pecor Raymond C III</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O COMMUNITY BANK SYSTEM, INC.</rptOwnerStreet1>
            <rptOwnerStreet2>5790 WIDEWATERS PARKWAY</rptOwnerStreet2>
            <rptOwnerCity>DEWITT</rptOwnerCity>
            <rptOwnerState>NY</rptOwnerState>
            <rptOwnerZipCode>13214</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>0</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>9265.175</value>
                    <footnoteId id="F1"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>9376.523</value>
                    <footnoteId id="F2"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>By Trust</value>
                    <footnoteId id="F3"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <derivativeTable>
        <derivativeHolding>
            <securityTitle>
                <value>Phantom Stock (Deferred Compensation under Merchants plan)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F4"/>
            </conversionOrExercisePrice>
            <exerciseDate>
                <footnoteId id="F4"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F4"/>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>9424.4629</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>9424.4629</value>
                    <footnoteId id="F5"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeHolding>
        <derivativeTransaction>
            <securityTitle>
                <value>Phantom Stock (Deferred Compensation)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F6"/>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2024-03-21</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>445.846</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>45.98</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <footnoteId id="F6"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F6"/>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>445.846</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>7006.4744</value>
                    <footnoteId id="F7"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
        <derivativeTransaction>
            <securityTitle>
                <value>Phantom Stock (Deferred Stock Units)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F8"/>
            </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="F8"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F8"/>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>1395</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>5539.4766</value>
                    <footnoteId id="F9"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">Includes 82.2757 shares acquired pursuant to the Community Bank System, Inc. Dividend Reinvestment Plan.</footnote>
        <footnote id="F2">Includes 83.473 shares acquired pursuant to the Community Bank System, Inc. Dividend Reinvestment Plan.</footnote>
        <footnote id="F3">The reporting person disclaims beneficial ownership of these securities, and the inclusion of these shares in this report shall not be deemed an admission of beneficial ownership of all of the reported shares for purposes of Section 16 or any other purpose.</footnote>
        <footnote id="F4">The units of phantom stock were acquired through Merchants Bancshares, Inc.'s (&quot;Merchants&quot;) deferred compensation plan. Each unit of phantom stock is the economic equivalent of one share of Community Bank System, Inc. common stock. The units of phantom stock relating to such deferred compensation plan will be settled in Community Bank System, Inc. common stock at future dates selected by the reporting person.</footnote>
        <footnote id="F5">Includes 80.0329, 90.7899, 96.7449, and 83.8965 units of phantom stock acquired on April 10, 2023, July 10, 2023, October 10, 2023, and January 10, 2024, respectively, under the Merchants' deferred compensation plan's dividend reinvestment feature.</footnote>
        <footnote id="F6">Each unit of phantom stock is the economic equivalent of one share of Community Bank System, Inc. common stock.  The units of phantom stock relating to the Deferred Compensation Plan will be settled in Community Bank System, Inc. common stock at future dates selected by the reporting person.</footnote>
        <footnote id="F7">Includes 44.7814, 50.4408, 58.7445, and 54.7196 units of phantom stock acquired on April 10, 2023, July 10, 2023, October 10, 2023, and January 10, 2024, respectively, under the Deferred Compensation Plan's dividend reinvestment feature.</footnote>
        <footnote id="F8">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="F9">Includes 35.597, 40.0907, 43.1863, and 37.007 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 Raymond C. Pecor, III</signatureName>
        <signatureDate>2024-03-21</signatureDate>
    </ownerSignature>
</ownershipDocument>
