{
  "website": {
    "website_url": "https://www.ups.com/sa/en/home",
    "invoice_url": "https://billing.ups.com/ups/billing/invoice",
    "plan_url": "https://billing.ups.com/ups/billing/plan",
    "login_steps": [
      {
        "action": "navigate",
        "value": "https://www.ups.com/sa/en/home"
      },
      {
        "action": "click",
        "selector": ".user-profile-container > a"
      },
      {
        "action": "wait",
        "ms": 3000
      },
      {
        "action": "type",
        "selector": "input[name=username]",
        "value": "{USERNAME}"
      },
      {
        "action": "click",
        "selector": "button[type='submit']"
      },
      {
        "action": "wait",
        "ms": 2000
      },
      {
        "action": "type",
        "selector": "input[name=password]",
        "value": "{PASSWORD}"
      },
      {
        "action": "click",
        "selector": "button[type='submit']"
      },
      {
        "action": "wait",
        "ms": 4000
      }
    ],
    "otp": {
      "selector": "#otp",
      "teams_message": "Invoice Agent requires an OTP to complete login. Please reply with the code.",
      "timeout_seconds": 0,
      "retry_count": 3,
      "mode_note": "OTP Timeout has been removed; the agent will wait indefinitely for your input. MODE A is used when teams_tenant_id + teams_client_id + teams_client_secret are all filled in.",
      "teams_tenant_id": "",
      "teams_client_id": "",
      "teams_client_secret": "",
      "teams_team_id": "",
      "teams_channel_id": "",
      "teams_chat_id": "",
      "teams_webhook_url": ""
    },
    "success_url_contains": "billing"
  },
  "credentials": {
    "USERNAME": "your_portal_email@example.com",
    "PASSWORD": "your_portal_password",
    "outlook_email": "your_outlook_email@example.com",
    "outlook_password": "your_outlook_password"
  },
  "download": {
    "local_download_path": "downloads/Invoices",
    "batch_size": 10,
    "duplicate_handling": "overwrite",
    "file_types": [
      "pdf",
      "csv"
    ]
  },
  "clients": [
    {
      "name": "ClientA",
      "destination": "ONE_DRIVE",
      "onedrive": {
        "client_id": "YOUR_CLIENT_ID",
        "client_secret": "YOUR_CLIENT_SECRET",
        "tenant_id": "YOUR_TENANT_ID"
      },
      "folder_structure": {
        "root_path": "Invoices",
        "parent_folder": "{YYYY}_{MM}_{DD}",
        "structure": "{invoice_id}"
      },
      "file_naming": "{invoice_id}.{ext}",
      "duplicate_handling": "overwrite"
    },
    {
      "name": "ClientB",
      "destination": "ONE_DRIVE",
      "onedrive": {
        "client_id": "YOUR_CLIENT_ID_B",
        "client_secret": "YOUR_CLIENT_SECRET_B",
        "tenant_id": "YOUR_TENANT_ID_B"
      },
      "folder_structure": {
        "root_path": "ClientBData",
        "parent_folder": "Batch_{YYYY}_{MM}",
        "structure": "{invoice_id}/docs"
      },
      "file_naming": "{invoice_id}_{date}_INV.{ext}",
      "duplicate_handling": "overwrite"
    }
  ]
}