Genesys Cloud - Main

 View Only

Discussion Thread View
  • 1.  Whatsapp Template Dynamic images

    Posted 02-07-2025 14:35

    Hello Community!!!

    I was trying to send notifications to customres on Whatsapp via agentless.

    As part of this, I have registered templates on Meta which includes image in header.

    is there any way, I can send this header dynamically via `POST /api/v2/conversations/messages/agentless`  API. 

    I am able to send body and button params dynamically but not image URL. Is there any hack ?


    #Outbound

    ------------------------------
    Aravind Piratla
    Chatbot Lead
    ------------------------------


  • 2.  RE: Whatsapp Template Dynamic images

    Posted 02-10-2025 12:13

    Hi Aravind,

    Someone in the community might be able to help, but I would also recommend asking this question in the Genesys Cloud Developer Forum as they may be better placed to answer this.



    ------------------------------
    Sam Jillard
    Online Community Manager/Moderator
    Genesys - Employees
    ------------------------------



  • 3.  RE: Whatsapp Template Dynamic images

    Posted 02-11-2025 00:59

    What I understood is, we can create the template once on FB with a sample image uploaded in header.

    But in Genesys, you'll end up creating multiple templates if you need different images in the header. Feels little weird, but i see that's the only way it works today as they don't offer variables in headers.



    ------------------------------
    Aravind Piratla
    Chatbot Lead
    ------------------------------



  • 4.  RE: Whatsapp Template Dynamic images
    Best Answer

    Posted 02-11-2025 10:11

    Hey Aravind, allow me to give this a try. I think there might be a workaround here!

    Since Meta's WhatsApp API does not support dynamic image headers in templates, a better approach is to bypass template headers entirely and send a separate dynamic media message before the template.

    1. First, send the dynamic image as a media message via the POST /api/v2/conversations/messages/agentless API.
      This allows you to send any image dynamically without being restricted by template headers, and you can include a caption to provide context.
    2. Immediately after, send the pre-registered template message (without an image in the header).
      This keeps the format structured while allowing flexibility for media.

    For example:

    1. Send image dynamically:
      {
        "fromAddress": "your_whatsapp_number",
        "toAddress": "customer_whatsapp_number",
        "provider": "whatsapp",
        "media": {
          "mediaType": "image",
          "url": "https://yourserver.com/dynamic-image.jpg"
        },
        "text": "Here's the latest update for you!"
      }
    2. Send template message w/o image header:
      {
        "fromAddress": "your_whatsapp_number",
        "toAddress": "customer_whatsapp_number",
        "provider": "whatsapp",
        "text": "Hi {{1}}, your request has been processed. Let us know if you need further assistance!"
      }

    Note: Currently, Meta limits dynamic headers in templates. However, by restructuring the way media is sent, you can still create fully personalized WhatsApp messages without the need to manually generate multiple templates. If WhatsApp limitations become a blocker, consider switching the experience to Web Messaging or rich interactive cards in a bot flow. These channels fully support dynamic media content without template restrictions. Let me know what you think, Aravind! Hope this helps.



    ------------------------------
    Julie Kim
    Principal Solution Consultant
    ------------------------------



  • 5.  RE: Whatsapp Template Dynamic images

    Posted 25 days ago

    Hey Dear @Julie Kim

    I don't know if you have tried sending the media to whatsapp .. The above payload is invalid and it throws an error.. I think we need to register a template for that too. And currently docunents or media is not supported to be sent to whatsapp (correct me if I am wrong)... But the above mentioned req payload - 1 doesn't work



    ------------------------------
    Aravind Piratla
    Chatbot Lead
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources