Represents a command to get a Call To Action Information from Metabox Basic Configurator.
This class sends a message to the Metabox API to generate Call To Action information based on the current
configuration and sends it to the endpoint URL from the CTA information.
To listen for changes after sending this command, listen to the 'ecomConfiguratorDataUpdated' event.
What does it unlock?
Retrieves information about call-to-action that were added to the configurator. Requires subscription to receive data.
Practical Application
Triggers the CTA (Call-to-Action) workflow configured in MetaBox admin. The CTA label and callback URL are set in admin.
When invoked, MetaBox POSTs the full configuration JSON (including BOM) to your callback URL endpoint, which returns a { redirectUrl }.
AI Coding Best Practices
Call only after user completes configuration. Subscribe to ecomConfiguratorDataUpdated to get CTA label/URL for building
custom CTA buttons in your UI. The POST payload includes the full bill of materials — your backend endpoint processes it
and returns a redirect URL.
//Subscribe to the event before sending the command to ensure you capture the response api.addEventListener('ecomConfiguratorDataUpdated', (data:EcomConfigurator) => { console.log('Ecom configurator params:', data); });
Represents a command to get a Call To Action Information from Metabox Basic Configurator. This class sends a message to the Metabox API to generate Call To Action information based on the current configuration and sends it to the endpoint URL from the CTA information.
To listen for changes after sending this command, listen to the 'ecomConfiguratorDataUpdated' event.
What does it unlock?
Retrieves information about call-to-action that were added to the configurator. Requires subscription to receive data.
Practical Application
Triggers the CTA (Call-to-Action) workflow configured in MetaBox admin. The CTA label and callback URL are set in admin. When invoked, MetaBox POSTs the full configuration JSON (including BOM) to your callback URL endpoint, which returns a { redirectUrl }.
AI Coding Best Practices
Call only after user completes configuration. Subscribe to ecomConfiguratorDataUpdated to get CTA label/URL for building custom CTA buttons in your UI. The POST payload includes the full bill of materials — your backend endpoint processes it and returns a redirect URL.
Example