Create Tango Card reward order from Workato Service

Recipe ToolsData ParserMarketingUtilities

What it does

When Workato Service receives a process_reward call with complete reward details, this automation searches Tango Card for a matching order to prevent duplicates. If none exists, it creates the order and notifies the team if an error occurs.

Who it's for

Finance teams who process rewards through Tango Card and need to prevent duplicate orders from being created.

How teams use this

Prevent duplicate reward orders

Check the external reference ID before creating an order so the same reward is never processed twice. This keeps the reward ledger accurate and prevents billing issues.

Notify the team of order failures

When Tango Card returns an error code, stop the automation and alert the team so they can resolve the issue before the reward is lost.

Log all reward transactions

Add a step to record each order creation and error in a database so the team can audit reward history and track which orders succeeded or failed.

Route errors by error code

Check the error code and route different failures to different teams, such as billing errors to Finance and system errors to Operations, so each team handles their domain.

How it works

  1. Receive process_reward call. Workato Service receives a real-time call to process_reward with all the information needed to create a reward order, including the external reference ID for tracking.
  2. Search for matching order. Search Tango Card for an order with the same external reference ID to check if this reward has already been processed and prevent a duplicate from being created.
  3. Create the reward order. If no matching order was found in Tango Card, create a new order with the reward details from the process_reward call so the reward is issued to the recipient.
  4. Parse the error response. Parse the response from Tango Card to extract the error code if the order creation failed so the team knows what went wrong.
  5. Stop and notify on error. If an error occurred, stop the automation and send a notification so the team can investigate the failed reward order before the recipient misses their reward.