Integrations
Connect Tax Code "Rule-as-Code" Engine to your systems
Each integration Tax Code "Rule-as-Code" Engine supports: what flows, how fields map, and the steps to set it up.
Applies to Tax Code "Rule-as-Code" Engine as it works today. Moraph updates the platform continuously, and this page is reviewed when it changes.
On this page
How Tax Code "Rule-as-Code" Engine connects to your other systems. Every connection is confirmed during discovery and specified in the design before it is built.
Tax processing systems
Your processing systems' teams download each released package as a JSON file, and can read the release record, with its versions and package fingerprint, through the Work API. Moraph doesn't push packages into your systems.
- What flows: Out: versioned JSON rule packages by download; release records through the Work API.
- Mapping: A package holds each rule version's inputs, steps (as text and as a structured tree), result, citations, effective dates, the shared definition values it uses, form lines, approval and worked examples, identified by the release reference and SHA-256. The engine doesn't push packages into your systems; teams report results on the release or through their Consuming system record.
Steps to set it up
Agree with each consuming team how they load the JSON package
Publish a test release and download its package from the release's page
Have the team load it and check the SHA-256 against the release record
Create a Work API key with records:read if they read release records directly
Give the team the Package guide (Releases, then Package guide): it describes each part of the package and how each kind of step, exception and rate schedule is worked
Have the team check its loader against the step values carried with each worked example in the package
Legal source library
Statutory, regulatory and guidance text loaded clause by clause by your team, or through the Work API from your legal source library, with versions kept as the text changes.
- What flows: In: legal text and its publication dates.
- Mapping: Text goes in the text field of a Legal source record; rules cite clauses by label; rules and definitions approved against it are flagged, and a task is raised, when the text changes after approval.
Steps to set it up
Agree which statutory, regulatory and guidance texts are in scope
Create a Work API key with records:write
Create or update a Legal source record per source, with the text one clause per line starting with [label]
Each change to the text is kept as a numbered version
Source control and build pipelines
Consuming teams can commit the downloaded package to their source control and continuous integration tools and test it like any other dependency, then report results on the release or through the Work API.
- What flows: Out: rule packages by download. In: test results reported on the release or through the Work API.
- Mapping: Through the Work API, CSV import or the product’s exports, as agreed during implementation; the product doesn’t connect to the other system itself.
Steps to set it up
Agree with Moraph which records and fields move, and in which direction.
Create a Work API key with only the scopes needed, or prepare the CSV layout.
Test with sample records before go-live.
Requirements and work tracking
Rule changes can be linked to the work items your agency uses to manage legislative implementation.
- What flows: Out: rule status through the Work API. In: work item references entered on each rule.
- Mapping: The work item reference is stored in legislative_item on the rule; rule stage, approved_version and release records are available through the Work API.
Steps to set it up
Agree which work items represent legislative implementation
Create a Work API key with records:read and records:write scopes
Record the work item reference in legislative_item on each rule
Read rule stages and release records back on a schedule
Forms and instructions
Rule references can be shared with the teams that produce forms and instructions, so they can check that the published guidance and the logic agree.
- What flows: Out: rule summaries and citations by form line, where mapped.
- Mapping: Through the Work API, CSV import or the product’s exports, as agreed during implementation; the product doesn’t connect to the other system itself.
Steps to set it up
Agree with Moraph which records and fields move, and in which direction.
Create a Work API key with only the scopes needed, or prepare the CSV layout.
Test with sample records before go-live.
Sign-in
Staff sign in with their Moraph account, using email and password and, optionally, two-step verification. Sign-in through your own identity provider (SAML or OpenID Connect) is not offered.
- What flows: None: accounts are kept in Moraph
- Mapping: Nothing is imported: staff sign in with their Moraph account, and each person's role is set by your organization's administrators.
Steps to set it up
Invite staff in the Moraph Portal under People and access and give each person a product role
Decide whether everyone in your organization must use two-step verification; your organization administrators can require it in the Moraph Portal under People and access
Work API
Rule, version, test and approval data available to your reporting tools through the Moraph Work API.
- What flows: Out: rule status, test results, approvals and releases.
- Mapping: Rules, worked examples, interpretation questions and releases are returned as records with their field keys, stages and activity. Rules and examples created through the Work API go through the same format checks, and examples run when saved.
Steps to set it up
Open Settings, then Work API keys, as a product administrator
Create a key named after the tool with records:read and tasks:read scopes
Call https://apps.moraph.com/api/v1/workspace with the key as a bearer token to check access
Poll GET /records?updated_since= on a schedule to pick up changes
Using the Work API
Systems that aren't covered above can read and write Tax Code "Rule-as-Code" Engine records through the Sign in to read Work API. For example, to create a rule:
POST https://apps.moraph.com/api/v1/records
Authorization: Bearer mrph_…
Content-Type: application/json
Idempotency-Key: 7f3c2a90-example
{ "type": "rule", "title": "Example title", "fields": { "provision_citation": "…" } }Field keys are listed in the Sign in to read workspace reference. Request formats, paging and errors are in the Sign in to read Work API reference.
Was this page helpful?
Report a problem with this page
Need help with your own setup rather than this page? Raise a support ticket.