Logic: Lambda
This reference explains the Logic: Lambda task.
The Lambda task feeds data in the workflow payload into a predefined AWS Lambda function, triggers the function, and fetches the data in the result when the function completes. A Lambda function is a piece of AWS Lambda code that processes the data in the payload and returns the results to the workflow.
The Lambda task is in Limited Availability. If you wish to enable this task, submit a request at Zuora Global Support.
The Lambda task provides endless possibilities of what you can achieve and greatly extends the use scenarios of Workflow. For example, you can automate product price adjustments based on regional labor cost inflation by parsing data from source websites with the Beautiful Soup library in Python.
Zuora does not support debugging the Lambda codes developed by Zuora customers. All Lambda functions should include complete error handling logic so that errors can be captured in Workflow API calls. This is important for troubleshooting. For more information about how to debug your code with the logs, see Monitor and troubleshoot a workflow.
Before you add a Lambda task, ensure that:
You have access to the Lambda task in Workflow.
You have built a Lambda function. You can start with the Lambda starter package that is provided in the custom code upload window. To learn about where to download the starter package, see step 3 in Upload a Lambda function in a workflow. To learn about implementation details and use cases of AWS Lambda, see the AWS Lambda introduction.
You have uploaded your Lambda function to Workflow. To learn about how to upload your Lambda function, see Upload a Lambda function to a workflow.
Task settings
You need to select a function to run from the list of uploaded Lambda functions for your organization.
AWS Lambda function only returns the last 4 KB of the execution log in the response, which means the Log Result response section will be truncated if it is larger than 4 KB.