CommStack Backend Documentation Constellation Tables Refinery
Table of Contents
Constellation
Form Field Configuration
Required fields
On the FormAdd, include a * in front of each required field.
*Title Description
In the example above, Title will be required.
Automatic field values
A form field can be configured to automatically be filled in, either from a property of the user, or by the current date (using the keyword Now).
An example of automated values is bellow:
Title Branch{Branch} CapturedBy{Title} CaturedOn{Now}
Please note, the value "Title" in the example. This is because the user name is in the "Title" field, and to have function lookups working, it will need to attach to the "Title" field of the user.
Optional form sections
On a multi section form, sections can be hidden if the field deffinition starts with a filter value.
A filter value will be in the format {"FieldName":"Condition"} and be the first item on the row.
*Name Address *Province *Branch *PaymentCode AuthorizedSignatoryName
{"Branch":"HRE"} NationalIdNo PhoneNumber ComplianceStatus
EmailAddress ComplianceStatus CustomerStatus LicenceType
{"Branch":"HRE","ComplianceStatus":"Current"} LicenceNo LicenceExpDate VatNo NameOfBank
AccountNumber BranchCode ComplianceStatus CustomerType
In listing 1 The second section will only be shown if Branch is set to "HRE". The fifth section will only be shown if Branch is "HRE" and if ComplianceStatus is Current.
Group names
Group names can be added to View fields.
Optionally, they can also be added to Edit and Add fields.
"Section 1" Name Address Province Branch NameOfBank ComplianceStatus NationalIdNo PhoneNumber "Section 2" LicenceNo LicenceExpDate VatNo LicenceType AccountNumber BranchCode "Section 3" SwiftCode ComplianceStatus CustomerType PaymentCode EmailAddress
"A1" *Name Address *Province *Branch *PaymentCode AuthorizedSignatoryName
"A2" {"Branch":"HRE"} NationalIdNo PhoneNumber ComplianceStatus
"B1" EmailAddress ComplianceStatus CustomerStatus LicenceType
"B2" {"Branch":"HRE","ComplianceStatus":"Current"} LicenceNo LicenceExpDate VatNo NameOfBank
"C" AccountNumber BranchCode ComplianceStatus CustomerType
Action Buttons
Actions buttons are created in the Custom Button field, with the format ButtonName|Field1|Value1|Field2|Value2.
Like form fields, some automatic values can be set. Either from the user properties, or the current date.
Approve|ProcessStatus|Approved|ApprovedBy|{Title}|ApprovedOn|{Now}
Key Fields
To configure a key field, confirm the required field is configured in the permission Columns.
Maps
If the Key Field is of the type GeoLocation, the table will be displayed as a map.
Calendar
If the Key Field type is Date or Date and Time, the data will be shown in Constellation as a table. If the Secondary Field is also set, this will be used as an "End Date".
Custom User Dashboards
A Custom User dashboard can be created by setting the Dashboard field on the User instance in Musketeer.
An example Dashboard is bellow.
[
{
"chart": {
"fllChartId": 2922,
"title": "Customer status",
"dateField": "Date"
},
"colSpan": 4,
"rowSpan": 1
},
{
"chart": {
"fllChartId": 2940,
"title": "Payment",
"dateField": "Date"
},
"rowSpan": 1,
"colSpan": 1
},
{
"chart": {
"fllChartId": 2800,
"title": "Weight by PC",
"dateField": "DateOfReceipt"
},
"rowSpan": 1,
"colSpan": 1
},
{
"chart": {
"fllChartId": 2801,
"title": "Payment Code Count",
"dateField": "DateOfReceipt"
},
"rowSpan": 1,
"colSpan": 1
},
{
"chart": {
"fllChartId": 2887,
"title": "Quote Value"
},
"rowSpan": 1,
"colSpan": 1
}
]
Dashboard to Permission link
A dashboard can be given a link to a permission.
This is done by adding a "permission" property to user's Dashboard, as in the example below.
[
{
"chart": {
"fllChartId": 2922,
"title": "Customer status",
"dateField": "Date"
},
"permission": "test-permission",
"colSpan": 4,
"rowSpan": 1
}
]
Invoice Forms
Invoice forms allow table rows to be added inlinde while capturing data.
These instructions assume knowlage on configuring a standard permssions.
Basic FLL Setup
- Musketeer Configuration
Three tables are required in Muskteer.
- Item source table (1)
- It is advised that this is a library table. This holds the deffinitions of items that will be selected on the form. If the form is for invoices this will hold a list of possible broducs that are being invoiced for.
- Main table (2)
- This is the main table that is used to hold invoices, receiepts, purchase orders, etc.
- Item table (3)
- It is advised that this inherits from the source table, so long that the source table is a library. This table holds line items of the main record. These are imported from the source table.
- Permssion Configuration
Two permissions are required to be created.
- The Item permission
Needs to reference the item table (3).
- The Main permssion
Needs to reference the main table (2).
To add the input table into the form, two things need to be done:
- The item permission needs to be added as level 2.
- A special line1 needs to be added to the Form Add field.
This needs to be in the format ,without spaces, item permission, colon, and the FLL ID of the Item Source table (1),
item-permission:source-fll.
Title Description Date Address invoice-line-items:1234
- The Item permission
Tables
:CUSTOMID: tables
Dynamic Filters
Dynamic filters can be created, allowing Constellation tables to be filtered based on User properties.
On the permission, the Process Status Filter is configured as normal, except the value to be replaced by a user field is wrapped in braces.
e.g.
Branch:{Branch},PaymentCode:SG
In the above example, is a user has a Branch field (e.g. HRE) then {Branch} will be substituted when data for the table is requested.
Refinery
Refinery Events
Buying Process
- Bullion Received
{ "bullionId": "HRE-SG-24050004", "customer": "HRE-AAA-001", "mine": "DID-1658954", "paymentCode": "SG", "items": [ { "weight": { "kilograms": 12.0 }, "descriptors": [ "Cu" ], "type": "ingot" } ], "time": "2024-05-14T13:53:54.6792758+03:00", "user": "JonathanPeel", "event": "BullionReceived" } - Specific Gravity Signoff
{ "bullionId": "HRE-SG-24050004", "fineness": 876.0, "time": "2024-05-14T15:26:15.167155+03:00", "user": "JonathanPeel", "event": "SpecificGravitySignedOff" } - Price Approved (SG)
- routing key
commstack.refinery.PriceApprovedEvent
{ "bullionId": "HRE-SG-24050004", "time": "2024-05-14T15:26:15.167155+03:00", "user": "JonathanPeel", "event": "PriceApproved", "goldPayable": { "kilograms": 11.0 }, "royaltyCharges": { "usd": 123.0 }, "refineryCharges": { "usd": 123.0 }, "otherCharges": { "usd": 123.0 }, "net": { "usd": 123.0 }, } - Weight After Melton
- routing key
commstack.refinery.WeightAfterMeltCompleted
{ "event": "WeightAfterMeltCompleted", "user": "JonathanPeel", "time": "2024-05-16T12:27:10.0397771+00:00", "bullionId": "HRE-BBF-24050001", "IngotWeigh": { "kilograms": 1.0 }, "SampleWeight": { "kilograms": 12.0 }, "totalWeight": { "kilograms": 13.0 } } - Fire Assay Batch Sign Offenbach
- routing key
- commstack.refinery.FireAssayBatchSignOff
{ "batchId": "240520-2", "bullion": [ { "bullionId": "HRE-BBF-24050001", "fineness": 996.4875 } ], "time": "2024-05-20T05:43:19.5480169+03:00", "user": "JonathanPeel", "event": "FireAssayBatchSignOff" }
Footnotes:
On an invoice form, field rows will be broken into rows. The item table field should be on it's own row.