Add configuration to custom actions for integrations


Note: This article applies to the Adobe, AWS Lambda, 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.
  • Click the Configuration tab. 
  • Select the HTTP method.
  • 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 in your input contract. For more information, see Add contracts to custom actions. You can use macros with the templates. For 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.

    Important: For the Adobe and AWS Lambda data actions integrations and Google Cloud Functions, see the Special request configurations section.

    Special request configuration

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

    • Headers

      Key-value pairs that are added to data actions at runtime for authentication handling:

      • x-api-key
      • x-gw-ims-org-id
      • x-sandbox-name (if configured)

        You can add a sandbox name to the integration credentials or as a header in an action. If the sandbox name is set in both places, the integration uses the header configured in the data action. For more information, see Add a data actions integration

    • Request URL Template

      Set Request URL Template to the ARN of your AWS Lambda function. For more information, see Create IAM resources to invoke AWS Lambda functions.

    • Request Type

      Set Request Type to POST. This HTTP method ensures that the action sends any request body with the request configuration.

    • Headers

      Key-value pairs that are added to a custom map on the clientContext object. The clientContext object is in turn a value on the invocation context object. If the following attributes exist, they are automatically set on the context object:

      • ININ-Organization-Id
      • ININ-Home-Organization-Id
      • ININ-Correlation-Id
      • ININ-User-Id
      • ININ-Integration-Id

      For a Java example of the clientContext object, see Interface ClientContext

    • Request Template

      Any values that you specify under Request Template will be available in the event parameter of the invoked AWS Lambda function.

    • Request URL Template

      Set Request URL Template to the location of the Google Cloud Function that you want the data action to execute: https://cloudfunctions.googleapis.com/v1/projects/{project-owning-function}/locations/{location-of-function}/functions/{function-name}:call

    • Request Type

      Set Request Type to POST.

    • Request Template

      Set Request Template to { \”data\”: \”$esc.jsonString(${input.rawRequest})\” }. The Google Cloud Function call method expects an attribute named data that has the stringified JSON of your parameters. $esc.jsonString() takes the raw request and escapes it correctly for the JSON function. 

      Note: You can replace ${input.rawRequest} with properly formatted JSON that will be stringified.

    For a detailed explanation of the parts of the request, see Request configuration for data actions.


    People knowledgeable about JSON can use the JSON input option. Use requests in other actions or the following example as a guide for creating the JSON.

    {
      "requestUrlTemplate": "https://www.example.com/health/check/services/${input.service}",
      "requestType": "GET",
      "headers": {},
      "requestTemplate": "${input.rawRequest}"
    }


  • 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, 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.