Skip to content

feat(routing): add support to pass fallback connectors to decision engine#8615

Merged
Gnanasundari24 merged 2 commits intomainfrom
de-fallback-configs
Jul 15, 2025
Merged

feat(routing): add support to pass fallback connectors to decision engine#8615
Gnanasundari24 merged 2 commits intomainfrom
de-fallback-configs

Conversation

@jagan-jaya
Copy link
Contributor

@jagan-jaya jagan-jaya commented Jul 11, 2025

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Decision engine does not have the concept of fallback connectors, so we recently added support to handle the default connectors by allowing them to be passed in the evaluate request. As part of this PR we are making the necessary changes to pass fallback connectors to decision engine

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

On making a payment from hyperswitch, with the routing rules defined and activated already. We will be passing the fallback_output to the decision engine

Screenshot 2025-07-14 at 6 51 45 PM

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@semanticdiff-com
Copy link

semanticdiff-com bot commented Jul 11, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/core/payments/routing/utils.rs  20% smaller
  crates/router/src/core/payments/routing.rs  18% smaller

@jagan-jaya jagan-jaya marked this pull request as ready for review July 11, 2025 12:51
@jagan-jaya jagan-jaya requested a review from a team as a code owner July 11, 2025 12:51
let mut events_wrapper = events_wrapper;
let fallback_output = fallback_output
.into_iter()
.map(|c| DeRoutableConnectorChoice {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit

Suggested change
.map(|c| DeRoutableConnectorChoice {
.map(|connector_choice| DeRoutableConnectorChoice {

@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Jul 15, 2025
Merged via the queue into main with commit d9e1d88 Jul 15, 2025
23 of 27 checks passed
@Gnanasundari24 Gnanasundari24 deleted the de-fallback-configs branch July 15, 2025 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support to pass fallback_configs for PL routing in the /routing/evaulate request from hyperswitch

4 participants