Gift Card Redemption Authentication

Gift Card Redemption - Agreement (ToS) - Subflow

The Gift Card Redemption - Agreement (ToS) - Subflow lets users read and confirm any agreement required in your environment.

Purpose

The Gift Card Redemption - Agreement (ToS) - Subflow determines whether the user needs to consent to an agreement. If so, it displays the agreement for the user and stores the user’s consent if they consent to the agreement.

Structure

This flow is divided into sections using teleport nodes:

Check if agreement form needs to be displayed

Uses comparison nodes to check if agreement is enabled in the environment and if agreement is necessary for the current user. If so, a PingOne node checks the user’s consent status.

If consent isn’t present, the flow progresses to the Present & Accept Agreement section.

If consent is present, a function node checks if a success message should be displayed. The flow progresses to the Present & Accept Agreement if a success message should be displayed, and to the Return Success section if a success message should not be displayed.

Present & Accept Agreement

Uses a PingOne node to retrieve the required agreement, then presents the user with an HTML page. If the user has not yet agreed, this page lets them review and accept or decline the agreemnt. If the user has agreed, the form displays a success message.

If the user accepts the agreement, a PingOne node stores the user’s agreement. The flow then returns to the beginning of the Present & Accept Agreement section if a success message should be displayed, and to the Return Success section if a success message should not be displayed.

If the user declines the agreement, an error message displays.

Return Success

Sends a success JSON response, indicating that the flow has completed successfully.

Return Error

Uses a function node to enrich the error details, then sends an error JSON response indicating that the flow completed unsuccessfully.

Input schema

This flow has the following inputs.

Input name Required Description

p1UserId

Yes

The current user’s PingOne user ID.

agreementId

Yes

The ID of the agreement to present to the user.

checkRequired

Yes

Indicates whether the flow should check for existing consent before presenting the agreement.

agreementEnabled

No

Indicates whether the agreement is required.

showSuccessMessage

No

Indicates whether a success message should be displayed after the user accepts the agreement.

Output schema

This flow has the following outputs.

Output Name Description

subflowResult

The result status of the flow.

errorMessage

The error message to pass to the parent flow.

errorDetails

The details of the error that occurred.

Variables and parameters

This flow uses the following variable or parameter values.

Parameter name Description

p1UserId

The current user’s PingOne user ID.

agreementId

The ID of the agreement to present to the user.

checkRequired

Indicates whether the flow should check for existing consent before presenting the agreement.

agreementEnabled

Indicates whether the agreement is required.

showSuccessMessage

Indicates whether a success message should be displayed after the user accepts the agreement.