@3dsource/metabox-front-api
    Preparing search index...

    Class GetCallToActionInformation

    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.

    Retrieves information about call-to-action that were added to the configurator. Requires subscription to receive data.

    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 }.

    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.

    import { Communicator, EcomConfigurator,GetCallToActionInformation } from '@3dsource/metabox-front-api';
    window.env3DSource.apiReady = (api: Communicator) => {

    //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);
    });

    Send the command to get Call To Action information from Metabox Basic Configurator
    api.sendCommandToMetabox(new GetCallToActionInformation());
    };
    Index

    Constructors

    Properties

    Constructors

    Properties

    data: ToMetaBoxMessageEnvelope

    The message envelope populated by subclass constructors and sent via Communicator.sendCommandToMetabox.