If you are building a B2B software product on top of GoERP, read this guide to learn how to implement sign-up, onboarding and login.
B2B (business-to-business) products have a two-level hierarchy: there is a company (or a “business”, “tenant”, or “organization”) and multiple user accounts underneath it.
The person signing up is a representative of a business, and most likely, they will want to share the environment with co-workers or employees.
In contrast, if your software product is oriented to the B2C market, you can skip most of the advice in this document and check out only the section on custom domain names and app users.
Signup in short
The company signing up needs an Erply account (even if the users are not supposed to interact with Erply directly).
The account will be identified by a six digit “account number” or “client code”. It is a multi-user environment. Permissions can be adjusted via user groups.
A few user groups are created by default, and the person signing up will automatically get a user account with administrator permissions.
User and group management does not have to be built from scratch; there is a standard Erply app, “Users and Employees”, that already does that.
Log into Erply and open the app store (Apps -> App Store). Search for the apps named “SignUp App” and “Login app”.
Clone these apps (copy their templates into a new app). Change the HTML templates, replace the standard Erply design with your own. Add other helper pages as needed (landing, features, FAQ, pricing, support).
All the fields you see on the default signup form are required for creating an Erply account (but you can add more fields if needed).
The “Country” dropdown determines which datacenter the Erply account will be created in. If you do not offer these options and the account gets created in an inappropriate datacenter, the server maintenance windows will conflict with customer’s hours of business.
Make the signup and login templates public (“Publish settings” > “Allow B2B and public access” in the editor sidebar). This means that everyone can visit the URL without authentication.
Verify in an incognito window that you can open the pages.
Further customization
Within the signup app, it is possible to do more setup work. In the repository there is a page with plain signup only (template "sign-up-page") and an alternative page that also sets a default dashboard page to the account (template "sgn-signup-cafa-page")
Possible extra steps:
Create an account (organization, tenant) on another software platform as well
Change configuration parameters or CAFA settings
Including the dashboard URL. This is explained on the next page.
Prefill the Erply account with data
Delete, create or modify user groups
Create a wizard app if needed
If the setup process is lengthier, or it requires the user to give input and make choices, it is better to write it as a separate “wizard app”.
This can be a conventional GoERP app. Ask GoERP team to make it autoinstallable, and redirect user to that app once the signup is complete.
The user can then continue the process in the wizard app.
Post-signup experience
After the signup (or the setup wizard), and after each login, the user should be redirected to a dashboard.
This is meant to be the “navigation home”, the place where the user returns to after completing a task, and where they pick the next feature they want to use.
Build a dashboard that matches the needs of your user. It does not have to be dynamic or configurable; a simple static page is fine.
Once you have the page, you can issue a CAFA call from the signup app, to designate it as the
account’s dashboard. Detailed instructions are here.
Within you apps, always use the special redirection URL "go-to-landing" to link to the dashboard (do not hardcode dashboard URL)
The dashboard can also be part of the main app, but it is recommended to keep apps modularized and small. Smaller apps are easier to develop and there is less risk when pushing updates.
One way to split the functionality into apps is:
core features
setups, wizards, importers, admin pages
optional add-ons (as separate apps, or as modules of the main app)
The GoERP team can configure any app as autoinstallable (so that if a user attempts to open a page from that app, and the app is not installed yet, the installation process will start automatically).
Domain name
The signup / landing page can be set up on a non-Erply domain.
This process is similar to setting up a GoERP-powered website (erply.com, salonkeep.com, finetrek.com) and is done using Cloudfront.
At the moment, it is a manual setup process that Erply Ops can perform upon request. Routes of the new domain are mapped to the corresponding GoERP URLs—for example, so that
The GoERP-powered signup / landing page still needs to be served from one designated account.
Create an Erply account specially for serving this website, keep access controlled and enable two-step authentication. Separate sandbox/development from production.
Make changes to your signup page on a development account, publish a new version of the app, then log into the designated account and install the app update. When publishing, it is possible to restrict
which other accounts will see this app in the store.
After authentication, though, the user will be redirected to erply.com environment.
Authentication is tied to the erply.com domain. After login, the server sets a client cookie that is scoped to the erply.com domain. This is necessary since all the APIs are also located under erply.com.
Creating a large set of Cloudfront routes that would cover every possible account number, is unfeasible.
Regular users and app users
GoERP supports two classes of users: regular users and app users.
Regular users are traditional Erply users. A user is always linked to an employee record and belongs to (one) user group; the permissions are inherited from the user group. The predefined user groups are “administrators”, “sales representatives”, “cashiers” and “accountants”, but the administrators are free to rename those, create additional groups and so on.
For managing regular users, see the “Users & Employees” app in the app store. You can add a link to this app to your custom dashboard.
App users are more lightweight and are native to the GoERP platform. Authenticating an app user is not dependent on any Erply APIs.
App users come especially handy in two scenarios:
1 - When the users of this app are supposed to interact with this app only, and must be isolated from the core business. Ecommerce sites are a good example; you want to implement customer logins, without giving the customers access to billing, inventory, pricing and customer data.
However, we also implemented app users in Erply cost reporting app. Although cost reporting is used by employees most of the time, there might also be a partner or a contractor who needs to submit a reimbursement report,
2 - When you compile the app into WebAssembly and ship it as a native app (iOS, Android, Windows, Linux, Mac), or when it has to work offline. Therefore, apps with app user support by design do not/cannot redirect to an external login page (like GoERP does by default). Login must be compiled into the app.
Therefore, implementing app users requires the following steps: