# Use ecommerce plugin general functions to customize the workflow

Source: https://developer.avalara.com/products/ecm/integration-guides/document-management/kvl7327185338648/

Guide: Exemption Certificate Management (ECM)

# Use ecommerce plugin general functions to customize the workflow

Learn how to use ecommerce plug-in general functions to customize certificate submission workflows.

The ecommerce plug-in includes various built-in functions that allow you to customize the certificate submission workflow. As these functions are built into the ecommerce plug-in, they don’t require you to use the API. For more information on the list of all available general functions, see ecommerce plug-in general functions.

A common use case for the general functions is using the `submit_to_stack` function to control the status of the exemption certificate once the customer submits it.

The product for which you’ve subscribed, such as ECM, dictates the fields on a certificate that are available or required. But, it can't validate the data within the fields automatically. Newly submitted certificates can be sent to a queue for review by a user in your account or validated automatically. The following are the options to handle certificate validation and exemption status:

-   **Automatic validation** (default): New certificates are automatically valid, which allows your customers to make exempt purchases right away. This can create a potential risk if your customer submits a certificate that’s missing information or is otherwise invalid. In this case, correct the issue later.

    If a state or a jurisdiction prohibits the completion of a form online and requires the buyer to submit a copy of their state-issued license or similar, the document is sent to the certificate validation queue, and must be manually validated.

-   **Manual validation**: Use the `submit_to_stack` function to send the certificate to your certificate validation queue in ECM, and the customer isn’t exempt until you manually validate the certificate.

Below is an example of an exemption that's automatically validated and applied

**Example**

```

  GenCert.init(document.getElementById(&quot;form_container&quot;), {
    ship_zone: &quot;California&quot;,
    token: &#39;token generated from your web application server&#39;,
    submit_to_stack: false
  });
  GenCert.show();
```