OnPrintShop Master Options icon

OnPrintShop Master Options

Manage OnPrintShop master options, attributes, formulas, rules, ranges, prices, tags, groups, and stock

Complete API → Set Custom Formula

AI-generated

Summary

Set a custom formula in OnPrintShop by creating, updating, or deleting it using specified fields or a JSON object input.

Inputs

  • Input Mode (required) — Select between providing individual form fields ('Fields') or a JSON object ('JSON Object') for the custom formula input.
  • Input (required) — When 'Fields' mode is selected, specify parameters such as 'Formula ID' (for updating/deleting or 0 to create), 'Formula Label', 'Formula Syntax', and 'Delete' flag (0 to set, 1 to delete). This collection encapsulates the properties of the custom formula.
  • Arguments JSON (required) — When 'JSON Object' mode is used, provide the complete custom formula input as a JSON object matching the API structure.
  • Partial Response — Configure error handling for partial responses: 'Fail on Errors' to stop on any error or 'Return Partial Data' to receive results despite some failures.
  • Return Fields Mode — Select whether to return all fields or a custom selection from the response of the set operation.
  • Return Fields — When 'Custom Selection' is chosen in Return Fields Mode, select which fields ('ID', 'Message', 'Result') to include in the output.

Output shape

a list of items representing the result of the setCustomFormula mutation, each with fields like 'id', 'message', and 'result' depending on user selection

The operation performs a mutation via the OnPrintShop API with the provided input, returning the status of the create, update, or delete action on custom formulas. Error handling can be controlled via the Partial Response setting. Users should verify IDs and inputs carefully as this operation mutates OnPrintShop data.

Links

Discussion