Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Score a direct web survey

    Posted yesterday

    We are using the 

    post /api/v2/quality/surveys to generate a direct survey link for a web message.
    Instead of displaying the URL to the customer we are using the inbound message flow to ask the customer the survey questions and obtaining the answers.
    This worked for us when creating the URL via the recording policy and adding the survey but does not seem to be working using the post /api/v2/quality/surveys
    We have tried get /api/v2/quality/surveys/scorable to retrieve the direct web survey (using the url from the post) but we are getting a 404 not found error. 
    Is there a reason we can't retrieve and score a direct web survey versus being able to via a web survey using the recording policies?

    #WebMessaging

    ------------------------------
    Patti Oaks
    Engineer
    ------------------------------


  • 2.  RE: Score a direct web survey

    Posted 23 hours ago
    Edited by Phaneendra Avatapalli 21 hours ago

    Hi Patti,

    From my understanding, the key difference may be that the surveys generated through recording policies are created as part of the normal conversation-linked survey lifecycle, which makes them retrievable/scorable through the /quality/surveys/scorable APIs.

    Whereas POST /api/v2/quality/surveys appears to generate more of a standalone direct survey URL rather than the same internally managed "scorable" survey instance.

    That may explain why:
    - the direct survey URL itself works
    - but retrieving/scoring it through /quality/surveys/scorable returns 404.

    So from my understanding, the scorable APIs may only work for surveys originating from the standard conversation/recording-policy survey flow rather than standalone direct survey creation.

    Hope this helps.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 3.  RE: Score a direct web survey

    Posted 8 minutes ago

    Hi Patti Oaks,

    I tested this flow on my side and GET /api/v2/quality/surveys/scorable worked correctly with a survey generated from POST /api/v2/quality/surveys, so direct web surveys do appear to be retrievable and scorable.

    For example, in my test I used:

    GET /api/v2/quality/surveys/scorable?customerSurveyUrl=https%3A%2F%2Fapps.mypurecloud.com%2Fquality-forms%2F%23%2Fsurveycodes%2FYzk3Zjg1MWQtZGFhZi00NTAwLWFiNmItYTZjYzE5YmQ0Yzgw

    This returned successfully with:

    • Survey form details

    • Question groups

    • Questions and answer options

    • status: Finished

    • totalScore: 100

    • npsScore: 1

    Based on that, this does not seem to be a general limitation of direct web surveys versus recording policy surveys.

    It may be more related to how the /scorable request is being built, especially:

    • Using the full customerSurveyUrl

    • Proper URL encoding

    • Passing the exact generated survey URL rather than only part of it

    If possible, would you be willing to share the exact test request you are using for /api/v2/quality/surveys/scorable (with any sensitive values redacted)?

    Seeing the request structure itself may help compare it against a working example and identify whether the issue is related to formatting or how customerSurveyUrl is being passed.

    Hope this helps.



    ------------------------------
    Luiz Rosa
    Full stack developer
    ------------------------------