/
Integration and Redirect Setup

Integration and Redirect Setup

Before we begin with the integration setup, there is two key points that are very important:

  1. The respondent id must at all times be sent to us as respondentid= meaning the client does not send the respondent id as &r= or &rsp= or &rid=

  2. The Redirect url must always be 100% URL encoded i.e. ("=" equal sign must also be encoded). Also the &link= must be the last variable in the URL link.

With all this in mind lets look at some examples of how a client builds a redirect link so that a respondent is sent back to the host survey after they have completed the exercise on the CS platform.

First Step:

We use the URL that CS provides for the exercise.

https://survey.rose.conceptsauce.io/?param_id=PRMS01H5HK56RFG4WTQ3TVYWSWV02G

Then we add on the &respondentid= with the dynamic respondent id after the equal sign. The link above will look like this once the respondent id has been parsed:

https://survey.rose.conceptsauce.io/?param_id=PRMS01H5HK56RFG4WTQ3TVYWSWV02G&respondentid=DEMOrespondent

Once you have added the respondentid= then we can move on to the next step:

Second Step:

Once we are happy with the above setup, we then need to add the redirect pattern/argument. This is a step that must always be added after the first.

And so, we add &link= this to the end of the link above, and define our redirect pattern. that is specif to the clients needs.

You can add other variables in the redirect pattern as needed. The below is an example of a typical redirect with ?pid= , &id= and &DoNotRedir1= variables defined in the redirect pattern.

Using a simple online service to Encode/Decode the URL you can easily turn:

https://www.google.com/?pid=S1800&id=clientEN-US1&DoNotRedir1=0

To a 100% URL encoded version that will look like so:

https%3A%2F%2Fwww.google.com%2F%3Fpid%3DS1800%26id%3DclientEN-US1%26DoNotRedir1%3D0

Be aware of using Ampersand [&] in the URL text, as this can break the link. For instance when trying to use a brand name that has & in it, i.e. M&M. Then the Ampersand needs to be double encoded.

i.e. M&M will therefore be shown as M%2526M and not single encoding M%26M

It does look like a mess, but its URL encoding and this is the correct version to pass to us so we can process the request correctly. In the above example we are redirecting back to www.google.com. This however can be your host survey system. confirm-it, Quest.

This will mean the client can specify any number of variables that they would like to get back from the initial redirect.

Third Step (optional):

In some cases, the host system will auto generate a session ID, or state that is not exposed via a variable in the host system (or is not known to the programmer), in such a case, we can handle this by adding the &state= after the full redirect link parameters, and make sure that on the Survey Admin system we (CS) add the following change to the redirect setup, (this part is typically done my the CS team)

 

The Final Link

The final encoded link will look something like so:

https://survey.rose.conceptsauce.io/?param_id=PRMS01H5HK56RFG4WTQ3TVYWSWV02G&respondentid=DEMOrespondent&link=https%3A%2F%2Fwww.google.com%2F%3Fpid%3DS1800%26id%3DclientEN-US1%26DoNotRedir1%3D0

For any help with this setup or clarification please contact us.

 

Some Examples of Redirects that are done wrong

siteToRedirect =

https://survey.conceptsauce.io/?projectid=21148b2f-53bf-4d14-803a-8390b826e67e&startpage=a997d1f4-54e1-449d-8881-618c87e51354&respondentid="+str(psid)+"&link=http%3A%2F%2Fsurvey.researchnow.co.uk%2Fwebprod%2Fresources%2FF3S2%2FsubsidRedirectDecipher.php%3FSubsId%3D"+str(psid)

 

Related content

Retrieving Data from the API using Syrup.JS
Retrieving Data from the API using Syrup.JS
Read with this
Decipher API Integration guide
Decipher API Integration guide
More like this
Virtual Shelf- Findability setup
Virtual Shelf- Findability setup
Read with this
Qualtrics API Integration guide + Example Surveys
Qualtrics API Integration guide + Example Surveys
More like this
Decipher Code example
Decipher Code example
Read with this
Basic API calls
Basic API calls
More like this

©2020 ConceptSauce ltd / For further help please contact us directly on Team@conceptsauce.io