sym.sdk.templates.step.get_step_output(step: Optional[sym.sdk.templates.approval.ApprovalTemplateStep] = None) dict

Returns the output returned by the specified step (or the current step if no step is specified).

For Lambda flows, this method can be used in after_escalate and after_deescalate hooks to retrieve responses from the lambda.

For example:

def after_escalate(evt):
    escalate_output = get_step_output()

For custom Strategies, this method can be used in deescalate() to retrieve the output from the corresponding escalation by specifying the ApprovalTemplateStep.ESCALATE step:

def deescalate(self, target_id, event):
    escalate_output = get_step_output(ApprovalTemplateStep.ESCALATE)
    escalation_id = escalate_output["id"]

step – The step for which to retrieve output. If None or omitted, returns the output for the current step.