Set Default delivery address for ShoppingHub
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Has anyone worked on ShoppingHub ? Do you know how to set the default delivery address based on logged in user country so that when the user logins in they do not get a pop up to set Delivery address?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi Sneha,
Yes, this is a common requirement to improve user experience in Shopping Hub. The pop-up appears because the system cannot determine a valid "Ship To" location for the user's session context.
To set a default delivery address automatically and suppress the pop-up, you need to ensure the user's profile is correctly mapped to a Location record that is valid for Procurement.
Here is how to configure it:
1. Check User Location Record
Ensure the Location field on the sys_user record is populated.
Navigate to that Location record (cmn_location) and ensure it is active.
2. Configure "Ship To" Addresses The Shopping Hub looks for locations defined specifically as valid "Ship To" addresses.
Navigate to Procurement Case Management > Administration > Ship To Locations (or search for sn_shop_ship_to.list).
You must create a record here that maps the User's Location (from cmn_location) to a valid Ship-To entity.
Crucial Step: Ensure that the user's location (or their country/region) is covered by one of these Ship To records.
3. Use the "User Preference" Logic (Advanced) If the mapping exists but the pop-up still appears, it might be because the system hasn't cached the preference yet. You can create a Business Rule on login (or a Script Action on session start) to check the user's location and write to the sn_shop_user_preference table (or standard sys_user_preference) setting the default address ID.
Preference Name: shopping_hub.default_ship_to (Check your instance for the exact preference key used by the widget).
Value: The SysID of the sn_shop_ship_to record corresponding to their location.
However, usually just ensuring the User Location matches a valid Ship To Location record is enough for OOB logic to pick it up.
Hope this helps!
If this response helps you achieve your requirement, please mark it as Accepted Solution.
This helps the community grow and assists others in finding valid answers faster.
Best regards,
Brandão.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
15 hours ago
Hi @itallo ,
The Ship To Locations[sn_shop_ship_to] table is not showing on the instance. Also sn_shop_user_preference table is not available in the instance
There is a Office location[sn_fin_office_location] table and Delivery location [sn_shop_delivery_location] table that are present in the instance. Could you suggest a workaround these.
Thanks
Sneha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
9 hours ago
Hi Sneha,
Thank you for clarifying the tables! It seems your instance is utilizing the Finance Core data model for locations.
Since you have the Delivery Location [sn_shop_delivery_location] table, the logic works similarly but relies on this specific table instead.
Here is the workaround using the tables you confirmed:
1. Configure the "Delivery Location" Record The system tries to match the User's profile location to a valid Delivery Location record.
Navigate to the Delivery location [sn_shop_delivery_location] list.
Create (or update) a record here.
Crucial Mapping: Ensure this record references the same cmn_location that is set on your User's profile.
Check: Verify if there is an "Active" flag or a "Company" restriction on this record that might be filtering it out for your test user.
2. Force the Default via User Preference The pop-up appears because the widget checks for a stored preference and finds none. You can manually create a preference to bypass this.
Table: sys_user_preference
Name: Try shopping_hub.delivery_location (This is the standard key for many versions, but it might vary slightly).
User: Select your test user.
Value: Paste the SysID of the record from the sn_shop_delivery_location table (not the cmn_location).
System: Checked (if you want it to apply as a default for everyone, leave User empty).
3. Advanced Troubleshooting If the preference key above doesn't work, you can find the exact key by inspecting the widget:
Ctrl+Right Click on the Shopping Hub widget/modal > Widget in Editor.
Search the Client Script for getPreference or spUtil.setPreference. You will find the exact string name of the preference it is looking for.
Hope this helps you solve it!
If this response helps you achieve your requirement, please mark it as Accepted Solution.
This helps the community grow and assists others in finding valid answers faster.
Best regards,
Brandão.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
15 hours ago - last edited 15 hours ago
A shopper must first set a default delivery location to proceed. Based on current behavior, this step is mandatory and cannot be bypassed.
If a shopper attempts to access any of the following pages during their first login, before setting a default delivery location, they are automatically redirected to the Home page to complete this setup:
- Categories landing page
- Suppliers landing page
- Products (browse by category)
- Products (browse by supplier)
- Product detail page
- Bundle detail page
This behavior is by design to ensure a valid delivery location is established before shopping. For more information, see: Log in to Shopping Hub for the first time
Note: Other Shopping Hub pages can be accessed without setting a default delivery location if the shopper lands on them directly, for example, the My to-dos list and My purchases list.
