I’d like to have a user create custom link to an order page. They should be able to text or email the link to customers. When the customers click the link, it should take them to the order/request page. When the customer gets to the page, I want to have certain fields (e.g. pickup and drop addresses) prepopulated. To do this, I attempted the following:
First, I let the user log into their account. From their dashboard, they can click the valet button to navigate to the order/request page.
When I send the user, I also send the account Slug as parameter, because I wanted a way to link the order/valet back to this particular user (since this page will be used by all users to get orders from their customers). I was hoping that I could use the Slug as a unique identifier at some point to do that.
As you can see, when the user gets to the page, the address fields are prepopulated with their address, as I wanted.
The issue is: I’d like for them to be able to share (copy and paste) the page link to a customer “as is”. So, I tried to extract the Slug from the URL, but it was a failure. I was only able to show the path (see the screenshot–below the price).
But when I copy and send the link to a customer, the address fields turn out empty. Though, as shown under the “price”, it still shows the path from the URL. Note: The customer is not a user (does not have an account, so they wont be able to log into bubble).
Because you have a page for Order and that page seems to have a type of content set to it (as your use of the slug of the order to know which order to show) you can very simply use Bubble built in ‘Link’ feature of a data type.
When creating a dynamic expression and referencing a data type that is the content type of a page in your app, you will have an available field of ‘link’ and that field will then allow you to designate which page the link would be for (this is only going to show you the list of pages whose content type is the same as the data type the dynamic expression is crafted for, if you have 3 pages with content type set to ‘order’ then, you’ll have 3 choices for which page the link would be for).
Then when you send an email you can use the ‘link’ field of the Order. If you do not know how to structure a clickable link in an email there are posts on the forum about it.
Thanks. To give you a background: The order/valet page itself can be a generic page where customers can place orders/valet requests from one of our partners (registered users/businesses). I am trying to create a process wherein a partner can send their customer a to this page on our website (for them to place an order/request) …the same way a “referral” program would work. Therefore, I need a way to link the customer to the particular partner (who sent them the URL to the order/request page). Using a slug in the URL was my attempt to connect the partner to the URL (with the hope that I could dynamically extract the slug from the URL into a hidden field on the form. Then I could use the slug field or URL path to connect the customer’s order/request to the particular partner). I am not sure if this would work or if there’s better way to do this, but I was just trying to figure it out.
With regards to the bubble built-in link feature, I’m curious to know if I will be able to connect the customer and their order back to the user/partner who sent them the link. For instance, I need certain fields on the order page (e.g., addresses) already populated with the user/partner information, when the customer gets to the form. The customer is literally only adding payment/credit card information and submitting the form.
Thanks. My question was not really clear…I apologize. The registered user/partner slug was already being sent to the order page through the URL link. So, the issue was that I was unable to dynamically extract the slug portion of the URL link (instead of the entire path or manually typing in the “key”) into a field on the order page…to subsequently use the data for connecting customer and their order to the user/partner. This is how I’ve worked around it:
Using the “split” feature, I dynamically extracted the slug from the URL into a field (hidden on the order page)
I also use the slug to dynamically populate a hidden field with the partner/user/business’s phone number.
When the link is sent to the customer, the user/partner’s information (e.g. address, phone number, etc.) is now prepopulated in the form when the customer is direct to the order/request page using the link, even though the customer is not a registered user (This was an issue before, because the form kept going to the customer with empty fields)
So when the customer submits an order/request from the order page, the app automatically populate the database’s “business phone number” field with the hidden phone number from the order page; and this links the user/partner/business to the customer’s order/request.
In the partner/user/business dashboard, I can then now “do a search for” in a RG to display all orders/valet requests where the “business phone equals” the partner/user/business phone number.
I am still working on it to complete the entire process. But so far, I’m able to link the two (unregistered customer with orders/requests AND registered user/partner/business) using the above steps; let me know if there’s a simpler/better process. Thanks again!
Absolutely no need to extract the slug to get the data entry if your page is using the Content Type, which likely you are because you are sending the data to the page which is using the Slug. Just reference Current Pages Thing, which in your case is likely the Order.
No need to do that because the Order data type should have the Partner details already saved via a related field which can be accessed by Current Pages Order Partners Phone Number (If you did save a field that is related to Partners on the Order data type)
I would NOT do that. I would instead just simply do a search for all Orders and use a constraint to filter by Partner (assuming you setup your DB properly and have a field on order data type of Partner) equals current Users Partner (again the User data type would need to have a field related to Partner to signal which Partner the User is).
If you set your search constraint to the Phone Number, What happens when the Partner changes their Phone Number? All existing Orders will no longer match.
Okay…I get it. Thanks! I am going through your recommendations to make the process more efficient. I’ll let you know if I have any issues or questions. Thanks again!