Data between products
The products of the suite never share a pool of variables. Each one publishes a contract of its data: what it takes and what it gives, with the type of each value. The product that uses the data holds the mapping: for each value it needs, a A level of a product, such as "Third party" or "Comprehensive": the covers it includes, with their values.Glossary → over the data of the other product. Both sides are checked, so a change in one product never breaks another without anyone being told.
The contracts
Section titled “The contracts”| Product | Its contract | Where to read it |
|---|---|---|
| Rate | A version of a Everything Rate needs to price one insurance product: its models, rate tables, lists of values and constants.Glossary →: its inputs and its results. | In Rate, Releases, Use the API; GET /api/v1/rate/tariffs/{tariffId}/releases/{releaseId}/contract; the rate.tariff.contract tool, by the key of the tariff. |
| Studio | A version of a form: its answers, the calculations it keeps, its hidden fields, its prices. | GET /api/v1/studio/forms/{key}/releases/{version}/contract; the studio.form.contract tool, for the version online when none is named. |
| Docs | A version of a template: the A value a Docs document needs, such as the client's name, an amount, a date or a list of covers. The form that fills the document asks for each one.Glossary → its documents need. | GET /api/v1/docs/templates/{templateId}/versions/{versionId}: its data. |
Each contract is a JSON Schema written with the types of the formula language: numbers, yes or no, text, calendar dates, choices with their labels, lists and records. A Studio contract gives every label in each language of the form, the currency of amounts and prices, and the tariff behind each price. A version never changes once published, and neither does its contract.
rate.tariff.contract needs only the right to calculate (Rate: calculation API: Work on): a system that calls a tariff can read what it takes before it calls. studio.form.contract needs Studio: forms: See.
The mappings
Section titled “The mappings”A Price from Rate A piece of a page that you add, move and set up: in a Studio form, a question, a text, a picture or a section; in a Docs template, a heading, a paragraph, a table or a picture.Glossary → maps answers to the inputs of a tariff (see Connections and Rate in forms). Studio checks this mapping against the contract of the version of the tariff in force today:
- an input the tariff does not take, or one it needs that the block does not send;
- a formula that gives another kind of value than the input takes, for example a date for a number;
- a choice question that offers values the tariff does not take;
- a result the tariff does not give, or does not give as a number.
They show among the problems of the form, on the block, in the builder and when the form is checked or published.
A Docs template built on a tariff holds the same kind of mapping, the simplest one: its inputs fields are what the tariff takes, and its outputs fields the results it gives, read from the tariff’s contract in the editor (see The template editor). The template remembers the tariff and the version. Docs checks it against the The version of a Docs template that documents are made from today: the newest one whose date has come.Glossary → today: a result the tariff no longer gives, or gives as another kind of value, is an error that stops the template from being published; an input it no longer takes is a warning. They show in the template’s checks and at the top of its data. An error stops the form from being published, as any other error does. When the tariff has no version in force, or your Your company as the suite knows it: its people, its records and its settings. Everything you see belongs to one organization, and nobody from another organization sees it.Glossary → does not have Rate, the mapping is not checked. The tariff is read with your own rights: if your A named set of rights, such as "Claims handlers", given to people and to API keys. People get what their roles allow, never a right on its own.Glossary → may not read the tariffs of Rate, the block shows one warning saying it was not checked, and nothing of the tariff. Someone who may read it can check the form, the form can still be published, and Rate refuses a calculation that does not fit when a response is sent.
A Create a document action of a Studio automation, or the document an The last page of a Studio form, shown once the answers are sent, such as a thank-you message.Glossary → offers, maps the answers and the A priced proposal made to a client, valid until a date.Glossary → to the data fields of a Docs template, each field filled by an answer or a formula. Studio checks it against the template’s fields as Docs describes them, read with your own rights: a field the template does not have, one it needs that stays empty, a value of another kind, choices it does not list. Fields are named by their labels. A template your role may not read gets one warning saying it was not checked (see Automations).
When Rate publishes a new version
Section titled “When Rate publishes a new version”When you publish a version of a tariff, Rate checks the Studio forms whose price uses that tariff, and the Docs templates built on it, against the new version. The Publish a release dialog lists those that would no longer fit, before you publish: their name, Online for a form people fill now, In use for a template that makes documents now, or Draft only, and what would break. If you may not open Studio forms, you see how many there are, not their names.
Publishing still goes ahead. From the day the version is in force, the price of those forms fails or stays empty until their authors change them in Studio, where the form lists the same problems.
Through the API, GET /api/v1/rate/tariffs/{tariffId}/consumers answers the same for the The copy of a tariff, a form or a template that you change. Nobody outside your team uses it: calculations, respondents and documents use what you published.Glossary →, and publishing a version answers it under compatibility.
One id from the response to its price
Section titled “One id from the response to its price”When a response is sent, Studio asks Rate for its price with the id of the response as the correlation id. Rate records the calculation with that id and answers the id of the calculation, which the response keeps with its price (calculationId, next to the results of the price). The event of the response carries the same correlation id, and so do the actions that run after it. Rate records the calculation even when the tariff does not announce its calculations, since the price names its response: a calculation always Someone who showed interest and has not been qualified yet: from a link, a form left half-way, a file, a referral.Glossary → back to the response it priced.
Any system calling Rate can do the same: send a correlationId with calculate or calculate-batch, and keep the calculationId of each answer (see Calculate through the API).
Docs does it for you when it prices a document: a request with rate asks Rate with the document’s correlation id, and the document keeps the calculation (calculation: the tariff, its version and the calculationId). A quote PDF leads back to the it shows (see Documents over the API).
Studio passes the same id on to Docs: the documents a response leads to (an automation’s, the ending’s, its answers) carry the response’s id as their correlation id, and the response event carries the language it was filled in, which the documents are made in when the template has it.