Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Custom Data Action Timeout?

    Posted 08-12-2018 10:12
    No replies, thread closed.
    Hello Community,

    Is there any timeout setting for custom data actions?

    I am trying to test a data action which is working fine with post man but when I test it within purecloud it shows a notificaiuton,.

    Error running action test

    with following JSON in output
    { "message": "The request timed out.", "contextId": "1b4389b4-73e4-4859-849f-00a75c3784c9"}
    Whereas the web service which I am calling received request and processed successfully. In fact this error in PureCloud is shown exactly the same time request is processed from web service side. 


    Following are the sections of my data action.

    Input Contract

    {
    "$schema": "SCHEMA URL",
    "type": "object",
    "required": [
    "cardType",
    "cardNumber",
    "cardExpiry",
    "cardSecurityCode",
    "token"
    ],
    "properties": {
    "cardSecurityCode": {
    "type": "string"
    },
    "cardExpiry": {
    "type": "string"
    },
    "cardType": {
    "type": "string"
    },
    "cardNumber": {
    "type": "string"
    },
    "token": {
    "type": "string"
    }
    }
    }

    Output Contract

    {
    "$schema": "SCHEMA URL",
    "type": "object",
    "required": [
    "success",
    "message",
    "isOTPRequired"
    ],
    "properties": {
    "isOTPRequired": {
    "type": "string"
    },
    "success": {
    "type": "string"
    },
    "message": {
    "type": "string"
    }
    }
    }

    Request

    {
    "requestUrlTemplate": "ENDPOINT URL",
    "requestType": "POST",
    "headers": {
    "Content-Type": "application/json",
    "clientID": "CallCenterIVR",
    "Authorization": "${input.token}",
    "Transfer-Encoding": "buffered"
    },
    "requestTemplate": "{\r\n "systemId": "CallCenterIVR",\r\n "entityId": "GF7R68",\r\n "paymentId": "43533790",\r\n "sessionId" : "XXXXXXf",\r\n "paymentMethod" : "CARD", \r\n "currency": "INR",\r\n "amount": "10.0",\r\n "requestType": "TRAVEL",\r\n "cardDetails": {\r\n "cardType": "${input.cardType}",\r\n "cardNumber": "${input.cardNumber}",\r\n "cardExpiry": "${input.cardExpiry}",\r\n "cardSecurityCode": "${input.cardSecurityCode}"\r\n },\r\n "billTo": {\r\n "firstName": "asdwe",\r\n "lastName": "iopipo",\r\n "street": "vcbnvn",\r\n "city": "erte",\r\n "state": null,\r\n "postalCode": null,\r\n "country": "AQ",\r\n "emailId": "test@test.com"\r\n }\r\n}"
    }

    Response

    {
    "translationMap": {
    "_success": "$.success",
    "_message": "$.message",
    "_isOTPRequired": "$.isOTPRequired"
    },
    "successTemplate": "{\r\n "success": "${_success}",\r\n "message": "${_message}",\r\n "isOTPRequired": "${_isOTPRequired}"\r\n}"
    }




    ------------------------------
    Cheers,
    Sajid Abbas Malek
    Al-Futtaim Technologies -
    ------------------------------


  • 2.  RE: Custom Data Action Timeout?

    Posted 08-13-2018 11:44
    No replies, thread closed.
    Unfortunately you are hitting a timeout from the purecloud api when it calls the microservice that executes your data action.  If you hadn't you would have gotten this failure:

    Transform failed to process result using 'successTemplate' template due to error:'Unexpected character ('t' (code 116)): was expecting comma to separate Object entries
    at [Source: (String)"{
    "success": "true",
    "message": "Approved",
    "isOTPRequired": ""false""
    }"; line: 2, column: 19]'
    Template:'{
    "success": "${_success}",
    "message": "${_message}",
    "isOTPRequired": "${_isOTPRequired}"
    }'

    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



  • 3.  RE: Custom Data Action Timeout?

    Posted 08-14-2018 04:38
    No replies, thread closed.
    Thanks Melissa, 

    Can you suggest some workaround? Should I publish this without testing and try integrating in a flow and see how does it behave? May be timeout only affects the testing data action mechanism?

    OR 

    We just drop the idea of using web service data action and move to bridge data actions? But this approach carries lot of overhead.


    Because this is a payment web service and it is expected to take some time.

    ------------------------------
    Cheers,
    Sajid Abbas Malek
    Al-Futtaim Technologies -
    ------------------------------



  • 4.  RE: Custom Data Action Timeout?

    Posted 08-14-2018 08:02
    No replies, thread closed.

    Data actions have slightly different behaviors in test mode and their normal operation.  Test mode runs through public API, which has a default timeout of 10 seconds.  Normal operation in the IVR has a maximum timeout of 60 seconds (although you can shorten this using the timeout setting in the flow); moving to a bridge action is not going to adjust this maximum timeout in the IVR, as that timeout is one imposed by AWS gateways, and is generally the global maximum for synchronous web service operations on AWS infrastructure.  

    It's worth keeping in mind that your caller will be hearing blank audio for the duration of your web service operation in the IVR, so long running calls are not desirable.  While you can certainly publish the action and test it live in the IVR, if that call is going to routinely run longer than 10 seconds, you may want to examine that web service to see if there are better alternatives that are going to run faster.



    ------------------------------
    Richard Schott
    Genesys - Employees
    ------------------------------