> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# ReportActionInvocationCompleted

# Package: triggers

# Namespace: EsbRuntimeService

# Method link: https://dev.wix.com/docs/api-reference/business-management/automations/triggers/triggered-events/report-action-invocation-completed.md

## Permission Scopes:
Set Up Automations: SCOPE.CRM.SETUP-AUTOMATIONS

## Introduction

> **Note**: Call this method when using the [Action Provider service plugin](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/introduction.md) to run an action with a timeout.

Reports to Wix that your action has completed.

When Wix calls [Invoke](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/invoke.md) to run your [action that has a timeout](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/introduction.md#action-timeouts), it pauses the automation until you call this method or until the timeout period ends. If your action has an [output schema](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions.md#the-output-schema), include your action's results.

If you don't call this method in the timeout period, Wix [marks the action as failed](https://support.wix.com/en/article/wix-automations-understanding-run-logs#understanding-statuses) and continues to the next step in the automation. Subsequent actions may fail if they rely on your action's output.

---

## REST API

### Schema

```
 Method: reportActionInvocationCompleted
 Description: > **Note**: Call this method when using the [Action Provider service plugin](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/introduction.md) to run an action with a timeout.  Reports to Wix that your action has completed.  When Wix calls [Invoke](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/invoke.md) to run your [action that has a timeout](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/introduction.md#action-timeouts), it pauses the automation until you call this method or until the timeout period ends. If your action has an [output schema](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions.md#the-output-schema), include your action's results.  If you don't call this method in the timeout period, Wix [marks the action as failed](https://support.wix.com/en/article/wix-automations-understanding-run-logs#understanding-statuses) and continues to the next step in the automation. Subsequent actions may fail if they rely on your action's output.
 URL: https://www.wixapis.com/automations_runtime/v1/report-action-invocation-completed
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  invocationToken
 Method parameters: 
   param name: invocationToken | type: invocationToken | description: Invocation token from Wix's original call to [Invoke](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/invoke.md). Wix uses this token to match your results with the correct automation run.  Learn more about [running an invoked action with a timeout](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/sample-flow.md#run-an-invoked-action-with-a-timeout). | required: true | validation: maxLength 2048
   param name: status | type: Status    
      - enum:
           UNKNOWN_STATUS - Unknown action completion status.
           SUCCESS - Action completed successfully.
           FAILURE - Action failed to complete.
    - ONE-OF: 
     - name: successInfo | type: SuccessInfo | description: When the `status` is `SUCCESS`, your action's results.  
        - name: result | type: object | description: Your action's results as specified in its [output schema](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions.md#the-output-schema).  
     - name: failureInfo | type: FailureInfo | description: When the `status` is `FAILURE`, why the action failed.  
        - name: errorDescription | type: string | description: Why the action failed.  | validation: maxLength 1000
 Return type: ReportActionInvocationCompletedResponse
  EMPTY-OBJECT {}


```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.automations.activations.reportActionInvocationCompleted(status, invocationToken, options)
 Description: > **Note**: Call this method when using the [Action Provider service plugin](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/introduction.md) to run an action with a timeout.  Reports to Wix that your action has completed.  When Wix calls [Invoke](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/invoke.md) to run your [action that has a timeout](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/introduction.md#action-timeouts), it pauses the automation until you call this method or until the timeout period ends. If your action has an [output schema](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions.md#the-output-schema), include your action's results.  If you don't call this method in the timeout period, Wix [marks the action as failed](https://support.wix.com/en/article/wix-automations-understanding-run-logs#understanding-statuses) and continues to the next step in the automation. Subsequent actions may fail if they rely on your action's output.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  invocationToken, status
 Method parameters: 
   param name: status | type: Status   | required: true 
      - enum:
           UNKNOWN_STATUS - Unknown action completion status.
           SUCCESS - Action completed successfully.
           FAILURE - Action failed to complete.
   param name: invocationToken | type: string | description: Invocation token from Wix's original call to [Invoke](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/invoke.md). Wix uses this token to match your results with the correct automation run.  Learn more about [running an invoked action with a timeout](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/sample-flow.md#run-an-invoked-action-with-a-timeout). | required: true | validation: maxLength 2048
   param name: options | type: ReportActionInvocationCompletedOptions  none  
    - ONE-OF: 
     - name: successInfo | type: SuccessInfo | description: When the `status` is `SUCCESS`, your action's results.  
        - name: result | type: object | description: Your action's results as specified in its [output schema](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions.md#the-output-schema).  
     - name: failureInfo | type: FailureInfo | description: When the `status` is `FAILURE`, why the action failed.  
        - name: errorDescription | type: string | description: Why the action failed.  | validation: maxLength 1000
 Return type: PROMISE<ReportActionInvocationCompletedResponse>
  EMPTY-OBJECT {}


```

### Examples

### reportActionInvocationCompleted
```javascript
import { activations } from '@wix/automations';

async function reportActionInvocationCompleted(status,invocationToken,options) {
  const response = await activations.reportActionInvocationCompleted(status,invocationToken,options);
};
```

### reportActionInvocationCompleted (with elevated permissions)
```javascript
import { activations } from '@wix/automations';
import { auth } from '@wix/essentials';

async function myReportActionInvocationCompletedMethod(status,invocationToken,options) {
  const elevatedReportActionInvocationCompleted = auth.elevate(activations.reportActionInvocationCompleted);
  const response = await elevatedReportActionInvocationCompleted(status,invocationToken,options);
}
```

### reportActionInvocationCompleted (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { activations } from '@wix/automations';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { activations },
  // Include the auth strategy and host as relevant
});


async function reportActionInvocationCompleted(status,invocationToken,options) {
  const response = await myWixClient.activations.reportActionInvocationCompleted(status,invocationToken,options);
};
```

---