If you want to pre-fill your checkout fields using your preferred CRM or from a marketing email, you can do it through a url.
The fields
The available fields that can be pre-filled right now are:
- First name:
first_name
- Last name:
last_name
- Full name:
full_name
- Email:
email
How to use
For example, if you want to pre-fill the user’s email address and first name on the checkout page, you should create the checkout page URL as follows:
https://yourdomain.com/checkout-page/?first_name=John&email=john@example.com
Example with All Fields
You can also use all available fields at once, in the following way:
https://example.com/product/?first_name=John&last_name=Doe&email=john@example.com
The syntax
The syntax is pretty straightforward, just follow these rules:
Step 1: Add a question mark (?) at the end of the product URL:
https://example.com/product?
Step 2: Add the URL parameter, example first_name, followed by the equal ( = ) sign:
https://example.com/product?first_name=
Step 3: Enter the first name of the user, for example, John. This information usually comes from your CRM.
https://example.com/product?first_name=John
Step 4: Add the ampersand symbol (&) to add more parameters:
https://example.com/product?first_name=John&
Step 5: To add another parameter, follow Step 2 and 3 again. For example, to pre-fill the email field, you would use the parameter “email” followed by the equal sign and the email address, like this:
https://example.com/product?first_name=John&email=john@example.com
Handling Spaces in URL Parameters
You can also include spaces in the parameter values. For example, for a full name like “Otto S. Hatfield,” you can write:
https://example.com/product/?full_name=Otto%20S.%20Hatfield