How can I enable recurring revenue schedules for Oracle Sales?

Salespeople can use recurring revenue schedules to account for revenue against opportunity products or product groups that are part of subscription business models. If you're using the Redwood fragments version of Sales, then you can enable recurring revenue schedules using these instructions.

Note:

This topic is applicable only if you're using the fragments version of Sales in the Redwood UX.

To enable recurring revenue schedules, you must complete these steps in Oracle Visual Builder Studio:

Steps to Enable Recurring Revenue Schedules

Setup Step Context

1. Create a new event listener and action chain.

When you create an event listener, an action chain is automatically created, as well.

Update the action chain to turn on the ability to create recurring revenue schedules.

2. Manually update the action chain name, if necessary.

This step is required only if the action chain name doesn't look like the value documented below.

3. If your extension is using a cloned layout for the Edit Layout rule set, then modify the path for the RevenueRecurrenceLayout section.

This step is required only for cloned layouts.

1. Create Event Listener and Action Chain

Add a new event listener for the opportunitiesChildRevenueOnEditEvent event.

  1. In Visual Builder Studio, click the Layouts side tab.

  2. On the Layouts side tab, click the CX Sales > Opportunities > ChildRevenue node.

    This screenshot illustrates the node to select on the Layouts tab.

  3. On the ChildRevenue tab, click the Event Listeners subtab.

  4. Click + Event Listener.

  5. In the Create Event Listener dialog, click opportunitiesChildRevenueOnEditEvent.

  6. Click Next.

  7. Click the + icon next to Action Chains.

  8. In the New Action Chain field, enter opportunitiesChildRevenueOnEditEventChangeListener.

  9. Click Finish.

Next, update the action chain for the opportunitiesChildRevenueOnEditEventChangeListener event listener.

  1. On the refreshed Event Listeners page, next to the new opportunitiesChildRevenueOnEditEventChangeListener event listener, click Go to Action Chain.

    This screenshot illustrates the Go to Action Chain hyperlink.

  2. On the Actions subtab, right click the Return previous node and then click Go to Code.

    This screenshot illustrates how to view the action chain code.

  3. In the code, the row for return previous; is highlighted.

    This screenshot illustrates the action chain code.

    Place your cursor at the end of the previous row and add this code snippet:

     if (event.cartItem && Object.keys(event.cartItem).length === 0 && event?.row.SplitTypeCode != "PARENTSPLIT") {
            previous = {};
            previous.enableRecurrence = true;
          }

    This screenshot illustrates the action chain code with the enableRecurrence flag set to true.

    The previous code confirms the event that's called when the user edits an opportunity product, and also confirms that the revenue line being edited is not already a parent split line. If those things are true, then the ability to create recurring revenue schedules is set to true.

2. Update the Action Chain Name

In some instances, you might need to update the action chain name. Here's how:

  1. In Visual Builder Studio, click the Git side tab.

  2. Navigate Untracked > extension1 / sources > dynamicLayouts > oracle_cx_salesUI > opportunities / child / ChildRevenue > chains > layout-x.json.

    This screenshot illustrates the layout-x.json node.

  3. In the layout-x.json file, scroll down to the eventListeners section and confirm that the action chain name looks as follows:

    "chain": "opportunitiesChildRevenueOnEditEventChangeListener"

    This screenshot illustrates the action chain name.

3. Modify the Path for the RevenueRecurrenceLayout Section (for Cloned Layouts Only)

If you're working with a cloned layout for the Edit Layout rule set, then review the JSON to confirm that the path for the recurring revenue schedule section is correct.

  1. Still on the ChildRevenue tab, click the JSON subtab.

  2. Scroll down to the displayProperties in the EditLayout section.

  3. In the displayProperties section, review the RevenueRecurrenceLayout line.

    This screenshot illustrates the RevenueRecurrenceLayout section.

  4. Add a "/" just before RevenueRecurrenceLayout so that the code looks like this:

    "{{ $variables.isShowRevenueRecurrenceFields ? {\"RevenueRecurrence\": \"/RevenueRecurrenceLayout\"} : null }}"

Test the Flow

You can now test the flow to confirm that users can configure recurring revenue schedules for an opportunity.

  1. In Visual Builder Studio, click the App UIs side tab.

  2. Navigate CX Sales > cx-sales > opportunities > opportunities-list.

  3. From the opportunities-list page, click the Preview button to see your changes in your runtime test environment.

    This is a screenshot of the Preview button in Visual Builder Studio.
  4. The resulting preview link will be:

    https://<servername>/fscmUI/redwood/cx-sales/opportunities/opportunities-list

  5. Change the preview link as follows:

    https://<servername>/fscmUI/redwood/cx-sales/application/container/opportunities/opportunities-list

    Note:

    You must add /application/container to the preview link.

  6. On the Opportunities list page, click any opportunity to edit.

  7. On the Opportunity detail page, click the View All Products link that displays on the Products panel.

  8. Click a product that you want to configure a recurring revenue schedule for, and then from the Actions menu, click Edit.

    This screenshot illustrates how to start configuring a recurring revenue schedule for an opportunity product.

  9. In the Edit Opportunity Revenue drawer, click the Add Schedule button.

    This screenshot illustrates the new Add Schedule button.

  10. In the Schedule region that displays, you can now configure a recurring revenue schedule.

    This screenshot illustrates the new Schedule region.

  11. Add the schedule details.

    For example, in the End After < > Transactions field, enter a number such as 4.

    This screenshot illustrates how to enter the number of transactions for the schedule.

  12. Click Generate Schedule.

    Note the schedule is created.

    This screenshot illustrates a generated schedule.

  13. Save your work by using the Push Git command.

    Navigate to the Git tab, review your changes, and do a Git push (which does both a commit and a push to the Git repository).

    This screenshot illustrates how to use the Push Git command.