---
schema_version: "1"
id: 0477c9dbd92696239815c8160e5412175c3da433531cfd21310f005b92fe0534
title: Revenue | Retrieve Next Due Payment
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/agent_ref_revenue_get_next_due_payment.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.agent_ref_revenue_get_next_due_payment.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f57657d2168064a54b796a648c007f7d1d8a48ad18792bc753688b05def8cf44
description: The Retrieve Next Due Payment agent action identifies the next upcoming payment for an account by returning the earliest due date and the total amount due so that users can quickly understand what a customer needs to pay next.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Revenue | Retrieve Next Due Payment

The Retrieve Next Due Payment agent action identifies the next upcoming payment for an account by returning the earliest due date and the total amount due so that users can quickly understand what a customer needs to pay next.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions of Revenue Cloud Advanced and Revenue Cloud Billing with the Agentforce Employee Agent add-on. It also requires the Flex Credits Metering add-on and the Usage Management add-on.</td></tr></tbody></table>

 
| User Permissions Needed |   |
| --- | --- |
| To execute actions in Employee agents: | See [Manage Employee Agent Access](https://help.salesforce.com/s/articleView?id=ai.agent_manage_aea_access.htm&release=264.0.0&type=5 "Control user access to specific Agentforce Employee agents with permission sets or profiles. In Agentforce Builder, use the Agent Access page. In the legacy Agentforce Builder, use the Agent Access tab.") |
| To run flows: | Run Flows |

## Action Details

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">API Name</td>

            <td class="slds-cell-wrap" style="vertical-align:top;">RetrieveNextDuePayment</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">Reference Action Type</td>

            <td class="slds-cell-wrap" style="vertical-align:top;">Flow</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">Reference Action</td>

            <td class="slds-cell-wrap" style="vertical-align:top;">Retrieve Next Due Payment</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">Does this action execute one or more prompt templates?</td>

            <td class="slds-cell-wrap" style="vertical-align:top;">No</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">Required Setup</td>

            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p><a href="https://help.salesforce.com/s/articleView?id=ind.rev_agent_setup.htm&amp;type=5&amp;language=en_US" target="_blank">Set Up Agentforce for Revenue Cloud</a></p>
              <p style="margin-bottom:0;"><a href="https://help.salesforce.com/s/articleView?id=ind.billing_agentforce_billing_setup.htm&amp;type=5&amp;language=en_US" target="_blank">Set Up Billing Employee Assistance</a></p>
            </td>

          </tr>
        </tbody>
      </table>

Input

- Account Context – The account the user wants the details for.

Output

- Next Payment Due Date – The earliest upcoming due date.
- Amount Due – Total amount associated with that due date.
- Supporting Details – Invoice identifiers or billing items contributing to the amount.
- Is Successful – Boolean flag that indicates whether retrieval was successful.
- Error Message – String with error details if the action fails.

## Guidelines and Considerations

- The action returns a result only when outstanding amounts have due dates.
- If no payments are due, the action indicates that no upcoming payment was found.