Gå till innehållet

RCS-meddelanden

RCS (Rich Communication Services) är nästa generation av meddelanden för Android-enheter, som erbjuder rich media, interaktivitet och avancerade funktioner utöver traditionella SMS.

Översikt

RCS ger förbättrade meddelandefunktioner:

  • Rich media (bilder, videor, GIF)
  • Interaktiva knappar och karuseller
  • Läs kvitton och skrivindikatorer
  • Högre teckengränser (upp till 3072 tecken)
  • Bättre leveransspårning
  • Märkesmärkt avsändaridentifikation

Tillgänglighet

  • Plattform: Endast Android-enheter
  • Nätverk: Kräver stöd för operatörens RCS
  • Fallback: Går automatiskt tillbaka till SMS om RCS inte är tillgängligt

Grundläggande RCS-meddelande

RCS-exempel

Begäran

{
  "from": "YourBrand",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Your RCS message text with rich formatting"
}

Parametrar

Parameter Skriv Krävs Beskrivning
från sträng Ja Alfanumeriskt avsändar-ID
till sträng Ja Mottagarens telefonnummer (E.164)
typ sträng Ja Ställ in på "rcs"
text sträng Ja Meddelandeinnehåll (upp till 3072 tecken)
meddelandeData objekt Nej Rich media och knappar

Meddelandetyper

Endast text

Enkelt textmeddelande med utökad teckenbegränsning:

{
  "from": "YourBrand",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Welcome to our service! RCS allows us to send much longer messages with rich formatting and interactive elements."
}

Text + Bild

{
  "from": "YourBrand",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Check out our new product!",
  "messageData": {
    "media": {
      "url": "https://example.com/product.jpg",
      "type": "image/jpeg",
      "height": 600,
      "width": 800
    }
  }
}

Text + Bild + Knapp

{
  "from": "YourStore",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Summer Sale - Up to 50% off!",
  "messageData": {
    "media": {
      "url": "https://example.com/sale-banner.jpg",
      "type": "image/jpeg"
    },
    "buttons": [
      {
        "text": "Shop Now",
        "action": {
          "type": "openUrl",
          "url": "https://example.com/sale"
        }
      }
    ]
  }
}

Text + Video

{
  "from": "YourBrand",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Watch our product demo",
  "messageData": {
    "media": {
      "url": "https://example.com/demo.mp4",
      "type": "video/mp4",
      "thumbnail": "https://example.com/thumbnail.jpg"
    }
  }
}

Text + Flera knappar

{
  "from": "YourService",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Your order #12345 is ready for pickup",
  "messageData": {
    "buttons": [
      {
        "text": "Track Order",
        "action": {
          "type": "openUrl",
          "url": "https://example.com/track/12345"
        }
      },
      {
        "text": "Contact Support",
        "action": {
          "type": "dial",
          "phoneNumber": "+380XXXXXXXXX"
        }
      },
      {
        "text": "Cancel Order",
        "action": {
          "type": "openUrl",
          "url": "https://example.com/cancel/12345"
        }
      }
    ]
  }
}

RCS-karusell

Visa flera objekt i en rullningsbar karusell:

{
  "from": "YourStore",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Featured Products",
  "messageData": {
    "carousel": {
      "cards": [
        {
          "title": "Product A",
          "description": "Premium quality product",
          "media": {
            "url": "https://example.com/product-a.jpg",
            "type": "image/jpeg"
          },
          "buttons": [
            {
              "text": "Buy Now",
              "action": {
                "type": "openUrl",
                "url": "https://example.com/product-a"
              }
            },
            {
              "text": "Details",
              "action": {
                "type": "openUrl",
                "url": "https://example.com/product-a/details"
              }
            }
          ]
        },
        {
          "title": "Product B",
          "description": "Best seller",
          "media": {
            "url": "https://example.com/product-b.jpg",
            "type": "image/jpeg"
          },
          "buttons": [
            {
              "text": "Buy Now",
              "action": {
                "type": "openUrl",
                "url": "https://example.com/product-b"
              }
            }
          ]
        }
      ]
    }
  }
}

Knappåtgärder

Öppna URL

{
  "text": "Visit Website",
  "action": {
    "type": "openUrl",
    "url": "https://example.com"
  }
}

Slå telefonnummer

{
  "text": "Call Us",
  "action": {
    "type": "dial",
    "phoneNumber": "+380XXXXXXXXX"
  }
}

Skicka plats

{
  "text": "Share Location",
  "action": {
    "type": "shareLocation"
  }
}

Kalenderhändelse

{
  "text": "Add to Calendar",
  "action": {
    "type": "createCalendarEvent",
    "title": "Appointment",
    "startTime": "2025-01-25T14:00:00Z",
    "endTime": "2025-01-25T15:00:00Z"
  }
}

Mediespecifikationer

Bilder

  • Format: JPEG, PNG, GIF
  • Max storlek: 2MB
  • Rekommenderad upplösning: 800x600 eller 1200x800
  • Bildförhållande: 16:9 eller 4:3

Videor

  • Format: MP4, 3GP
  • Max storlek: 10 MB
  • Max längd: 2 minuter
  • Rekommenderad upplösning: 1280x720

Ljud

  • Format: MP3, AAC
  • Max storlek: 5MB
  • Max längd: 5 minuter

Alternativ till SMS

RCS faller automatiskt tillbaka till SMS när:

  • Mottagaren har inte RCS
  • RCS är inaktiverat på mottagarenheten
  • Nätverket stöder inte RCS
{
  "from": "YourBrand",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Check out our new product!",
  "messageData": {
    "media": {
      "url": "https://example.com/product.jpg",
      "type": "image/jpeg"
    },
    "buttons": [
      {
        "text": "Shop Now",
        "action": {
          "type": "openUrl",
          "url": "https://example.com/shop"
        }
      }
    ]
  },
  "fallback": {
    "type": "sms",
    "text": "Check out our new product! Visit: https://example.com/shop"
  }
}

Användningsfall

E-handel

{
  "from": "YourStore",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Your order has been shipped!",
  "messageData": {
    "media": {
      "url": "https://example.com/package.jpg",
      "type": "image/jpeg"
    },
    "buttons": [
      {
        "text": "Track Package",
        "action": {
          "type": "openUrl",
          "url": "https://example.com/track/ABC123"
        }
      },
      {
        "text": "Contact Support",
        "action": {
          "type": "dial",
          "phoneNumber": "+380XXXXXXXXX"
        }
      }
    ]
  }
}

Bankverksamhet

{
  "from": "YourBank",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Low balance alert: Your account balance is $50",
  "messageData": {
    "buttons": [
      {
        "text": "View Balance",
        "action": {
          "type": "openUrl",
          "url": "https://bank.example.com/balance"
        }
      },
      {
        "text": "Transfer Money",
        "action": {
          "type": "openUrl",
          "url": "https://bank.example.com/transfer"
        }
      }
    ]
  }
}

Resa

{
  "from": "YourAirline",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Your flight is departing in 3 hours",
  "messageData": {
    "media": {
      "url": "https://example.com/boarding-pass.jpg",
      "type": "image/jpeg"
    },
    "buttons": [
      {
        "text": "Check-in",
        "action": {
          "type": "openUrl",
          "url": "https://airline.example.com/checkin"
        }
      },
      {
        "text": "Add to Calendar",
        "action": {
          "type": "createCalendarEvent",
          "title": "Flight Departure",
          "startTime": "2025-01-25T10:00:00Z"
        }
      }
    ]
  }
}

Bästa metoder

Innehåll

  • ✅ Använd bilder av hög kvalitet (minst 800x600)
  • ✅ Håll knapptexten kort (2-3 ord)
  • ✅ Tillhandahåll SMS-backup för rikt innehåll
  • ✅ Testa på olika Android-enheter
  • ❌ Överskrid inte 4-5 knappar per meddelande
  • ❌ Undvik stora videofiler (>5MB)

Media

  • Använd HTTPS-URL:er för alla media
  • Optimera bilder för mobilen
  • Inkludera alternativ text för tillgänglighet
  • Testa media-URL:er innan du skickar

Knappar

  • Max 4 knappar per meddelande
  • Tydlig uppmaningstext
  • Testa alla knappåtgärder
  • Överväg reserv för otillgängliga åtgärder

Varumärke

  • Använd konsekvent avsändar-ID
  • Inkludera varumärkeslogotyp där så är lämpligt
  • Behåll varumärkets röst och ton
  • Säkerställ visuell konsekvens

Leveransstatus

RCS tillhandahåller förbättrad leveransspårning:

  • Skickat: Meddelande skickat till operatören
  • Levererat: Meddelande levererat till enheten
  • Läs: Meddelande öppnat av mottagaren
  • Misslyckades: Leverans misslyckades, reserv utlöstes

Kontrollera status med hjälp av statusslutpunkt.

Nästa steg