Add Function configuration
Before you test the action, you must upload the Function code. Consider the following guidelines when packaging and uploading the custom code in Genesys Cloud:
- Package the custom code in ZIP file format.
- Do not encrypt the ZIP file.
- The ZIP file size must not exceed 256 MB.
- The code within the ZIP file is not scanned for viruses.
- When you upload a new ZIP file, it replaces the existing file.
- You cannot download the ZIP file from Genesys Cloud.
To create a Function configuration:
- Click the Function tab.
- Enter the following details for the Function:
- Handler – Provide the path to the invocation handler that is present within the upload function package. Since the package is a ZIP of multiple files of code and their dependences,
the handler must describe the path and exported method name. The format is{path_to_handler_module}.{export_name_of_handler_method}
. - Description – (Optional) A brief description of the Function.
- Timeout – The maximum amount of time allowed for the function to run to completion. The allowed range is 1 – 15 seconds. If a Function exceeds the timeout, it is automatically stopped.
- Runtime – The currently supported Node.js runtimes versions are available for selection. For more information, see Requirements for the data actions integration.
Click the image to enlarge.
- Handler – Provide the path to the invocation handler that is present within the upload function package. Since the package is a ZIP of multiple files of code and their dependences,
- To upload the custom code that you have packaged, click Upload zip.
- Click Choose file to select the ZIP file from your local computer.Note: Your custom code must be packaged into an unencrypted ZIP file and does not exceed 256 MB.
- Click Upload.
Next, test the action for validation and execution errors.