Hi there,
I am new to using Corvid by Wix. It looks to be a very capable tool set!
I as the wholesaler am hiring multiple agents to sell a product on a new members-only website.
The website WILL NOT be an ecommerce site. It exists merely to facilitate order submission by agents and order commission info by the wholesaler.
I’d like to confirm before work starts that Wix can help me do the following:
After agents fill out customer info via order form, I can display each agent’s respective orders upon login in a searchable and sortable table. I need to make sure each agent can see ONLY their own orders but not those from other agents.
Thanks in advance.
Ivan
1 Like
If the agents themselves are placing the orders then any orders that are placed will have each agents id included with it when it is submitted to a dataset.
So, then after you have logged into the website, you can simply query the dataset for any orders that come from a specific agent and show them in a table or a repeater for example.
With the agents themselves viewing the dataset too, you can simply set that up too that once they login to the website that they can only view their own orders which will have their id associated with it.
Great! Thanks for the reply! Much appreciated!
“With the agents themselves viewing the dataset too, you can simply set that up too that once they login to the website that they can only view their own orders which will have their id associated with it.”
Would you mind explaining the above in simple steps how to achieve? I already know how to display dataset in a table. Just haven’t figured out how to limit the data shown in a table to only the associated agent ID.
Ivan
Hi,
I answered my own question 
However, how can I add a column in the collection dataset to identify which agent the order is coming from?
This is hugely important for tracking and recording purposes.
Thanks!
Ivan
You can simply use the id (_id) field from the dataset as that will be the agents userId and you can simply just query that or the owners (_owner) field even too.
https://support.wix.com/en/article/about-your-database-collection-fields
Otherwise, a very simple option would be to have a user input on your order form that makes the agent enter their own name for example, either by dropdown choice or a checkbox in an agents list or simply text user input, so that you will have the agents name stored in your dataset too and then you can simply use the name field to query instead of the userId.
Thanks for the suggestion!
I solved it in a slightly different way by creating a separate dataset that contains only two columns, namely member email and corresponding Agent ID, and then using a new drop-down that references this new dataset.
One question remains: I set the Agent ID in the new dataset as Main Field. How do I disallow duplicates in this column? I wish not to see duplicate Agent ID’s when the list grows very long.
thanks,
Ivan
@givemeawhisky Thank you very much!