Skip to content

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.

Last reviewed 5 min readReport a problem
On this page
  1. Tax processing systems
  2. Steps to set it up
  3. Legal source library
  4. Steps to set it up
  5. Source control and build pipelines
  6. Steps to set it up
  7. Requirements and work tracking
  8. Steps to set it up
  9. Forms and instructions
  10. Steps to set it up
  11. Sign-in
  12. Steps to set it up
  13. Work API
  14. Steps to set it up
  15. Using the Work API

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

  1. Agree with each consuming team how they load the JSON package

  2. Publish a test release and download its package from the release's page

  3. Have the team load it and check the SHA-256 against the release record

  4. Create a Work API key with records:read if they read release records directly

  5. 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

  6. Have the team check its loader against the step values carried with each worked example in the package

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

  1. Agree which statutory, regulatory and guidance texts are in scope

  2. Create a Work API key with records:write

  3. Create or update a Legal source record per source, with the text one clause per line starting with [label]

  4. 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

  1. Agree with Moraph which records and fields move, and in which direction.

  2. Create a Work API key with only the scopes needed, or prepare the CSV layout.

  3. 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

  1. Agree which work items represent legislative implementation

  2. Create a Work API key with records:read and records:write scopes

  3. Record the work item reference in legislative_item on each rule

  4. 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

  1. Agree with Moraph which records and fields move, and in which direction.

  2. Create a Work API key with only the scopes needed, or prepare the CSV layout.

  3. 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

  1. Invite staff in the Moraph Portal under People and access and give each person a product role

  2. 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

  1. Open Settings, then Work API keys, as a product administrator

  2. Create a key named after the tool with records:read and tasks:read scopes

  3. Call https://apps.moraph.com/api/v1/workspace with the key as a bearer token to check access

  4. 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:

http
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
What’s the problem?
Quote the step or heading if you can. Don’t include passwords or personal records.
Only if you’d like a reply. We use it for this report and nothing else.

Need help with your own setup rather than this page? Raise a support ticket.