Skip to main content
About the Resource Center

Add configuration to custom actions for integrations

Note: This article applies to the AWS Lambda, Function, Genesys Cloud, Google, Microsoft Dynamics 365, Salesforce, web services, and Zendesk data actions integrations.

When creating a custom action, first add contracts and then add configuration. The configuration defines how the action implements the contracts. For more information, see Create a custom action and Add contracts to custom actions.

Note: You can modify the configuration after you publish the action. For more information, see Modify configuration in custom actions.
  1. Click the Configuration tab. 
  2. Select the HTTP method.
  3. Under Request, configure the request that the action sends to the web service. Genesys recommends configuring the request by using the fields under Simple.
    Tip: Click the properties under Available Inputs to copy and quickly paste them in the request. These properties come from your input contract. For more information, see Add contracts to custom actions. You can use macros with the templates. For more information, see Velocity macros for data actions.

    Enter information for the fields that appear. The fields that appear vary depending on the HTTP method selected and the contracts added.

    Notes:
    • For the AWS Lambda data actions integrations and Google Cloud Functions, see the following Special request configurations section.
    • Excessively nested JSON objects can affect the performance of the data action service. To maintain the performance, the depth of JSON objects is limited to 50 levels. For more information, see Limits in Genesys Cloud Developer Center.
  4. Request URL Template

    Set the Request URL Template to the remote endpoint that your HTTP request hits.

  5. Headers (optional)

    Key-value pairs that are added as HTTP headers on the request that is sent to the remote endpoint.

    Note: If you are setting the Accept header, you must use a JSON media type as the header value.
  6. Execution Timeout

    Set the execution timeout between 1 and 60 seconds for the data action. The default timeout of 60 seconds is used when you do not set a timeout value. When the HTTP requests run longer than the set time, then the data action returns a timeout response. After the designated time limit, the data action execution is removed from the concurrency limit. For more information, see How many seconds before a data action times out?.

    Note: To ensure that a flow’s timeout logic is executed correctly and to prevent unnecessary data action processing, set the data action’s timeout to be one second longer than the flow’s configured timeout. This best practice helps to manage concurrency limit by ensuring that the data action doesn’t continue after the flow has already timed out.
  7. Transfer Encoding

    If your web service does not support Transfer-Encoding set to chunked, add Transfer-Encoding: buffered under headers. For more information, see Custom action fails for unexpected reason.

  8. Authorization

    You can include authorization information in the request configuration. For more information, see How to use the User Defined credential type and How to use the User Defined (OAuth) credential type.

  9. Special request configuration

    The request configuration for custom actions that are associated with the AWS Lambda data actions integrations or that execute the Google Cloud Functions vary from the standard request configuration for web services.

  10. Under Response, add the JSON configuration.

    The JSON configuration defines how the response from the web service or AWS Lambda function is processed.

    You can use the response in other actions or the following example as a guide for creating the JSON. For more information about using macros with the success template, see Velocity macros for data actions.

    Tip: Click the properties under Available Outputs to copy and quickly paste them in the response. These properties come from in your output contract. For more information, see Add contracts to custom actions.
    {
          "translationMap": {
              "buildNumber": "$.Build-Version",
              "serviceName": "$.name",
              "status": "$.Status"
          },
          "successTemplate": "{\r\n      \t\"build\": ${buildNumber},\r\n      \t\"name\": ${serviceName},\r\n\"status\": ${status}\r\n      }"
     }

    For a detailed explanation of the parts of the response, see Response configuration for data actions.

Next, add the Function for Genesys Cloud Function. For other data actions, test the action for validation and execution errors.

For more information, see About custom actions for integrations.

For more information about the integrations, see About the data actions integrations.