Legacy Dev Forum Posts

 View Only

Sign Up

Apache velocity #foreach in successTemplate

  • 1.  Apache velocity #foreach in successTemplate

    Posted 06-05-2025 18:43

    Hakan_Andersson | 2021-09-29 09:32:44 UTC | #1

    Hi,

    I'm wondering if the velocity #foreach-statement is disabled in genesys cloud? I'm trying to use it to condense a few values from an array of objects in the data actions RawResponse to a single string.

    When I tested my DA I got an error stating "Template validation failed for 'config.response.successTemplate'. Details: '#foreach' directive is not allowed in templates." which is kind of a strong hint, but I thought I'd ask since the documentation at https://help.mypurecloud.com/articles/response-configuration-data-actions/ links to http://velocity.apache.org/engine/2.0/vtl-reference.html and has no information about which directives are disabled from that reference.

    Thanks,


    Jason_Mathison | 2021-09-29 13:19:30 UTC | #2

    Hi Hakan_Andersson,

    The short answer is that we did intentionally disable #foreach. I am entering a story right now for us to better document disabled velocity tools.

    --Jason


    Hakan_Andersson | 2021-09-29 13:19:16 UTC | #3

    allright, thanks for that statement! :slight_smile:

    best regards


    system | 2021-10-30 13:19:37 UTC | #4

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 12174