Tango · Arazzo Workflow

Tango Place Reward Order

Version 1.0.0

Select a brand from the catalog, place a reward order for it, and confirm the order.

1 workflow 1 source API 1 provider
View Spec View on GitHub Catalog ManagementDigital RewardsGift CardsIncentivesLoyaltyRewards As A ServiceArazzoWorkflows

Provider

tango

Workflows

place-reward-order
Read the catalog, place a reward order, and confirm it.
Fetches the reward catalog for reference, places an order for the supplied product UTID against a funding account, and confirms the resulting order.
3 steps inputs: accountIdentifier, amount, customerIdentifier, message, recipientEmail, recipientName, senderEmail, senderName, utid outputs: lineItems, orderStatus, referenceOrderID
1
readCatalog
getCatalog
Retrieve the full digital reward catalog so the chosen product UTID can be validated against available brands.
2
placeOrder
createOrder
Place a reward order for the chosen product, deducting its value from the funding account and delivering the reward to the recipient.
3
confirmOrder
getOrder
Read the order back by reference id to confirm its status and capture the resulting line items.

Source API Descriptions

Arazzo Workflow Specification

tango-place-reward-order-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Tango Place Reward Order
  summary: Select a brand from the catalog, place a reward order for it, and confirm the order.
  description: >-
    The core reward-sending pattern. The workflow pulls the full digital reward
    catalog, places a reward order against a funding account for a chosen product
    UTID delivered to a recipient, and then reads the order back by its reference
    id to confirm fulfillment. Every step spells out its request inline so the
    flow can be read and executed without opening the underlying OpenAPI
    description. Authentication uses the platform's HTTP Basic credentials
    declared by the basicAuth security scheme; those credentials are applied at
    the transport layer and are not request parameters.
  version: 1.0.0
sourceDescriptions:
- name: tangoRaasApi
  url: ../openapi/tango-raas-api-openapi.yml
  type: openapi
workflows:
- workflowId: place-reward-order
  summary: Read the catalog, place a reward order, and confirm it.
  description: >-
    Fetches the reward catalog for reference, places an order for the supplied
    product UTID against a funding account, and confirms the resulting order.
  inputs:
    type: object
    required:
    - customerIdentifier
    - accountIdentifier
    - amount
    - utid
    - recipientName
    - recipientEmail
    - senderName
    - senderEmail
    properties:
      customerIdentifier:
        type: string
        description: Customer that owns the funding account.
      accountIdentifier:
        type: string
        description: Account whose balance funds the reward.
      amount:
        type: number
        description: Value of the reward in the account currency.
      utid:
        type: string
        description: Universal Token ID of the reward product to send.
      recipientName:
        type: string
        description: Name of the reward recipient.
      recipientEmail:
        type: string
        description: Email address of the reward recipient.
      senderName:
        type: string
        description: Name of the reward sender.
      senderEmail:
        type: string
        description: Email address of the reward sender.
      message:
        type: string
        description: Optional custom message to include with the reward.
        default: ""
  steps:
  - stepId: readCatalog
    description: >-
      Retrieve the full digital reward catalog so the chosen product UTID can be
      validated against available brands.
    operationId: getCatalog
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      brands: $response.body#/brands
  - stepId: placeOrder
    description: >-
      Place a reward order for the chosen product, deducting its value from the
      funding account and delivering the reward to the recipient.
    operationId: createOrder
    requestBody:
      contentType: application/json
      payload:
        customerIdentifier: $inputs.customerIdentifier
        accountIdentifier: $inputs.accountIdentifier
        amount: $inputs.amount
        utid: $inputs.utid
        recipient:
          name: $inputs.recipientName
          email: $inputs.recipientEmail
        sender:
          name: $inputs.senderName
          email: $inputs.senderEmail
        message: $inputs.message
        sendEmail: true
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      referenceOrderID: $response.body#/referenceOrderID
      orderStatus: $response.body#/status
  - stepId: confirmOrder
    description: >-
      Read the order back by reference id to confirm its status and capture the
      resulting line items.
    operationId: getOrder
    parameters:
    - name: referenceOrderID
      in: path
      value: $steps.placeOrder.outputs.referenceOrderID
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      referenceOrderID: $response.body#/referenceOrderID
      orderStatus: $response.body#/status
      lineItems: $response.body#/lineItems
  outputs:
    referenceOrderID: $steps.confirmOrder.outputs.referenceOrderID
    orderStatus: $steps.confirmOrder.outputs.orderStatus
    lineItems: $steps.confirmOrder.outputs.lineItems