feat(routing): add profile config to switch between HS routing and DE routing result#8350
Merged
likhinbopanna merged 43 commits intomainfrom Jun 20, 2025
Merged
feat(routing): add profile config to switch between HS routing and DE routing result#8350likhinbopanna merged 43 commits intomainfrom
likhinbopanna merged 43 commits intomainfrom
Conversation
Changed Files
|
…ting-result-switch
…erswitch into routing-result-switch
Chethan-rao
suggested changes
Jun 16, 2025
migrations/2025-06-13-115723_add_routing_result_source_to_business_profile/up.sql
Outdated
Show resolved
Hide resolved
…erswitch into routing-result-switch
…ting-result-switch
Chethan-rao
reviewed
Jun 18, 2025
Chethan-rao
suggested changes
Jun 19, 2025
…erswitch into routing-result-switch
prajjwalkumar17
approved these changes
Jun 20, 2025
Chethan-rao
approved these changes
Jun 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces a new field,
routing_result_source, across various structs and enums in the codebase to specify the source of routing decision results. This field allows for flexibility in choosing between Hyperswitch's inbuilt routing engine and an external decision engine. The changes span multiple modules, including API models, database models, and domain models.Also, while creating the routing rule decision engine rule_id will be prefilled with the hyperswitch rule_id, so both systems will have the same id
Additional Changes
Motivation and Context
Add profile-level config to choose between Hyperswitch routing result and Decision engine routing result
How did you test it?
2. Create Routing Rule
Request
Response
3. List Routing Rules
Request
Response
Rules are getting fetched from hyperswitch

4. Change Profile config to use decision engine result directly
Request
Response
5. List Routing Rules again
This time result from the decision engine should be used to return resultsRequest
Response
Checklist
cargo +nightly fmt --allcargo clippy