Loading...
Loading...
Loading...
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.
Enter information for the fields that appear. The fields that appear vary depending on the HTTP method selected and the contracts added.
Set the Request URL Template to the remote endpoint that your HTTP request hits.
Key-value pairs that are added as HTTP headers on the request that is sent to the remote endpoint.
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?.
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.
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.
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 (1st gen) vary from the standard request configuration for web services.
Set the Request URL Template to the ARN of your AWS Lambda function. For more information, see Create IAM resources to invoke AWS Lambda functions.
Set Request Type to POST. This HTTP method ensures that the action sends any request body with the request configuration.
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:
For a Java example of the clientContext object, see Interface ClientContext.
Any values that you specify under Request Template will be available in the event parameter of the invoked AWS Lambda function.
Set the Request URL Template to the remote endpoint that your HTTP request hits.
Set Request Type to POST. This HTTP method ensures that the action sends any request body with the request configuration.
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:
For a Java example of the clientContext object, see Interface ClientContext.
Any values that you specify under Request Template will be available in the event parameter of the invoked AWS Lambda function. The clientContext has length limits and cannot be used to pass certificates required for Genesys Cloud Function data actions. To include the certificates configured in credentials, use the body of the request template, which has no size restrictions.
Set the Request URL Template to the location of the Google Cloud Function (1st gen) that you want the data action to execute: https://{location-of-function}-{project-owning-function}/{function-name}.
Set Request Type to POST.
Set Request Template to ${input.rawRequest}.
Set the Request URL Template to the location of the Google Cloud Run Function that you want the data action to execute: https://{function-name}.{location-of-function}.run.app/.
Set Request Type to POST.
Set Request Template to ${input.rawRequest}.
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.
{
"translationMap": {
"buildNumber": "$.Build-Version",
"serviceName": "$.name",
"status": "$.Status"
},
"successTemplate": "{rn t"build": ${buildNumber},rn t"name": ${serviceName},rn"status": ${status}rn }"
}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.
Get user feedback about articles.