{"ref":{"kind":"component","id":"commerce_revenue_period","key":"sha256:a0ffe1312124ad3124280981979d8e60c899ca065d73903eb6c0dc7000bbca55"},"label":"Commerce revenue composition","description":"Keep recognized service and product revenue distinct from merchandise activity.","inputs":[{"label":"Products","name":"products","valueType":{"axes":[],"dtype":"f64","unit":"$"}},{"label":"Services","name":"services","valueType":{"axes":[],"dtype":"f64","unit":"$"}},{"label":"Volume","name":"volume","valueType":{"axes":[],"dtype":"f64","unit":"$"}}],"outputs":[{"label":"Negative Inputs","name":"negative_inputs","valueType":{"axes":[],"dtype":"f64","unit":"$"}},{"label":"Product Share","name":"product_share","valueType":{"axes":[],"dtype":"f64","unit":"%"}},{"label":"Revenue","name":"revenue","valueType":{"axes":[],"dtype":"f64","unit":"$"}},{"label":"Revenue Available","name":"revenue_available","valueType":{"axes":[],"dtype":"f64","unit":"flag"}},{"label":"Service Yield","name":"service_yield","valueType":{"axes":[],"dtype":"f64","unit":"%"}},{"label":"Volume Available","name":"volume_available","valueType":{"axes":[],"dtype":"f64","unit":"flag"}}],"dependencies":[],"libraries":["commerce_revenue"],"notes":{"conventions":["Volume, recognized service revenue and recognized product sales share one period, perimeter, currency and scale.","Product sales are already recognized revenue; do not infer their amount from merchandise volume or add volume to revenue.","Service revenue divided by volume is a blended realized ratio, not a contractual commission or margin.","Shipping gross/net presentation, advertising, subscriptions, geography and currency can change the ratio.","Ratios are fractional percentages. A nonpositive denominator yields zero with an unavailable flag."]},"calculation":{"nodes":[{"id":"input-products","label":"Products","kind":"input"},{"id":"input-services","label":"Services","kind":"input"},{"id":"input-volume","label":"Volume","kind":"input"},{"id":"step-revenue","label":"Revenue","kind":"step","rule":"(Services + Products)","sources":[{"node":"input-services"},{"node":"input-products"}]},{"id":"step-value1","label":"(Volume > 0)","kind":"step","rule":"(Volume > 0)","sources":[{"node":"input-volume"}]},{"id":"output-negative_inputs","kind":"output","label":"Negative Inputs","rule":"((Higher of (Volume × -1) and 0 + Higher of (Services × -1) and 0) + Higher of (Products × -1) and 0)","sources":[{"node":"input-volume"},{"node":"input-services"},{"node":"input-products"}]},{"id":"step-value0","label":"(Revenue > 0)","kind":"step","rule":"(Revenue > 0)","sources":[{"node":"step-revenue"}]},{"id":"output-revenue","kind":"output","label":"Revenue","rule":"Revenue","sources":[{"node":"step-revenue"}]},{"id":"output-service_yield","kind":"output","label":"Service Yield","rule":"if (Volume > 0), then (Services ÷ if (Volume > 0), then Volume, otherwise 1), otherwise 0","sources":[{"node":"step-value1"},{"node":"input-volume"},{"node":"input-services"}],"calls":[{"function":"div_currency_percent","label":"Div currency percent","bindings":[{"name":"denominator","label":"Denominator","value":"if (Volume > 0), then Volume, otherwise 1"},{"name":"numerator","label":"Numerator","value":"Services"}],"rule":"(Services ÷ if (Volume > 0), then Volume, otherwise 1)"}]},{"id":"output-volume_available","kind":"output","label":"Volume Available","rule":"if (Volume > 0), then 1, otherwise 0","sources":[{"node":"step-value1"}]},{"id":"output-product_share","kind":"output","label":"Product Share","rule":"if (Revenue > 0), then (Products ÷ if (Revenue > 0), then Revenue, otherwise 1), otherwise 0","sources":[{"node":"step-value0"},{"node":"step-revenue"},{"node":"input-products"}],"calls":[{"function":"div_currency_percent","label":"Div currency percent","bindings":[{"name":"denominator","label":"Denominator","value":"if (Revenue > 0), then Revenue, otherwise 1"},{"name":"numerator","label":"Numerator","value":"Products"}],"rule":"(Products ÷ if (Revenue > 0), then Revenue, otherwise 1)"}]},{"id":"output-revenue_available","kind":"output","label":"Revenue Available","rule":"if (Revenue > 0), then 1, otherwise 0","sources":[{"node":"step-value0"}]}],"topics":[{"label":"Commerce revenue composition","results":["output-negative_inputs","output-product_share","output-revenue","output-revenue_available","output-service_yield","output-volume_available"]}]},"usedBy":[]}
