Blueprints
The Blueprint module-reference enables widgets to interact with workflow-driven state transitions defined within Custom Modules. In Zoho Books, Blueprint allows administrators to design structured processes by defining states, transitions, validations, and approvals.From an SDK perspective, Blueprint integration allows widgets to respond to or participate in these controlled state transitions, enabling advanced workflow-based customizations.
Blueprint-based widget interactions are currently supported only within Custom Modules. Standard modules do not expose Blueprint-driven widget locations or events. To use Blueprint-related widget functionality, the workflow must be configured inside a Custom Module.
- Validating record data before a state transition
- Enforcing business rules during workflow progression
- Triggering conditional UI behavior based on the current state
- Capturing additional input during approval or transition steps
- Listening to Blueprint-related events triggered during transitions
- Reading current state information using SDK methods
- Updating field values before transition completion
- Providing contextual UI guidance within transition dialogs
Blueprint enforces a structured lifecycle for records within a Custom Module. Each transition may include validation rules, mandatory fields, or approval logic. Widgets interacting with Blueprint must account for state-specific behavior, ensuring that data updates or actions align with the defined workflow configuration.
Blueprint widget interactions are supported only inside Custom Modules. Replace the module placeholder in event names and locations with your actual Custom Module API name when configuring Blueprint-related widgets.
Methods
Get Custommodule
The get method of the blueprint module allows you to retrieve details of the current blueprint context when a widget is rendered within supported blueprint-related locations in a Custom Module. You can use this method to fetch information such as the current record metadata.
ZFAPPS.get('cm_{{custommodule_name}}')
.then(data => console.log('custommodule data:', data))
.catch(err => console.error('Error:', err));
| Property | Request |
|---|---|
| created_time | created_time |
| last_modified_time | last_modified_time |
| module_record_id | module_record_id |
| record_name | record_name |
| record_name_formatted | record_name_formatted |
These keys are common for all blueprints context.and extra keys they give for related with the module fields. ex: you have tip_id they return cf_trip_id
Invoke
This invoke is used for genrally change the transition for one status to other status in blueprint. You can use this method to trigger a state transition.cannot use this the state transition is cannot changed.
ZFAPPS.invoke('ON_PROCEED_TRANSITION').then(function(data){
console.log('transition data',data);
ZFAPPS.invoke('SHOW_NOTIFICATION', {
type: 'success',
message: data.message
}).then(function (res) {
console.log('success', res)
}).catch(function (err) {
console.error('error', err)
});
}).catch((err) => {
ZFAPPS.invoke('SHOW_NOTIFICATION', {
type: 'error',
message: err.message
}).then(function (res) {
console.log('success', res)
}).catch(function (err) {
console.error('error', err)
}); }).finally(() => {
console.log('closemodal');
ZFAPPS.closeModal();
});