# Approval FAQs

This document summarizes common issues and solutions related to Feishu approval, for your reference.

## Native approval definition

### How to use the `node_list` parameter returned in [view specified approval definition](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/approval/get)?

This parameter is mainly used for approval nodes where the initiator can choose the approver (nodes not chosen by the initiator will flow automatically). Specifically:

- The `need_approver` parameter indicates whether the initiator needs to choose the approver. If this is required (`need_approver` is set to true), you need to specify the approver corresponding to the node when creating the approval instance.
- Both the system-generated `node_id` and the custom `custom_node_id` can be used as the node ID.

### How to write the token in the description document for associated external options?

The token value is custom-made and used to verify if the request is from a legitimate source. It's recommended to generate a unique ID for use.

### Can the custom ID of the control be used as the control ID?

Yes.

### Why does the single-choice control of the approval form time out when using external data?

Under this configuration, it may take about 4 seconds to respond to the data.

### Does the API support modifying the approval definition?

No, it can only be modified in the backend.

### In the design of approval forms, is there a rich text text box that can click links?

No.

### Can external data be added to the branch conditions of the approval flow?

Not all fields can be used as conditions. Currently, the following fields can be used as conditions:

- Initiator
- Some controls: single-choice, multiple-choice, number, amount, calculation formula, date interval, detail summary
- Fields in the leave control group: leave type, leave duration
- Fields in the overtime control group: overtime type, overtime duration
- Fields in the out control group: out type, out duration
- Fields in the business trip control group: departure location, destination, means of transportation, business trip duration

### Does the department in the [get single approval instance detail](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/get) interface return the department path?

No.

## Native approval instance

### How to handle the error "Invalid or empty control value" when [creating an approval instance](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/create)?

- Issue: The creation of the approval instance failed, returning error codes such as 60006 or 1390001, and indicating "Invalid or empty control value. Control=xxx".

![image.png](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/3c687deff7fbcc28d1f31c4475186d2f_Z4bSNBcGlD.png?height=260&lazyload=true&maxWidth=600&width=1193)

- Solution:

- The error information `Control=xxx` specifies the control ID or custom ID where the error occurred. Check if the corresponding control has been assigned a value, and whether the assigned value is correct.
	- The [create approval instance](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/create) document lists control types that do not support creation. If the approval definition includes controls not supported by the create approval instance API, using the API will result in errors. It's recommended to initiate approval through the Feishu client’s approval center in such cases.

### How to get the access link of an approval instance?

Use AppLink to obtain it. For details, refer to [launch Feishu approval](https://open.feishu.cn/document/uAjLw4CM/uYjL24iN/applink-protocol/supported-protocol/open-an-approval-page).

### How to pass values when the single-choice or multiple-choice controls are associated with external options in the [create approval instance](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/create) interface?

Provide the value parameters of the single-choice or multiple-choice controls as the `options.id` parameter values noted in the [description of associated external options](https://open.feishu.cn/document/ukTMukTMukTM/uADM4QjLwADO04CMwgDN).

**Note**: If the approval definition contains multiple single-choice or multiple-choice controls and associates multiple external data sources, ensure the id-value parameter values are globally fixed and unique across these data sources to prevent selection confusion or abnormal display in the form.

### How to set the initiator or approver of an approval instance to the application robot?

- **Initiator**

When [creating an approval instance](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/create), pass the robot's `open_id` as the initiator's `open_id` parameter to set the approval initiator to the corresponding robot. The robot's `open_id` can be obtained by calling the [get robot information](https://open.feishu.cn/document/ukTMukTMukTM/uAjMxEjLwITMx4CMyETM) interface.

- **Approver**

1. When creating or editing the approval definition, set the approver of the approval node to **Requester self-selection**.

![image.png](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/63d6fe867e780b59afed80d9d7f7518b_YBFxq38DQy.png?height=1096&lazyload=true&maxWidth=600&width=1808)

2. When [creating an approval instance](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/create), pass the robot's `open_id` in the parameter list (`node_approver_open_id_list`) for the field chosen by the submitter. The robot's `open_id` can be obtained by calling the [get robot information](https://open.feishu.cn/document/ukTMukTMukTM/uAjMxEjLwITMx4CMyETM) interface.

### Does the interface check the mandatory rule of the form controls when creating an approval instance?

No, even if mandatory controls are not provided, the **create approval instance** interface call will succeed without errors.warning
When omitting mandatory controls, the complete JSON parameters of the control must not be passed. If the control JSON is passed, then the `value` parameter must be set. If the JSON is passed without setting the `value`, the interface will return an error.

Mandatory controls are marked with an asterisk (*) in the approval definition form design.

![image.png](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/9e8d72b5e6007bb044b71164fb5d4be0_xNhYjMgJ6z.png?height=580&lazyload=true&maxWidth=600&width=1378)

### Why can't the URL returned by the [get single approval instance detail](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/get) interface be opened?

Check if the URL parameter contains `\\u0026`. This is because `&` has been escaped to `\\u0026`; replacing `\\u0026` with `&` will open the URL.

### Why is the status "REVERTED" in the callback data for the revoke operation, but the status returned by the [get single approval instance detail](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/get) interface is "CANCELED"?

The interface does not return "REVERTED"; however, events are distinguished:

- If the approval is canceled before completion, it is "CANCELED".
- If the approval has ended and is then canceled, it is "REVERTED".

### Can the `department_id` field in the [create approval instance](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/create) interface be filled with the root department?

No, filling the root department is not supported.

### Does the `task_list` parameter in the single instance detail return all approval tasks or only the current approver’s tasks?

All approval tasks.

### Can the approval flow node rollback operation be implemented through OpenAPI (ability to rollback and initiate new approval)?

Not supported.

### If the [create approval instance](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/create) interface fails, will calling the interface with identical request parameters twice within one second produce two approval flows?

No, it will only update.

### If multiple people can be selected in the approval instance, can the interface retrieve information on multiple people within the instance?

The information can be obtained using the [get single approval instance detail](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/get) interface.

### Does the `form` parameter value in the [create approval instance](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/create) interface need to be escaped?

Yes, the JSON data needs to be compressed and escaped into a string for passing.

### Can only the initiator withdraw an approval instance, and do other people lack the withdrawal permission?

Yes.

### What happens if the same UUID is used when [creating an approval instance](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/create)?

The first successful creation of the approval instance with the UUID will succeed, but subsequent creations using the same UUID will result in errors.

### Is the approval number (serial_number) returned by the [get single approval instance detail](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/get) interface unique? Can approval instance details be obtained based on this number?

The approval number is unique within the enterprise and generated sequentially. You can query the corresponding application number in the **Data Management** > **Data View** function page on the [approval management backend](https://www.feishu.cn/approval/admin).

![image.png](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/045bb4756d01a70a327f5de4fb736806_RTDzJ7z1wb.png?height=1382&lazyload=true&maxWidth=600&width=2942)

Currently, retrieving approval instance details based on the approval number is not supported.

### How to handle the error "Approval Process Preview Failed" when [Preview Approval Process](https://open.feishu.cn/document/ukTMukTMukTM/ukTM5UjL5ETO14SOxkTN/approval-preview) reports an error?

Call the [Get Single User Information](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/get) interface to confirm whether the department of the approval initiator is one or multiple.

- If the approval initiator belongs to multiple departments, the parameter department_id must be included in the request when calling the **Preview Approval Process** interface with one of the departments the initiator belongs to.
- If the approval initiator belongs to only one department, the parameter department_id can be omitted when calling the **Preview Approval Process** interface.

### Do CC recipients need to handle approval?

No, they can only view the approval information.

### Why does the externally linked single-select field not show in the Feishu card when creating a Feishu approval?

When the user initiates the request, an error occurred in the response interface from the external data source, causing the option to fetch to fail. The developer of the interface needs to check for any issues with their developed interface.

### Is the uuid of the approval event listener the uuid passed when creating the approval instance?

No, the event's uuid is automatically generated, indicating the uniqueness of the event and is not related to the custom uuid when creating the approval.

### Is the approval document number unique?

Yes, the approval document number is unique within the tenant, regardless of the approval definition, and is generated in the order of approval submission. You can view the approval number initiated on the day in [Approval Admin](https://www.feishu.cn/approval/admin/approvalList?devMode=on) under **Data Management** > **Data View** > **Data Management** page.

### Is there an interface to query the details of the approval instance based on the number?

Not provided yet.

## Native approval tasks related

### How to handle the error "task not found" when the [Approve Approval Task](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/task/approve) interface returns this error?

When a task not found error occurs, follow these troubleshooting steps:

1. Call the [Get Single Approval Instance Details](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/get) interface to confirm from the returned result if the current approval task status is "approved." If the task is already approved, re-approval will result in an error.
2. If the approval task is not approved, check whether the passed task ID and approver ID are correct.

### How to handle the error "no operation permission" when the [Approve Approval Task](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/task/approve) interface returns this error?

This error indicates a lack of operation permission. Each approval task corresponds to a specific approver. Check if the task ID and approver ID passed to the interface match. You can call the [Get Single Approval Instance Details](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/get) interface and confirm the task ID and approver ID relationship from the returned results.

### Will the approval number change if the task is rejected and resubmitted?

Yes, it will be considered a new submission, even though the content remains the same.

## Third-party approval related issues

### Can the x-frame-options be included in third-party service page headers?

No, including x-frame-options will cause subsequent requests to always hit the previous cache, making the page always fail to open. Additionally, after removing x-frame-options, if the client doesn't actively clear the cache once or the server doesn't generate new version resources, the page will always fail to open.

### Why is an approval task still in the pending list (un-synced) even after [Syncing Third-Party Approval Instance](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/external_instance/create) and third-party approval consent?

Usually, there are two situations:

- Confirm whether the latest sync log information carries the latest status. The third-party system may have approved the task, but the task was not synced to the Feishu approval system.
- If using an update mode to sync (i.e., the parameter update_mode in the [Syncing Third-Party Approval Instance](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/external_instance/create) interface is set to UPDATE), ensure that the outer layer's update_time is greater than the last sync update_time, and ensure that task_list and cc_list's update_time is greater than the last sync update_time. If the outer layer's update_time is less than the last update time, the entire data won't update. If the task_list's update_time is less than the last update time, the specific task won't update. If the update_mode is set to REPLACE, it will not compare update_time and will overwrite the entire request data as the latest data in the approval system.

### Why does the new task not appear in the approver's pending list after successfully calling the [Syncing Third-Party Approval Instance](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/external_instance/create) interface?

- Ensure that the user ID is correct. If the user ID is incorrect, the task won’t appear in the expected user’s pending list.
- Confirm if the tenant token information matches the user, meaning in a multi-tenant scenario, check if the user exists within the tenant.

### Why can't the pending list tasks be deleted, or why do they still exist in the approval pending list after successfully calling the [Syncing Third-Party Approval Instance](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/external_instance/create) interface?

- It may be that the data synced to the approval system was deleted in the business system, resulting in a sync failure or information loss. You can query the user's [Pending Task List](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/task/query) or [Query Task List](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/task/search), get the approval instance information, and then call the [Syncing Third-Party Approval Instance](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/external_instance/create) interface to delete the data.
- In update mode, the update_time must be greater than the last sync time; otherwise, it will be ignored. When the update_time of two approval tasks is the same, data will not be updated.

### Why are there no agree or reject buttons after syncing the approval task?

When calling the [Syncing Third-Party Approval Instance](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/external_instance/create) interface, the action_config parameter needs to be synchronized to set up quick approval operations.

### Why can't third-party approval be synchronized to pending status in time?

In update mode, the update_time must be greater than the last sync time; otherwise, it will be ignored. When the update_time of two approval tasks is the same, data will not be updated.

### Can only the approval status be updated, instead of mandatory fields in the Syncing Third-Party Approval Instance interface?

Not supported yet.

### How to clear historical third-party approval processes?

When calling the [Synchronize Third-Party Approval Instance](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/external_instance/create) interface to synchronize data, set the `update_mode` value to `REPLACE`. This means that during data synchronization, the data pushed through the interface call will be the final data. Any approval tasks, copied data that are not in the current push data will be cleared in the approval center. For more details, refer to [Frequently Asked Questions about Third-Party Approval Instances](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/external_instance/faqs#-787372).

### Why does it prompt submission failure when clicking "Agree" or "Reject" on third-party shortcut approvals?

Generally, this is because the `action_callback_url` configured in the approval definition is incorrect. This URL needs to be an interface that can be requested successfully and returns according to the format of the third-party approval shortcut approval callback interface. Please check whether the `action_callback_url` carried in the request of [Creating a Third-Party Approval Definition](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/external_approval/create) is correct.

## Approval bot related

### Why did the user not receive the message even though the Bot message was sent successfully?

It may be that the uuid in the Bot request parameters is duplicated. Modify and try again.