Build an OperaJM job from a quote request
Turn a request for windows and doors into a complete OperaJM job that an operator can open, review, and calculate. The request may arrive as a PDF, a paper form, JSON from a website, or another format. The integration extracts the request details and prepares Opera-compatible XML. OperaJM holds the configured job and calculates materials, costs, and selling prices.
Capture and review the request
- Extract the project or order reference, customer and site details, and each requested item. For a paper request or scanned PDF, use OCR or transcribe the request. For website JSON, map the supplied fields directly.
- Capture each item's product type, quantity, dimensions and units, and any requested opening direction, finish, glazing, or hardware. Keep the original item reference so an operator can trace each line back to the request.
- Resolve choices against the target installation's typology models and available configuration. Ask for clarification when a detail affects the product or price. Keep the affected items pending until the detail is resolved.
This fictional request illustrates the information to capture before producing the XML.
| Request line | Product | Quantity | Width × height | Detail to resolve |
|---|---|---|---|---|
| W01 | Fixed window | 2 | 1,200 × 1,400 mm | Confirm glazing |
| D01 | Single-leaf entrance door | 1 | 900 × 2,100 mm | Confirm handing and swing |
Prepare the job XML
Provide the job header details and the <job_components> list in the XML. Map header details such as the order reference, customer and installation site from the reviewed request. Generate the file with any suitable language, library, or transformation tool. See multilingual and formatted descriptions when the request carries descriptions in multiple languages or includes an HTML-formatted variant.
Custom fields on job headers and rows
OperaJM lets users define custom fields on the job header and on individual job rows. Use these fields to carry information beyond the standard job fields. For example, an integration can store an external project reference on the header and the originating system's line reference on each row so an export can include both values for the receiving system.
Include values for the configured custom fields when the workflow needs them. Confirm the exact XML representation for each level and verify that the selected export includes the values the receiving system expects.
Look up typologies and colors
Before building the job XML, export the typologies and colors from the same OperaJM installation that will receive the job. Use the returned values to map the products and finishes in the quote request.
| Lookup | CLI | HTTP GET | How to use the export |
|---|---|---|---|
Typologies (OPERATPG) |
operac -etpg |
/query?-etpg |
Put the selected tpg_name or configured tpg_code in the component's <cmp_name>. |
Colors (OPERACOL) |
operac -ecol |
/query?-ecol |
Put the selected col_name in the job XML at colors/color/col_name under the component. |
Job component types
Every <component> in <job_components> needs a <cmp_type> element. The value specifies how OperaJM interprets the row.
cmp_type |
Row contents |
|---|---|
window_type |
A typology for a product such as a window or door. It can reuse an existing model or start empty for later configuration. |
material |
A list of raw materials. |
cutting_list |
A cutting list. |
job_line |
A line with a name, description, and selling price. |
Base component configuration
To reuse an existing model on a <cmp_type>window_type</cmp_type> row, supply the base typology reference in <cmp_name>. OperaJM matches its value against both the name and the code of the typology in OPERATPG. If the source uses its own code, configure that value in the OperaJM typology table's code column. OperaJM compares codes without regard to case. OperaJM can also resolve customer codes for colors, options, and other attributes where it provides a code field and a matching value is configured.
Start an empty typology
When <cmp_name> on a window_type row matches neither a typology name nor a configured code, operac creates an empty typology on that job row without reporting an error. You can add structures to it afterward. When the request calls for an existing model, check the value against the target installation's -etpg export before submitting the job.
Inputs for a typology based on an existing model
| Component input | What to supply |
|---|---|
| Base typology | The OperaJM typology name or configured customer code in <cmp_name> |
| Dimensions | The requested dimensions in millimeters unless the field specifies another unit. See default measurement units. |
| Quantity | The number of items for this component |
| Colors | The requested colors using the configured identifiers |
| Options | Optional configuration choices |
| Final selling price | Optional final selling price for the component |
The supplied source uses <jobs version="2.0">, with header fields under <job> and rows under <job_components>. This sanitized template illustrates the observed structure and both ways to reference a typology. Replace the demo values with values from the target installation and verify its required fields and units before importing.
<jobs version="2.0">
<job>
<job_name>Demo window and door request</job_name>
<job_customer>
<cst_code>DEMO-CUSTOMER</cst_code>
</job_customer>
<custom_fields>
<custom>
<cus_name>DEMO_PROJECT_REFERENCE</cus_name>
<cus_value>DEMO-QUOTE-01</cus_value>
</custom>
</custom_fields>
<job_components>
<component>
<cmp_type>window_type</cmp_type>
<cmp_position>01</cmp_position>
<cmp_quantity>2</cmp_quantity>
<cmp_name>Demo Fixed Window</cmp_name>
<cmp_width>1200</cmp_width>
<cmp_height>1400</cmp_height>
<!-- Add the configured colors and any options for this component. -->
</component>
<component>
<cmp_type>window_type</cmp_type>
<cmp_position>02</cmp_position>
<cmp_quantity>1</cmp_quantity>
<cmp_name>DEMO-DOOR-01</cmp_name>
<cmp_width>900</cmp_width>
<cmp_height>2100</cmp_height>
<!-- Add the configured colors and any options for this component. -->
</component>
</job_components>
</job>
</jobs>
Create-job invocation
Use -n followed by the XML file path. The reported successful run used this command form. The example uses a sanitized filename.
operac -n "quote-job.xml"
You can also upload the job XML over HTTP to /query?-n using the multipart field xml. The tested HTTP request returned 200 with text/xml.
The console transcript showed messages announcing job creation and confirming that the job was saved, followed by an XML result. This sanitized example preserves the response structure with one component shown.
<?xml version="1.0" encoding="UTF-8"?>
<jobs version="2.0">
<job>
<ID>101</ID>
<job_id>7</job_id>
<job_year>2026</job_year>
<new>true</new>
<job_components>
<component>
<cmp_id>1</cmp_id>
<cmp_position>01</cmp_position>
<new>true</new>
</component>
</job_components>
</job>
</jobs>
Read job_id and job_year together to identify the saved job. In the reported creation response, new was true at the job level and on all four returned components. Each component also supplied its cmp_id and cmp_position. Use an XML parser on the XML portion of the transcript. Read CLI errors from standard error. The successful console transcript leaves the stream used for the creation and save messages unverified.
The source contains a color list at colors/color with col_type and col_name, and option values at cmp_options/coption/opt_values/opt_value with ov_name and ov_active. Validate the generated file as well-formed XML before submitting it. Verify required elements, configuration values, dimension units, and repeat-submission behavior for your installation.
Verify the job in OperaJM
On an approved test installation, submit the XML using the confirmed invocation. Locate the job and record its job ID and year. Open the job in OperaJM or inspect its job details. Compare the customer, site, item count, quantities, dimensions, and product configuration against the reviewed request. For rows meant to reuse an existing model, confirm that they contain the expected structures. An empty typology can be saved successfully.
Check that the typologies can be calculated. A job can contain a copied model whose profile or accessory references are unresolved in the target project. See typology dependencies for the OperaJM diagnostic.
Use the saved job ID and year to request a job image preview for visual review. Open the browser calculation report to review the calculation and find other reports for the job, including the schemes PDF. Review the results before generating a customer quote. If the creation request times out or its outcome is unclear, check for the job before submitting the file again.