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.
Note: Genesys recommends using a packaging framework such as Serverless Framework to ensure that your ZIP file has the correct structure for compatibility.

To create a Function configuration:

  1. Click the Function tab.
  2. 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.This image is a screenshot of the Function configuration while creating a custom action in Genesys Cloud for Function data action integration.
  3. To upload the custom code that you have packaged, click Upload zip.
  4. 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.
  5. Click Upload.

Next, test the action for validation and execution errors.