Represents a command to get a Call To Action Information from Metabox Modular 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.
ecomConfiguratorDataUpdated is not its reply — that fires once, as the ecom data loads — so
subscribe to it from the apiReady callback, not around this call. To follow the workflow itself,
listen to 'ctaStatusChanged': it reports 'started', then 'ready' or 'failed'.
Remarks
ctaStatusChanged is additive and requires configurator-side support. There is no redirect url to
receive: MetaBox posts the configuration to the callback URL from admin and navigates to the
redirectUrl the endpoint returns, reporting an unusable reply in its own UI. On success the user
is navigated away, so treat 'started' and 'failed' as the load-bearing states.
What does it unlock?
Runs the CTA workflow. The CTA label and callback URL reach the host on the load-time
ecomConfiguratorDataUpdated event, not from this command.
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 as soon as the api is ready: this event fires once, when the ecom data loads api.addEventListener('ecomConfiguratorDataUpdated', (data:EcomConfigurator) => { console.log('Ecom configurator params:', data); });
// Send the command to get Call To Action information from Metabox Modular Configurator api.sendCommandToMetabox(newGetCallToActionInformation()); };
Represents a command to get a Call To Action Information from Metabox Modular 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.
ecomConfiguratorDataUpdatedis not its reply — that fires once, as the ecom data loads — so subscribe to it from the apiReady callback, not around this call. To follow the workflow itself, listen to 'ctaStatusChanged': it reports'started', then'ready'or'failed'.Remarks
ctaStatusChangedis additive and requires configurator-side support. There is no redirect url to receive: MetaBox posts the configuration to the callback URL from admin and navigates to theredirectUrlthe endpoint returns, reporting an unusable reply in its own UI. On success the user is navigated away, so treat'started'and'failed'as the load-bearing states.What does it unlock?
Runs the CTA workflow. The CTA label and callback URL reach the host on the load-time
ecomConfiguratorDataUpdatedevent, not from this command.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