Legacy Dev Forum Posts

 View Only

Sign Up

DataAction - can we use input variable into TranslationMap condition

  • 1.  DataAction - can we use input variable into TranslationMap condition

    Posted 06-05-2025 18:45

    kalakshmanakumar | 2024-02-26 11:02:24 UTC | #1

    Hello folks,

    Is it possible to use input variable into TranslationMap field filter / condition in DataAction. Here i have provided sample json

    { "name": "InteractedTimeforGivenUser_v1", "integrationType": "purecloud-data-actions", "actionType": "custom", "config": { "request": { "requestUrlTemplate": "/api/v2/conversations/${input.conversationId}", "requestType": "GET", "headers": {}, "requestTemplate": "${input.rawRequest}" }, "response": { "translationMap": { "LastAgentInteractedStartTime": "*$.participants[?(@.purpose=='agent' && @.userId=${input.UserId})].calls[].segments[?(@.type == 'Interact')].startTime", "LastAgentInteractedEndTime": "$.participants[?(@.purpose=='agent' && @.userId=${input.UserId})].calls[].segments[?(@.type == 'Interact')].endTime*" }, "translationMapDefaults": { "LastAgentInteractedStartTime":"[]", "LastAgentInteractedEndTime":"[]"

    }, "successTemplate": "{ \"LastAgentInteractedStartTime\":${LastAgentInteractedStartTime}, \"LastAgentInteractedEndTime\":${LastAgentInteractedEndTime}}" } }, "contract": { "input": { "inputSchema": { "title": "Input", "type": "object", "properties": { "conversationId": { "type": "string" }, "UserId": { "type": "string" } }, "additionalProperties": true } }, "output": { "successSchema": { "title": "Output", "type": "object", "properties": { "LastAgentInteractedStartTime": { "type": "array", "items": {"title": "Item 1","type": "string"} }, "LastAgentInteractedEndTime": { "type": "array", "items": {"title": "Item 1","type": "string"} }, }, "additionalProperties": true } } }, "secure": false }

    Thanks for your response


    Jerome.Saint-Marc | 2024-02-26 13:46:57 UTC | #2

    Hello,

    No, it is not possible to leverage an input parameter (of the data action) in the translationMap.

    Regards,


    Jason_Mathison | 2024-02-26 15:07:49 UTC | #3

    You can vote for this feature here: https://genesyscloud.ideas.aha.io/ideas/OTB-I-224

    We are aware that this issue is impacting a lot of people, but voting for it definitely helps us give it extra priority.

    --Jason


    system | 2024-03-28 15:08:07 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: 24867