This guide explains how to set up the SaaS Client app on client ERPNext instances.
bench get-app sass_client
bench --site [your-client-site] install-app sass_client
bench --site [your-client-site] migrateAdd the following to your site_config.json file:
{
"saas_manager_url": "https://your-main-saas-manager.com",
"client_type": "ERP"
}Note: The saas_api_key will be automatically generated when you register the site.
The site will automatically register on first sync. Just ensure saas_manager_url is configured.
Alternatively, you can register manually:
from sass_client.utils.client_sync import register_client_site
api_key = register_client_site(
site_name="My Client Site",
company="My Company Name",
client_type="ERP" # Options: ERP, Mobile POS, Desktop POS, Fiscalisation
)
# Add the API key to site_config.json:
# "saas_api_key": "generated-api-key"The app automatically syncs data hourly to the main SaaS Manager. No additional configuration needed.
User limits are automatically enforced based on your subscription package. The app will prevent creating or enabling users beyond your package limit.
| Option | Required | Description | Default |
|---|---|---|---|
saas_manager_url |
Yes | URL of main SaaS manager app | - |
saas_api_key |
Yes* | API key for authentication | Auto-generated |
client_type |
No | Type of client (ERP, Mobile POS, Desktop POS, Fiscalisation) | ERP |
subscription_package |
No | Package name from main app | - |
subscription_active |
No | Whether subscription is active | false |
subscription_start_date |
No | Subscription start date | - |
subscription_end_date |
No | Subscription end date | - |
*API key is auto-generated on registration, but you can manually set it if needed.
To manually trigger a sync:
from sass_client.utils.client_sync import sync_to_main_app
sync_to_main_app()from sass_client.utils.client_sync import get_site_data
data = get_site_data()
print(data)- Check that
saas_manager_urlis correctly configured - Verify API key is set in
site_config.json - Check Error Log for sync errors
- Ensure main app is accessible from client site
- Verify hooks are configured (should be automatic)
- Check subscription status in main app
- Verify package has
max_usersset - Check Error Log for limit check errors
- Ensure main app is accessible
- Check network connectivity
- Verify site URL is correct
- Check Error Log for registration errors
- The client app only has read access to your ERPNext data
- Only aggregated statistics are sent to the main app
- No sensitive data is transmitted
- API key authentication ensures secure communication
For issues, check the Error Log in ERPNext or contact: akingbolahan12@gmail.com