What are query args?
Query args are used in a URL to pass data from one page to another.
How do query arg keys work in a URL?
You might have seen a URL that looks like this: https://someurl.com/?fname=Bill+Smith
. Everything after ?
is called the query string. While fname
is the query arg key and Bill+Smith
is the value of fname
. The +
in Bill+Smith
is called URL Encoding. The +
is added to keep the URL from breaking into pieces when we have a space.
Ok, that was a brief overview of what query args are, and how query args work in a URL.
How to use custom query arg keys?
Custom query arg keys are used to map the query arg keys with another system.
By default, WPrequal will pass a url for a redirect like this:
https://someurl.com/somepage/?fname=Bill&lname=Smith&email=me@email.com&pnone=555+555-5555
Let’s say your system does not recognize fname
and lname
. But it does recognize first_name
and last_name
. In the WPrequal Settings, change the Query Arg Key – First Name to first_name
. Do the same for last_name
. This will create a URL that looks like this:
https://someurl.com/somepage/?first_name=Bill&last_name=Smith&email=me@email.com&pnone=555+555-5555
What are additional query args used for?
Additional query args are used for any additional args that need to be passed with the redirect URL. These are not dynamically populated like the other args. You can simply add them as you want them to appear in the redirect URL.
Adding this company_id=12345&agent=Mary+Jones
to the Additional Query Args setting will produce a URL like this:
https://someurl.com/somepage/?fname=Bill&lname=Smith&email=me@email.com&pnone=555+555-5555&company_id=12345&agent=Mary+Jones
Conclusion
Make sure to test your redirect URL to make sure all the query arg keys are mapped correctly. This can be done by completing the WPrequal Pre-Qual form. Then checking the results from the website where you redirected too.