Skip to content

JNY-PFM-INT-005Test and apply a customer pricing rule

Markdown

JNY-PFM-INT-005

Test and apply a customer pricing rule

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationPartially observed

KindJourneyProduct areaPlatformModuleIntegration access, customer extensions and shared workflow configurationRevision1End-to-endNone

Read atservices-platform ad3f6a65react-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Goal
Configure a fifteen percent package discount for Northeast members through a rule handler.
Screens
/console/{tenantId}/configuration/platform/extensions/console/{tenantId}/configuration/platform/extensions/points/{pointKey}/console/{tenantId}/configuration/platform/extensions/handlers/{handlerId}

Steps

#SurfaceActionCapabilityExpectedProvenance
1getExtensionPointInspect the pricing point’s contract and sample inputs.CAP-PFM-INT-016The point shows its current definition, examples and permitted rule facts.test
services-platform:modules/extensions/tests/e2e/extensions.e2e.spec.js#reads one point with its contract and examples
2createExtensionHandlerAttempt to save an incompatible rule, then save a corrected rule.CAP-PFM-INT-017Validation identifies the first rule’s problems and accepts the corrected definition.test
services-platform:modules/extensions/tests/e2e/rule-handlers.e2e.spec.js#saves a rule that fits its point’s current version
3testExtensionHandlerRun the rule for a Northeast member and for a member elsewhere.CAP-PFM-INT-017The first run returns the discount; the second returns the neutral result, and both are recorded as tests.test
services-platform:modules/extensions/tests/e2e/rule-handlers.e2e.spec.js#answers the Northeast member’s example with 15 percent of the package off, in minor units, in quote mode
4createExtensionBindingEnable a binding from the rule to the package product.CAP-PFM-INT-017The product receives an enabled customization binding.test
services-platform:modules/extensions/tests/e2e/extensions.e2e.spec.js#creates an enabled binding at a product scope
5previewExtensionResolutionPreview customization resolution for the product.CAP-PFM-INT-017The preview selects its product binding.test
services-platform:modules/extensions/tests/e2e/extensions.e2e.spec.js#answers the product binding for a scope that names its product

Alternate and Failure Paths

PathFrom stepConditionPath takenOutcomeProvenance
failure4The product already has another enabled handler at a single-answer pointReject the competing bindingKeep the existing binding as the selected customizationtest
services-platform:modules/extensions/tests/e2e/extensions.e2e.spec.js#refuses a second enabled binding at one scope of a single point as 409

Assertions

IdStatementProvenance
01Contract-incompatible rules are rejected with specific validation problems.test
services-platform:modules/extensions/tests/e2e/rule-handlers.e2e.spec.js#refuses a rule its point’s contract refuses as 400, naming each problem by its path and code
02Each handler test creates a test invocation record.test
services-platform:modules/extensions/tests/e2e/rule-handlers.e2e.spec.js#records each run as a test invocation of the handler

End-to-end policy: none: The extension console uses examples. Service acceptance covers configuration and tests, with host use requiring further proof.

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.