> ## Documentation Index
> Fetch the complete documentation index at: https://docs.y.uno/llms.txt
> Use this file to discover all available pages before exploring further.

# Initiate Recovery Outreach for Abandoned User Flows

This endpoint allows merchants to notify Yuno's Recovery Agent when a user abandons their purchase flow, such as during product selection or after initiating checkout, before completing a payment. The submitted data enables Yuno to follow up with the user via call or WhatsApp to encourage completion of the transaction.

## Security and compliance

* **Authentication**: API access requires a valid API key provided in the request headers.

* **Data Protection**: All data must be transmitted over HTTPS. Yuno adheres to relevant data protection regulations, including **GDPR** and **LGPD**.

* **Data Usage**: Submitted data will be used solely for the purpose of customer engagement and will not be stored beyond the necessary duration.

<Note>
  **Use Case Example**

  A user named Jane Doe adds a pair of wireless headphones to her cart on a merchant's website but abandons the checkout process. The merchant's system detects this and sends the relevant payload to Yuno’s Recovery Agent API. Yuno then initiates a WhatsApp message to Jane, reminding her of the items left in her cart and offering assistance to complete the purchase.
</Note>


## OpenAPI

````yaml openapi/ai-caller/initiate-recovery-outreach-for-abandoned-user-flows.json POST /smart-support/external/payments
openapi: 3.0.0
info:
  title: AI Caller
  description: >-
    API for initiating large-scale processing of calls and WhatsApp messages
    related to declined payments and abandoned user flows.
  version: 1.0.0
servers:
  - url: https://api-sandbox.y.uno/v1
    description: Production server
security:
  - public_api_key: []
    private_secret_key: []
tags:
  - name: AI Caller
    description: Operations related to user accounts
paths:
  /smart-support/external/payments:
    post:
      tags:
        - AI Caller
      summary: Initiate Recovery Outreach for Abandoned User Flows
      operationId: initiate-recovery-outreach-for-abandoned-user-flows
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecoveryOutreachRequest'
            examples:
              recoveryOutreachExample:
                summary: Example Recovery Outreach Request (USA)
                value:
                  customer:
                    full_name: Robert Johnson
                    phone_number: '+12125550103'
                    email: robert.johnson@example.com
                    country_code: US
                    language: en
                  session:
                    abandonment_timestamp: '2025-05-13T22:45:00Z'
                    flow_stage: cart_review
                    platform: ios
                    session_id: sess_def456uvw
                  cart:
                    total_value: 29.99
                    currency: USD
                    items:
                      - name: Bluetooth Speaker
                        sku: BSPEAKER-PRO
                        quantity: 1
                        price: 29.99
                  engagement:
                    preferred_channel: whatsapp
                    reason: user_abandoned_cart
                    metadata:
                      utm_campaign: summer_promo
                      last_clicked_button: Continue Shopping
      responses:
        '200':
          description: Successfully initiated recovery outreach.
        '400':
          description: Invalid request payload or validation error.
        '401':
          description: Unauthorized - missing or invalid API key.
        '500':
          description: Internal server error.
components:
  schemas:
    RecoveryOutreachRequest:
      type: object
      required:
        - customer
        - session
      properties:
        customer:
          $ref: '#/components/schemas/Customer'
        session:
          $ref: '#/components/schemas/Session'
        cart:
          $ref: '#/components/schemas/Cart'
        engagement:
          $ref: '#/components/schemas/Engagement'
    Customer:
      type: object
      required:
        - full_name
        - phone_number
        - country_code
      properties:
        full_name:
          type: string
          description: Customer's full name.
          example: Jane Doe
        phone_number:
          type: string
          description: Customer's phone number in E.164 format.
          example: '+573001234567'
        email:
          type: string
          format: email
          description: Customer's email address.
          example: jane.doe@example.com
        country_code:
          type: string
          description: ISO 3166-1 alpha-2 country code (e.g., "CO").
          example: CO
        language:
          type: string
          description: Preferred language for communication (e.g., "es", "en").
          example: es
    Session:
      type: object
      required:
        - abandonment_timestamp
        - flow_stage
        - platform
      properties:
        abandonment_timestamp:
          type: string
          format: date-time
          description: Timestamp when the user abandoned the flow.
          example: '2025-05-13T22:45:00Z'
        flow_stage:
          type: string
          description: Stage where the user dropped off.
          enum:
            - product_selection
            - cart_review
            - checkout
            - payment
          example: checkout
        platform:
          type: string
          description: User's platform.
          enum:
            - web
            - ios
            - android
          example: web
        session_id:
          type: string
          description: Unique identifier for the user's session.
          example: sess_abc123xyz
    Cart:
      type: object
      properties:
        total_value:
          type: number
          format: float
          description: Total value of the cart.
          example: 149.99
        currency:
          type: string
          description: Currency code (e.g., "COP").
          example: COP
        items:
          type: array
          description: List of items in the cart.
          items:
            $ref: '#/components/schemas/CartItem'
    Engagement:
      type: object
      properties:
        preferred_channel:
          type: string
          description: Preferred communication channel.
          enum:
            - call
            - whatsapp
            - auto
          default: auto
          example: auto
        reason:
          type: string
          description: Reason for abandonment, if known.
          example: user_abandoned_checkout
        metadata:
          type: object
          description: >-
            Additional contextual information (e.g., UTM parameters, last user
            actions).
          example:
            utm_campaign: spring_sale
            last_clicked_button: Proceed to Payment
    CartItem:
      type: object
      properties:
        name:
          type: string
          description: Item name.
          example: Wireless Headphones
        sku:
          type: string
          description: Stock Keeping Unit identifier.
          example: WH-1000XM5
        quantity:
          type: integer
          description: Number of units.
          example: 1
        price:
          type: number
          format: float
          description: Price per unit.
          example: 149.99
  securitySchemes:
    public_api_key:
      type: apiKey
      in: header
      name: public-api-key
      description: |
        Example: `<Your public-api-key>`
    private_secret_key:
      type: apiKey
      in: header
      name: private-secret-key
      description: |
        Example: `<Your private-secret-key>`      

````