Margin Scorecard (persist + render)
Perform Margin Scorecard (persist + render) through Brightree.
brightree_margin_scorecardwritebrightree
Inputs
- Org Label
org_labeltextrequiredRequired text value.
- Period Days
period_daysnumberOptional numeric value.
Default:
0 - Date From
date_fromdateOptional date in YYYY-MM-DD format.
- Date To
date_todateOptional date in YYYY-MM-DD format.
- Min Claim Age Days
min_claim_age_daysnumberrequiredRequired numeric value.
Default:
50 - Min Group Orders
min_group_ordersnumberrequiredRequired numeric value.
Default:
8 - Top N
top_nnumberrequiredRequired numeric value.
Default:
15 - Persist Snapshot
persist_snapshotbooleanrequiredRequired true-or-false value.
Default:
true
Outputs
successSuccessperiod_startPeriod Startperiod_endPeriod Endline_countLine Countpaid_line_countPaid Line Countunpaid_line_countUnpaid Line CountrevenueRevenuecostCostgp_dollarsGp Dollarsgp_pctGp Pcthas_prior_periodHas Prior Periodprior_gp_pctPrior Gp Pctgp_pct_changeGp Pct Changecomparable_to_priorComparable To Priorsnapshot_idSnapshot Idsnapshot_persistedSnapshot Persistedhtml_bodyHtml BodysubjectSubjecterrorError
Output schema completeness: best_effort_declared
Safety
- External effect
- write
- Confirmation recommended
- No
- Retry safe
- No
- Dry run supported
- No
Schemas
These schemas are first-pass authoring guidance. Runtime validation remains authoritative.
Input schema
{
"type": "object",
"required": [
"org_label",
"min_claim_age_days",
"min_group_orders",
"top_n",
"persist_snapshot"
],
"properties": {
"top_n": {
"type": "number",
"default": 15,
"description": "Required numeric value.",
"x-workflow-field-type": "number"
},
"date_to": {
"type": "string",
"format": "date",
"description": "Optional date in YYYY-MM-DD format.",
"x-workflow-field-type": "date"
},
"date_from": {
"type": "string",
"format": "date",
"description": "Optional date in YYYY-MM-DD format.",
"x-workflow-field-type": "date"
},
"org_label": {
"type": "string",
"description": "Required text value.",
"x-workflow-field-type": "text"
},
"period_days": {
"type": "number",
"default": 0,
"description": "Optional numeric value.",
"x-workflow-field-type": "number"
},
"min_group_orders": {
"type": "number",
"default": 8,
"description": "Required numeric value.",
"x-workflow-field-type": "number"
},
"persist_snapshot": {
"type": "boolean",
"default": true,
"description": "Required true-or-false value.",
"x-workflow-field-type": "boolean"
},
"min_claim_age_days": {
"type": "number",
"default": 50,
"description": "Required numeric value.",
"x-workflow-field-type": "number"
}
},
"additionalProperties": false
}Output schema
{
"type": "object",
"properties": {
"cost": {},
"error": {},
"gp_pct": {},
"revenue": {},
"subject": {},
"success": {},
"html_body": {},
"gp_dollars": {},
"line_count": {},
"period_end": {},
"snapshot_id": {},
"period_start": {},
"prior_gp_pct": {},
"gp_pct_change": {},
"paid_line_count": {},
"has_prior_period": {},
"unpaid_line_count": {},
"snapshot_persisted": {},
"comparable_to_prior": {}
},
"additionalProperties": true
}