## License
-GNU General Public License v3.0
+GNU General Public License v3.0
diff --git a/docs/docs/administrator/creating-first-user.md b/docs/docs/administrator/creating-first-user.md
index 3074a65749f..6342dc207c1 100644
--- a/docs/docs/administrator/creating-first-user.md
+++ b/docs/docs/administrator/creating-first-user.md
@@ -3,9 +3,12 @@ id: creating-first-user
title: Creating first user
---
+The following steps are required prior using the system.
+
## Create admin user
-Below command will create first admin user with following credentials
+The below command will create first admin user with a random password.
+The password will be printed in the terminal.
```
yarn initProject
@@ -13,19 +16,20 @@ yarn initProject
```
username: admin@erxes.io
-password: erxes
+password: ********
```
## Load initial data
-Below command will create initial permission groups, permissions, growth hack templates, email templates and some sample data
+The below command will create initial permission groups, permissions, growth hack templates, email templates and some sample data, and reset the admin password.
+The password will be printed in the terminal.
```
yarn loadInitialData
```
-If do not want to load sample data then you can run following command just to load permissions
+If you do not want to load sample data then you can run the following command just to load permissions.
```
yarn loadPermission
-```
\ No newline at end of file
+```
diff --git a/docs/docs/administrator/environment-variables.md b/docs/docs/administrator/environment-variables.md
index 5fd18c4e31a..5ddd35e0716 100644
--- a/docs/docs/administrator/environment-variables.md
+++ b/docs/docs/administrator/environment-variables.md
@@ -1,8 +1,10 @@
---
id: environment-variables
-title: Environment Variables
+title: Environment variables
---
+On this page you can see how to configure the work environment. It is very important to follow the steps as indicated.
+
## MongoDB
```
@@ -10,9 +12,9 @@ MONGO_URL=mongodb://localhost/erxes
TEST_MONGO_URL=mongodb://localhost/test
```
-- MONGO_URL is your application's database URL
+- `MONGO_URL` is your application's database URL.
-- TEST_MONGO_URL is when you run
+- `TEST_MONGO_URL` is when you run testing.
```
yarn test
@@ -26,11 +28,11 @@ REDIS_PORT=6379
REDIS_PASSWORD=
```
-Redis is necessary for reactive subscriptions
+Redis is necessary for reactive subscriptions.
-- REDIS_HOST is your redis server's URL
-- REDIST_PORT defines which port is redis running
-- REDIS_PASSWORD fill this if you have password on your redis server
+- `REDIS_HOST` is your redis server's URL.
+- `REDIST_PORT` defines which port is redis running.
+- `REDIS_PASSWORD` fill this if you have password on your redis server.
## General configs
@@ -47,118 +49,12 @@ API_PATH=''
WIDGET_PATH=''
WIDGET_API_PATH=''
-UPLOAD_SERVICE_TYPE=''
-GOOGLE_CLOUD_STORAGE_BUCKET=''
-```
-
-- HTTPS this is boolean variables, set true if you are using secure ssl
-- MAIN_APP_DOMAIN this is your main application's domain where is erxes/erxes repository is running
-- WIDGETS_DOMAIN your widget application's domain where is erxes/widgets repository is running
-- DOMAIN this is your erxes-api application's domain where is erxes/erxes-api repository is running
-- NODE_ENV set to production on live mode, set to development on development mode
-- PORT this option will define which port is your application running, you can change to any port you want
-- UPLOAD_SERVICE_TYPE this is upload service type amazon s3 or gcs. GCS is short for Google Cloud Service
-- GOOGLE_CLOUD_STORAGE_BUCKET defines the bucket of gcs
-
-## Email settings
-
-```
-COMPANY_EMAIL_FROM=noreply@erxes.io
-DEFAULT_EMAIL_SERVICE=sendgrid
-MAIL_SERVICE=sendgrid
-MAIL_PORT=''
-MAIL_USER=''
-MAIL_PASS=''
-MAIL_HOST=''
-```
-
-- COMPANY_EMAIL_FROM transaction emails will be sent by this email address
-- DEFAULT_EMAIL_SERVICE defines whether transaction emails sent by ses or other email services
-- MAIL_SERVICE defines your email service's name
-- MAIL_PORT your email service's port
-- MAIL_USER defines your email service's login username
-- MAIL_PASS defines your email service's login password
-- MAIL_HOST your email service's host
-
-## Twitter Settings
-
-```
-TWITTER_CONSUMER_KEY=''
-TWITTER_CONSUMER_SECRET=''
-TWITTER_REDIRECT_URL='https://erxes.domain.com/service/oauth/twitter_callback'
-```
-
-- TWITTER_CONSUMER_KEY Your twitter developer account's Consumer Key (API Key) here
-- TWITTER_CONSUMER_SECRET Your twitter developer account's Consumer Secret (API Secret) here
-- TWITTER_REDIRECT_URL you should only change the domain of this env variables. This is twitter's callback url
-
-## Aws S3
-
-```
-AWS_ACCESS_KEY_ID=''
-AWS_SECRET_ACCESS_KEY=''
-AWS_BUCKET=''
-AWS_PREFIX=''
-```
-
-- AWS_ACCESS_KEY_ID your amazon account's access key id
-- AWS_SECRET_ACCESS_KEY your amazon account's secret access key
-- AWS_BUCKET your s3 service's bucket name to use
-- AWS_PREFIX you can use prefix names to specify the names of the files to be uploaded
-
-## Aws SES
-
-Engages are sent by ses service
-
-```
-AWS_SES_ACCESS_KEY_ID=''
-AWS_SES_SECRET_ACCESS_KEY=''
-AWS_SES_CONFIG_SET=''
-AWS_REGION=''
-AWS_ENDPOINT=''
-```
-
-- AWS_SES_ACCESS_KEY_ID your amazon account's access key id
-- AWS_SES_SECRET_ACCESS_KEY your amazon account's secret access key
-- AWS_SES_CONFIG_SET to detect bounce, complaints, click, open events you will need this option. This name can be anything
-- AWS_REGION your amazon account's region
-- AWS_ENDPOINT this is the URL where the amazon events sent to. Basically it is your erxes/erxes-api repository's path or domain
-
-To be able to detect the ses events you should run this command in console
-
-```
-yarn engageSubscriptions
```
-## Facebook
-
-```
-FACEBOOK_APP_ID=''
-FACEBOOK_APP_SECRET=''
-FACEBOOK_PERMISSIONS='manage_pages, pages_show_list, pages_messaging, publish_pages, pages_messaging_phone_number, pages_messaging_subscriptions'
-
-```
-
-- FACEBOOK_APP_ID is your faceboook application's app id
-- FACEBOOK_APP_SECRET is your faceboook application's secret key
-- FACEBOOK_PERMISSIONS you should not have to modify this option. Those are the necessary permissions for facebook integration
-
-## Gmail
-
-```
-GOOGLE_CLIENT_ID=''
-GOOGLE_CLIENT_SECRET=''
-GOOGLE_APPLICATION_CREDENTIALS=''
-GOOGLE_TOPIC=''
-GOOGLE_SUBSCRIPTION_NAME=''
-GOOGLE_PROJECT_ID=''
-GMAIL_REDIRECT_URL = 'http://localhost:3000/service/oauth/gmail_callback'
-```
+- `HTTPS `this is boolean variables, set true if you are using secure ssl.
+- `MAIN_APP_DOMAIN` this is your main application's domain where is erxes/erxes repository is running.
+- `WIDGETS_DOMAIN` your widget application's domain where is erxes/widgets repository is running.
+- `DOMAIN` this is your erxes-api application's domain where is erxes/erxes-api repository is running.
+- `NODE_ENV` set to production on live mode, set to development on development mode.
+- `PORT` this option will define which port is your application running, you can change to any port you want.
-- GOOGLE_CLIENT_ID your google project's Clint id
-- GOOGLE_CLIENT_SECRET your google project's secret key
-- GOOGLE_APPLICATION_CREDENTIALS Your downloaded google's credentials which is json file
-- GOOGLE_TOPIC Your google cloud project's subscribed topic's name
-- GOOGLE_SUBSCRIPTION_NAME Your google cloud project's subscription name
-- GOOGLE_PROJECT_ID your google project's id
-- GMAIL_REDIRECT_URL this is gmail's callback URL you should only change the domain of it
diff --git a/docs/docs/administrator/file-upload.md b/docs/docs/administrator/file-upload.md
deleted file mode 100644
index 250f7bb44f2..00000000000
--- a/docs/docs/administrator/file-upload.md
+++ /dev/null
@@ -1,27 +0,0 @@
----
-id: file-upload
-title: File Upload
----
-
-## Amazon s3
-
-You can upload the files through amazon s3 service.
-Below configurations must be configured. You can see more info from Environment variable settings
-
-```
-AWS_ACCESS_KEY_ID=''
-AWS_SECRET_ACCESS_KEY=''
-AWS_BUCKET=''
-AWS_PREFIX=''
-```
-
-## Google Cloud storage
-
-You can upload the files through google's cloud service.
-Below configurations must be configured. You can see more info from Environment variable settings
-
-```
-GOOGLE_PROJECT_ID=''
-GOOGLE_APPLICATION_CREDENTIALS=''
-GOOGLE_CLOUD_STORAGE_BUCKET=''
-```
diff --git a/docs/docs/administrator/integrations.md b/docs/docs/administrator/integrations.md
deleted file mode 100644
index 07abb9d451b..00000000000
--- a/docs/docs/administrator/integrations.md
+++ /dev/null
@@ -1,428 +0,0 @@
----
-id: integrations
-title: Integrations
----
-
-## Facebook Integration
-
-Erxes app can be integrated with facebook developer API and that means we can receive our Facebook pages' inbox messages directly to our erxes app's inbox. With the help of Facebook developer API we have many more possibilities, like receiving notifications about page comment, page post feed etc. There is an active development process going on this subject.
-
-Requirements:
-
-- working sub domain with SSL pointing to your erxes-api server.
-- facebook app's owner also must be an admin of facebook page that's going to connect.
-
-## Creating facebook app.
-
-1. Go to https://developers.facebook.com and create new app.
-
-
-
-### Enable Gmail API
- - Now we need to enable Gmail API in order to add scopes
- - Side menu => APIs & Services => Library => Search => Gmail API and enable
-
-
-
-
-
-### Create consent screen
- - Side menu => APIs Services => OAuth Consent screen => Create
-
-
-
-
- Fill out the form below and click on add scope the button
-
-
-
- Since we already enabled the Gmail API, we are able to add the Gmail scopes. Search Gmail API and select the following scopes and add. Afterward, do not forget to click on save on bottom
-
- ```Shell
- https://mail.google.com/
- https://www.googleapis.com/auth/gmail.modify
- https://www.googleapis.com/auth/gmail.compose
- https://www.googleapis.com/auth/gmail.send
- https://www.googleapis.com/auth/gmail.readonly
- ```
-
-
-
-### Create an OAuth client
- - In order to enable Google Cloud Project, we need to have a OAuth client for authorization
-
-
-
- - In application, type select web application and fill out the rest of the form
-
-
-
- - Keep the client id and client secret we're going to use later on
-
-
-
-### Add authorization callback
- - Now we need to add authorization callback for our OAuth2 client
- - Go to => Side menu => APIs and Services => Credentials and select an OAuth client you just created.
-
-
-
-
-
- - erxes-integrations repo works on PORT 3400, so that for the test purpose you can add as follows
-
- ```shell
- http://localhost:3400/gmaillogin
- ```
-
-
-
-### Enable PubSub API
- -In order to send and receive an email we will need the PubSub API
-
-
-
-
-
-### Create a service account
- - Go to => IAM & Admin => Service Accounts => CREATE SERVICE ACCOUNTS
- - Enter service account name and Create
-
-
-
-
-
-
- - You will automatically download the JSON file
- - Let's grant publish topic right to Gmail's service account.
-
- - Go to => Side menu => IAM & Admin => IAM => Add
-
-
-
-
-
- - In new members add the following value
-
- ```shell
- gmail-api-push@system.gserviceaccount.com
- ```
-
- - In role select PubSub/Publisher
-
-
-
-### Shell env
- - You also need to set env to your shell session
- ```shell
- export GOOGLE_APPLICATION_CREDENTIALS='path/to/your/google_cred.json' # service account json file
- ```
-
-### Config env
- - Now we are good to config our env as follows,
-
-
-
- You need to restart the erxes-integration repo after configuring .env
-
- - Go to erxes settings - App store - add gmail. (Make sure you create new brand beforehand)
-
-## AWS S3 Integration
-
-1. Configure AWS account settings in `erxes-api/.env` like below
-
-```Shell
-AWS_ACCESS_KEY_ID='your aws account access key id'
-AWS_SECRET_ACCESS_KEY='your aws account secret key'
-
-AWS_BUCKET='aws bucket name'
-AWS_PREFIX=''
-```
-
-- You can get your aws access key id and region from [here](https://console.aws.amazon.com/console/home)
- , You can not get your current aws secret access key, however you can always create new one and claim newly created aws secret access key
-- Make sure your IAM user has proper access to S3 services.
-
-## AWS SES Integration
-
-Amazon Simple Email Service enables you to send and receive email using a reliable and scalable email platform. Set up your custom amazon simple email service account.
-
-### Configure Amazon SES and Amazon SNS to track each email responses.
-
-1. [ Log in to your AWS Management Console. ](https://console.aws.amazon.com)
-2. Click on your user name at the top right of the page.
-3. Click on the My Security Credentials link from the drop-down menu.
-4. Click on the Users menu from left Sidebar.
-5. Click on the Add user.
-6. Then create your username and check Programmatic access type and click next.
-7. Click on the Create group then write group name and check amazonSesFullAccess and amazonSNSFullAccess.
-8. Then check your created group and click on the Next button.
-9. Finally click on the create user and copy the Access Key Id and Secret Access Key.
-
-
-### To find your Region.
-
-1. [ Log in to your AWS Management Console.](https://console.aws.amazon.com)
-2. Click on services menu at the top left of the page.
-3. Find Simple Email Service and Copy region code from url.
-
-**If you choose not available region**
-1. Click on your region at the top right of the menu.
-2. Select any active region from list.
-3. Copy the selected Region code.
-_(example: us-east-1, us-west-2, ap-south-1, ap-southeast-2, eu-central-1, eu-west-1)_
-
-
-### To determine if your account is in the sandbox.
-1. [Open the Amazon SES console at https://console.aws.amazon.com/ses/](https://console.aws.amazon.com/ses/)
-2. Use the Region selector to choose an AWS Region.
-3. If your account is in the sandbox in the AWS Region that you selected, you see a banner at the top of the page that resembles the example in the following figure.
-
-
-
-4. If the banner doesn't appear on this page, then your account is no longer in the sandbox in the current Region.
-
-
-
-
-5. **If you move out of the Sandbox,** follow the instructions described [here](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html) to move out of the Amazon SES Sandbox.
-
-
-### Paste Amazon-Ses Access Keys to Erxes AWS-SES engage.
-
-1. Login Erxes, go to Settings menu => Appstore.
-2. Click on the “Appstore” menu
-3. Click manage to AWS-SES engage configuration
-
-
-
-4. Paste the AWS-SES access key ID, AWS-SES secret access key and AWS-SES region which you have created user in AWS Management console.
-
-
-
-### Test configuration.
-
-Amazon places all new accounts in the Amazon SES sandbox. While your account is in the sandbox, you can use all of the features of Amazon SES. However, when your account is in the sandbox, Amazon have applied the following restrictions to your account:
-
-+ You can only send mail to verified email addresses and domains, or to the Amazon SES mailbox simulator.
-
-+ You can only send mail from verified email addresses and domains.
-
-
-
-## Nylas Integration
-
-1. Create the Nylas account go to [website](https://dashboard.nylas.com/register)
-2. After you created the Nylas account, copy your clientId and clientSecret from [here](https://dashboard.nylas.com/applications/) and config in `erxes-integrations/.env` like below
-```Shel
-# Nylas
-NYLAS_CLIENT_ID='nylas account CLIENT ID'
-NYLAS_CLIENT_SECRET='nylas account CLIENT_SECRET'
-NYLAS_WEBHOOK_CALLBACK_URL=http://localhost:3400/nylas/webhook
-```
-3. In order to receive email and updates, we need to have endpoint for our webhook.
- - Use ngrok service for erxes-integration repo as follows:
- ```Shell
- cd /path/to/erxes-integrations
- ngrok http 3400
- ```
- - Copy the IP address with https and replace `erxes-integrations/.env` as follows:
- ```Shell
- NYLAS_WEBHOOK_CALLBACK_URL=http://localhost:3400/nylas/webhook
- NYLAS_WEBHOOK_CALLBACK_URL=https://NGROK_IP/nylas/webhook
- ```
- When you start erxes-integration repo webhook will automatically created according to `.env`
- #### Now we are ready to config our provider
-### Gmail
-1. Create the Google project and config gmail for the [Nylas guide](https://docs.nylas.com/docs/creating-a-google-project-for-dev)
- - Get the following config from your Google project and config as follows in `erxes-integrations/.env`
- ```Shell
- GOOGLE_PROJECT_ID='google project id'
- GOOGLE_CLIENT_ID='google client id'
- GOOGLE_CLIENT_SECRET='google client secret'
- GOOGLE_APPLICATION_CREDENTIALS=./google_cred.json
- ```
- - In order to have Google OAuth token, add authorized redirect URIs to your google credentials
- - Select Google project
- - Go to credentials from left side menu
- - Select OAuth 2.0 client ID
- - Add following uri in authorized redirect URI `http://localhost:3400/nylas/oauth2/callback`
- - After you create the Google service account download json and replace with `google_cred.json`
-### Yahoo
-2. In order to integrate the Yahoo you will need to generate app password for the Erxes, please follow below steps.
- - Go to Settings/App Store and click on Add button of the Yahoo section
-
-
-
-
-
-
-
-
-
-
-
-
-
+- Click on the New Project
+
+
+- Enter project name and click on the Create button
+
+
+
+#### Service account
+- Navigate to sidebar IAM & Admin => Service Accounts
+
+
+- Now let's create service account for our app
+
+
+- Enter service account name and description then click on the Create button
+
+
+- Select Owner role and click on the Continue button
+
+
+- Create key for service account, you will download json file automatically and keep it
+
+
+
+
+- Successfully created service account
+
+
+
+- Replace the file you downloaded from google (service account) with **erxes-api/google_cred.json.sample erxes-integrations/google_cred.json.sample** and rename them to **google_cred.json**
+
+
+
+- One last touch, we need to configure erxes, Go to Settings => System Config => General System config
+ And configure **GOOGLE PROJECT ID**, **GOOGLE APPLICATION CREDENTIALS** fields as in the sceenshot
+
+ - **GOOGLE APPLICATION CREDENTIALS** is google_cred file's path by default it's ./google_cred.json no need to change
+
+
+
+That's it, now you are good use Google Cloud Platform Services which you can find them [here](https://console.cloud.google.com/apis/library)
+### File upload
+
+**A media type** (Multipurpose Internet Mail Extensions or MIME type) is a standard that indicates the nature and format of a document, file, or assortment of bytes. The simplest MIME type consists of a type and a subtype **(type/subtype)**.
+
+
+**Configuration:**
+- Go to Erxes Settings => System config => General System Config => File upload.
+
+```
+UPLOAD_FILE_TYPES='image/png, application/pdf'
+UPLOAD_FILE_TYPES_OF_WIDGET='image/png, application/pdf'
+UPLOAD_SERVICE_TYPE='Amazon Web Services'
+BUCKET_FILE_SYSTEM_TYPE='Public'
+```
+
+See the following figure which approves the **png**, **pdf** files and other type of media do not allowed to upload the server. If there is nothing configured media type, it accepts all media types.
+
+
+
+
+- `UPLOAD_FILE_TYPES`, `UPLOAD_FILE_TYPES_OF_WIDGET` have to set same file type. [Here is a list of MIME types, associated by type of documents, ordered by their common extensions.](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types)
+- You can upload the files through **Amazon Web Services** or **Google Cloud Service** on `UPLOAD_SERVICE_TYPE`.
+
+- You can select the permission as **public** or **private** on `BUCKET_FILE_SYSTEM_TYPE`.
+
+
+
+
+### Google Cloud Storage
+Cloud Storage provides worldwide, highly durable object storage that scales to exabytes of data. You can access data instantly from any storage class, integrate storage into your applications with a single unified API, and easily optimize price and performance.
+
+#### Requirement:
+ - Google Cloud Platform project, follow [this](#google) guide to create one
+
+ - Enable Google Cloud Storage API [here](https://console.cloud.google.com/apis/library)
+
+
+
+
+
+ - Navigate to [here](https://console.cloud.google.com/storage/browser) and Create bucket for file upload
+
+
+
+ - Enter bucket name and fill out rest of the form
+
+
+
+
+
+ - Copy your bucket name and configure it in the Erxes app as follows
+
+
+
+ Now final step, set upload service type to Google in [here](#file-upload)
+
+### AWS S3
+
+Amazon Simple Storage Service (Amazon S3) is storage for the internet. You can use Amazon S3 to store and retrieve any amount of data at any time, from anywhere on the web.
+
+**Configuration:**
+- Go to Erxes Settings => System config => General System Config => AWS S3.
+
+```
+AWS_ACCESS_KEY_ID='your aws account access key id'
+AWS_SECRET_ACCESS_KEY='your aws account secret key'
+AWS_BUCKET='aws bucket name'
+AWS_PREFIX='you can use prefix names to specify the names of the files to be uploaded'
+AWS_COMPATIBLE_SERVICE_ENDPOINT=''
+AWS_FORCE_PATH_STYLE=''
+```
+- [ Log in to your AWS Management Console. ](https://console.aws.amazon.com)
+- You can get your `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` from AWS My Security Credentials=> Access keys (access key ID and secret access key).
+- [Create new bucket](https://docs.aws.amazon.com/AmazonS3/latest/gsg/CreatingABucket.html) and insert name in `AWS_BUCKET`, make sure bucket permission configuration.
+
+- Make sure your IAM user has proper access to S3 services. [Learn more about public access.](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/block-public-access.html)
+
+- `AWS_COMPATIBLE_SERVICE_ENDPOINT`, if you need to override an endpoint for a service, you can set the endpoint on a service by passing the endpoint object with the endpoint option key. [Refer to AWS service endpoint.](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Endpoint.html)
+
+- `AWS_FORCE_PATH_STYLE`, some services have very specific configuration options that are not shared by other services. [Refer to AWS force path style.](https://docs.aws.amazon.com/sdkforruby/api/Aws/Plugins/GlobalConfiguration.html)
+
+
+
+### AWS SES
+
+Amazon Simple Email Service enables you to send and receive email using a reliable and scalable email platform. Set up your custom Amazon simple email service account.
+
+**Configuration:**
+- Go to Erxes Settings => System config => General System Config => AWS SES.
+
+```
+AWS_SES_ACCESS_KEY_ID='your aws account access key id'
+AWS_SES_SECRET_ACCESS_KEY='your aws account secret key'
+AWS_REGION='region of your account'
+AWS_SES_CONFIG_SET=''
+```
+`AWS_SES_CONFIG_SET` is detect bounce, complaints, click and open events which you can be use this option. This name can be anything.
+
+#### Configure Amazon SES and Amazon SNS to track each email responses.
+
+1. [ Log in to your AWS Management Console. ](https://console.aws.amazon.com)
+2. Click on your user name at the top right of the page.
+3. Click on the My Security Credentials link from the drop-down menu.
+4. Click on the Users menu from left Sidebar.
+5. Click on the Add user.
+6. Then create your username and check Programmatic access type and click next.
+7. Click on the Create group then write group name and check amazonSesFullAccess and amazonSNSFullAccess.
+8. Then check your created group and click on the Next button.
+9. Finally click on the create user and copy the `AWS_SES_ACCESS_KEY_ID` and `AWS_SES_SECRET_ACCESS_KEY`.
+
+
+#### To find your `AWS_REGION`.
+
+1. [ Log in to your AWS Management Console.](https://console.aws.amazon.com)
+2. Click on services menu at the top left of the page.
+3. Find Simple Email Service and Copy region code from url.
+
+**If you choose not available region**
+1. Click on your region at the top right of the menu.
+2. Select any active region from list.
+3. Copy the selected Region code.
+_(example: us-east-1, us-west-2, ap-south-1, ap-southeast-2, eu-central-1, eu-west-1)_
+
+
+#### Determine whether your account is in the sandbox or not.
+
+Amazon places all new accounts in the Amazon SES sandbox. While your account is in the sandbox, you can use all of the features of Amazon SES. However, when your account is in the sandbox, Amazon have applied the following restrictions to your account:
+
++ You can only send mail to verified email addresses and domains, or to the Amazon SES mailbox simulator.
+
++ You can only send mail from verified email addresses and domains.
+
+**Verify it for following steps:**
+1. [Open the Amazon SES console at https://console.aws.amazon.com/ses/](https://console.aws.amazon.com/ses/)
+2. Use the Region selector to choose an AWS Region.
+3. If your account is in the sandbox in the AWS Region that you selected, you see a banner at the top of the page that resembles the example in the following figure.
+
+
+
+4. If the banner doesn't appear on this page, then your account is no longer in the sandbox in the current Region.
+
+
+
+5. **If you move out of the Sandbox,** follow the instructions described [here](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html) to move out of the Amazon SES Sandbox.
+
+### Common mail config
+Common mail config enables you to your transaction emails will be sent by the specified email address(`FROM_EMAIL`). You can define whether transaction emails sent by AWS SES or other email services which is configured in custom mail service (`DEFAULT_EMAIL_SERVICE`).
+
+**Configuration:**
+- Go to Erxes Settings => System config => General System Config => Common mail config.
+
+```
+FROM_EMAIL='your email address'
+DEFAULT_EMAIL_SERVICE='your configured email service name'
+
+```
+
+
+
+### Custom mail service
+Mail service enables you to delivering your transactional and marketing emails through the cloud-based email delivery platform. You can set any custom mail service in this fields. For example, Sendgrid custom mail service. Create your account in Sendgrid and fill it into the fields.
+
+**Configuration:**
+- Go to Erxes Settings => System config => General System Config => Custom mail service.
+
+```
+MAIL_SERVICE_NAME='Sendgrid'
+PORT='Sendgrid port id'
+USERNAME='your account user name'
+PASSWORD='your account password'
+HOST='smtp.sendgrid.net'
+```
+
+## Integrations configuration
+
+Erxes app enables you to integrate with developer API and that means we can receive our integrated applications inbox messages directly to our erxes app's inbox. With the developer API, we have many more possibilities, like receiving notifications about page comment, page post feed etc. Learn how to integrate the Erxes platform into your applications as stated follows.
+
+### Gmail
+
+Read and send messages, manage drafts and attachments, search threads and messages, work with labels, setup push notifications, and manage Gmail settings.
+
+ - Create **Google Cloud Platform project**, follow [this](#google) guide to create one
+ - Enable Gmail API [here](https://console.cloud.google.com/apis/library)
+
+
+
+
+
+ - SideMenu => APIs Services => OAuth Consent screen => Create
+
+
+
+ - Fill out rest of the form and Click on the Add scope button
+
+
+
+ - Search for Gmail API and select scopes as below
+
+
+
+
+
+ - SideMenu => APIs & Services => Credentials => Create credentials => OAuth Client
+
+
+
+ - Select Web application and fill out rest of the form and click on the Create button
+
+
+
+ - You will get your CLIENT_ID, CLIENT_SECRET, We are going to use these in the Erxes App system config later on
+
+
+
+ - Now select your newly created OAuth client and add redirect URI for OAuth2 authorization
+
+
+
+
+
+ - We also need to enable **Cloud Pub/Sub API** in order to receive our email as **real-time**
+
+
+
+
+
+ - Navigate to SideMenu => IAM & Admin => IAM
+
+ - Click on the Add button and add grant publish right to **gmail-api-push@system.gserviceaccount.com** account
+
+ - Select role Pub/Sub Publisher and click on the Save button
+
+
+
+ - Now Let's config our Erxes app
+
+ - Navigate to Settings => System configs => General system config
+
+ - Add your **CLIENT_ID** to **GOOGLE_CLIENT_ID** and **CLIENT_SECRET** to **GOOGLE_CLIENT_SECRET** then click on the Save button
+
+
+
+ - Final touch, navigate to Settings => System configs => Integrations config
+
+ - Enable **USE DEFAULT GMAIL SERVICE**
+
+ - Enter your **GOOGLE GMAIL TOPIC**, **GOOGLE GMAIL SUBSCRIPTION NAME** names as single string
+
+
+
+ Now you are good to create your a Gmail integration
+
+### Facebook
+
+Erxes app can be integrated with facebook developer API and that means we can receive our Facebook pages' inbox messages directly to our erxes app's inbox. With the help of Facebook developer API we have many more possibilities, like receiving notifications about page comment, page post feed etc. There is an active development process going on this subject.
+
+#### Requirements:
+
+- Working sub domain with SSL pointing to your erxes-api server.
+- [Create a Facebook App](https://developers.facebook.com/docs/apps/)
+- [Create a Facebook Page](https://www.facebook.com/pages/creation/)
+
+
+**Configuration:**
+- Go to Erxes Settings => System config => Integrations config => Facebook.
+
+```
+FACEBOOK_APP_ID="your faceboook application's app id"
+FACEBOOK_APP_SECRET="your faceboook application's secret key"
+FACEBOOK_VERIFY_TOKEN="insert facebook application verify token"
+
+```
+
+
+#### Creating facebook app.
+
+1. Create new app.
+
+**For then test purpose you can use [ngrok](http://ngrok.io/) for your webhook**
+
+```Shell
+cd /path/to/erxes-integrations
+ngrok http 3400
+```
+
+When you start erxes-integration repo webhook will automatically created according to your configuration and you can find in your Nylas app [dashboard](https://dashboard.nylas.com/)
+#### Now we are ready to config our Nylas provider
+
+
+
+### Outlook
+Learn how to integrate Outlook Accounts With Erxes.
+Integrating the Outlook is easy peasy lemon squeezy, all we need is email and password no additional steps.
+
+**Configuration:**
+- Go to Erxes Settings => System config => Integrations config => Outlook.
+
+```
+# 32 bit characters
+# ex: aes-256-cbc
+ALGORITHM = '';
+ENCRYPTION_KEY=''
+```
+
+ - Go to Settings/App Store and click on Add button of the Outlook section
+
+
+
+
+
+ - Add following scopes in your OAuth consent screen
+
+ ```Shell
+ 'https://www.googleapis.com/auth/gmail.compose',
+ 'https://www.googleapis.com/auth/gmail.send'
+ 'https://www.googleapis.com/auth/gmail.readonly'
+ 'https://www.googleapis.com/auth/gmail.modify'
+ 'https://www.googleapis.com/auth/userinfo.email'
+ 'https://www.googleapis.com/auth/userinfo.profile'
+ ```
+ - After you create the [Google service account (refer to the link)](/administrator/system-config#service-account) download JSON and replace with **erxes-integrations/google_cred.json**
+
+
+
+Basic integration setting has done. Now you need to connect your account to Erxes.
+
+**Erxes Gmail integration settings:**
+
+1. Go to Erxes settings => App store
+2. Click on Add Gmail by Nylas. Connect your account.
+3. Select your brand and click save.
+4. Go to Setting => Channel=> Add new channel=> Connect gmail integration.
+
+### Yahoo
+In order to integrate the Yahoo you will need to generate app password for the Erxes, please follow below steps.
+ - Go to Settings/App Store and click on Add button of the Yahoo section
+
+
+
+
+
+
+
+
+
+
+
++ Copy API key value
+
+
+
+
+ **Configuration:**
+
+- Go to Erxes Settings => System config => Integrations config => WhatsApp Chat-API.
+
+
+
++ Paste API key to corresponding field.
+
++ Put your webhook url into CHAT-API WEBHOOK CALLBACK URL field.
++ For example 'https://erxes-integrations/whatsapp/webhook'
+
+When you start erxes-integration repo webhook will automatically created according to your configuration
+
+### Erxes WhatsApp integration settings.
+
+1. Go to your erxes.domain.com - settings - integrations page
+
+2. Copy your instanceId and token from [here](https://app.chat-api.com/dashboard)
+
+
+
+3. To connect to api, you need to scan the QR code from the device on which WhatsApp is registered.
+
++ If your account is registered less than a month ago, you need to pass a secure authorization to reduce the likelihood of blocking or authorization failure.
+
+
+
+4. Click on **Add Integrations** and select WhatsApp.
+
+
+
+5. Paste instanceId and token into corresponding fields
+
+6. Select your brand and click save.
+
+7. Go to Setting=> Channel=> Add new channel=> Connect facebook integration.
+
+
+## Sunshine Conversations API Integration
+
+1. Create your Sunshine Conversations API account [here](https://smooch.io/signup/).
+
+2. After you create a account. Sign in to [smooch.io](https://app.smooch.io/login).
+
+3. Create new Sunshine Conversations app
+
+
+
+4. Go to your created app. Then select Settings tab.
+
+
+
+5. In order to create api key click on "Generate API key".
+
+6. Copy and paste your App id, API Key ID and secret to Erxes Settings => System config => Integrations config => Sunshine Conversations API
+
+
+
+
+
+7. Put your webhook url into SMOOCH WEBHOOK CALLBACK URL field.
++ For example 'https://erxes-integrations/smooch/webhook'
+
+### Viber
+
+1. Create a Public Account
++ You can create an account for testing and development purpose by registering on the [Viber admin panel](https://partners.viber.com/). Note that accounts created this way can’t be discovered by the public and Viber limits the messaging volume on them.
+To create an account for production usage, contact Viber directly using [this form](https://support.viber.com/customer/portal/emails/new).
+
+2. Once you have your Public Account token, copy and paste it into Viber token field on the Add Viber page from erxes App Store. Then click on “Save”.
+
+
+
+
+
+
+### Telegram
+
+1. Sign in to telegram [here](https://web.telegram.org/#/login).
+
+2. In order to create telegram bot go to [BotFather](https://telegram.me/botfather).
+
+
+
+3. Type /newbot and send it to BotFather. Then follow the instructions from BotFather to create a bot.
+
+
+
+4. Then copy your bot token and paste it into Telegram Bot Token field on the add Telegram page from erxes App Store. Then click on “Save”
+
+
+
+
+
+
+
+## Engage configurationsmo
+
+### AWS SES
+
+Amazon SES service enables on Erxes Engage system. Another custom mail service is not allowed on Engage system.
+AWS SES configuration is similar with Integration AWS SES. [Go to settings here](https://docs.erxes.io/administrator/system-config#aws-ses)
+
+### Verify email
+
+Amazon places all new accounts in the Amazon SES sandbox. While your account is in the sandbox, you can use all of the features of Amazon SES. However, when your account is in the sandbox, Amazon have applied the following restrictions to your account:
+
++ You can only send mail to verified email addresses and domains, or to the Amazon SES mailbox simulator.
+
++ You can only send mail from verified email addresses and domains.
+
+Insert emails and verify it.
+
+
+### Send test email
+
+
diff --git a/docs/docs/developer/android-sdk.md b/docs/docs/developer/android-sdk.md
index a878e13cb57..d349dff8cc1 100644
--- a/docs/docs/developer/android-sdk.md
+++ b/docs/docs/developer/android-sdk.md
@@ -6,6 +6,7 @@ sidebar_label: Android SDK
+These steps indicate how to install the Android SDK, for that you must follow the instructions explained below.
## Installation
diff --git a/docs/docs/developer/contributing.md b/docs/docs/developer/contributing.md
index 6d9d95f11ea..5d6094999d5 100644
--- a/docs/docs/developer/contributing.md
+++ b/docs/docs/developer/contributing.md
@@ -3,15 +3,16 @@ id: contributing
title: Contributing
---
-## Contributing to erxes
+## Contributing to Erxes
-We would love for you to contribute to erxes and help make it even better than it is today! As a contributor, here are the guidelines we would like you to follow:
+We would love for you to contribute to Erxes and help make it even better than it is today! As a contributor, here are the guidelines we would like you to follow:
* [Issues and Bugs](#found-a-bug)
* [Feature Requests](#missing-a-feature)
* [Submission Guidelines](#submission-guidelines)
* [Coding Standards](#coding-standards)
-* [Commit Message Guidelines]()
+* [Commit Message Guidelines](#commit-message-guidelines)
+* [Swag for Contributions]()
### Found a Bug?
@@ -383,3 +384,9 @@ perf(inbox): remove graphiteWidth option
revert: feat(inbox): add 'graphiteWidth' option
This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
```
+## Swag for Contributions
+
+To show our appreciation, we are sending everyone who contributes to erxes a special package, which includes a t-shirt and stickers. [Click here](https://erxes.io/hubspot-alternative-erxes-swag) to claim your swag. (Worldwide free shipping included!)
+
+
+ 

- 2. Click on Select a project/New Project and enter the name of the project and create -
-

- 3. We need to enable Firebase API for our Google project - 4. Select a newly created project - 5. Click on Library from the left side menu - 6. Search Firebase Cloud Messaging API and click on the enable button -
-
- 7. Now we need a Firebase Project, let's create one - 8. Go to the Firebase Console website - 9. Click on create a project, enter your firebase project name and continue, it might take a while. -
-
- 10. Go to project settings. -
-
- 11. We are going to use Firebase Admin SDK to send a push notification. Thus we have to authenticate, in order to use Firebase feature, here comes the Firebase service account. Create the JSON key and download it. -
-


- 12. Now we have the Firebase service account, copy all values of the file you downloaded and replace all values to erxes-api/google_cred.json file -
-
+
+ - Create the Firebase project [click here](https://console.firebase.google.com/)
+
+
+
+ - Go to project settings.
+
+
+
+ - We are going to use Firebase Admin SDK to send a push notification. Thus we have to authenticate, in order to use Firebase feature, here comes the Firebase service account. Create the JSON key and download it.
+
+
+
+
+
+
+
+ - Now we have the Firebase service account, copy all values of the file you downloaded and replace all values to erxes-api/google_cred.json file
+
+
\ No newline at end of file
diff --git a/docs/docs/developer/troubleshooting.md b/docs/docs/developer/troubleshooting.md
new file mode 100644
index 00000000000..74f38f71e0d
--- /dev/null
+++ b/docs/docs/developer/troubleshooting.md
@@ -0,0 +1,40 @@
+---
+id: troubleshooting
+title: Troubleshooting
+sidebar_label: Troubleshooting
+---
+
+## Nylas
+Having troubles with your own Nylas App? We recommend you to read this [developer guide](https://docs.nylas.com/docs)
+
+## Integration
+* After you create an integration do not forget to add it to a channel, Otherwise, you will not see an email or message integration in Inbox
+
+## Password Encryption
+In Outlook, Yahoo, IMAP providers you will need to enter your password so following configs required for encryption
+- ALGORITHM
+- ENCRYPTION KEY
+
+
+
+## Nylas IMAP
+> Before you add IMAP account please make sure that you already config ENCRYPTION KEY, ALGORITHM [here](#password-encryption)
+
+When you create the IMAP account check you entered correct values for example:
+
+
+
+* Common [a List of SMTP and IMAP Server](https://www.arclab.com/en/kb/email/list-of-smtp-and-imap-servers-mailserver-list.html)
+* If you have Nylas IMAP specific problem read [here](https://docs.nylas.com/docs/imap)
+
+## Nylas Gmail
+* After removing your Nylas Gmail account from Erxes you will also need to revoke your Erxes app [Google App permissions]( https://myaccount.google.com/permissions)
+
+## Gmail
+* Before you use Gmail integration please make sure that you enter correct GOOGLE TOPIC, GOOGLE GMAIL SUBSCRIPTION NAME it should be single string otherwise you will get invalid_format error.
+
+
+
+* Permission Denied, when creating or checking Google Topic and Subscription make sure your service account has owner role in IAM & Admin -> IAM
+
+* If you are not receiving any emails, please check you add Grant Publish Topic right to **gmail-api-push@system.gserviceaccount.com** in IAM & Admin -> IAM -> Add
\ No newline at end of file
diff --git a/docs/docs/installation/aws.md b/docs/docs/installation/aws.md
new file mode 100644
index 00000000000..2ca938a5ed9
--- /dev/null
+++ b/docs/docs/installation/aws.md
@@ -0,0 +1,80 @@
+---
+id: aws
+title: AWS Marketplace
+---
+
+Launch an EC2 instance selecting `erxes` in the AWS Marketplace.
+Once you have created the EC2 instance using erxes AMI product in the AWS Marketplace, you will then have erxes up and running and it will be accessible by public hostname of the EC2 instance.
+
+## Create an admin user
+
+Connect to your EC2 instance via ssh.
+
+`ssh -i your.pem ubuntu@your-instance-dns`
+
+Run the following commands.
+
+```sh
+sudo su erxes
+cd ~/erxes-api
+export MONGO_URL=mongodb://localhost/erxes?replicaSet=rs0
+```
+
+The following will create an admin user admin@erxes.io with a random password (check your console to grab the password)
+
+```
+yarn initProject
+```
+
+## Load initial data
+
+The below command will create initial permission groups, permissions, growth hack templates, email templates and some sample data and reset the admin password (check your console to grab the password)
+
+```
+yarn loadInitialData
+```
+
+If do not want to load sample data then you can run the following command just to load permissions.
+
+```
+yarn loadPermission
+```
+
+Now you can access erxes using the EC2 public hostname.
+Hooray!!!
+
+## Use your own domain
+
+To be able to use your own domain with erxes, you will need to do a few steps.
+
+1. Update your domain DNS records - point your domain to your EC2 public IP address. The DNS changes may take up to 72 hours to propagate worldwide.
+
+2. Log in to your server as `erxes` via `ssh`.
+
+3. Edit `/home/erxes/erxes/ui/build/js/env.js` file where env vars for frontend app are stored.
+ The content of the file should be as follows:
+
+ ```javascript
+ window.env = {
+ PORT: 3000,
+ NODE_ENV: "production",
+ REACT_APP_API_URL: "http://your_domain/api",
+ REACT_APP_API_SUBSCRIPTION_URL: "ws://your_domain/api/subscriptions",
+ REACT_APP_CDN_HOST: "http://your_domain/widgets"
+ };
+ ```
+
+4. Update all env vars with HTTP url in the `/home/erxes/ecosystem.json` file.
+
+5. Now, you need to restart pm2 erxes processes by running the following command:
+
+ ```sh
+ pm2 restart ecosystem.json
+ ```
+
+6. Switch to `root` user and update your nginx config
+ `server_name` with your domain.
+
+7. Lastly reload your nginx service by running `systemctl reload nginx`
+
+Now you can use erxes with your own domain.
diff --git a/docs/docs/installation/centos8.md b/docs/docs/installation/centos8.md
index a690799b2b4..25006b02a60 100644
--- a/docs/docs/installation/centos8.md
+++ b/docs/docs/installation/centos8.md
@@ -3,6 +3,8 @@ id: centos8
title: CentOS 8
---
+This steps explain how to install Erxes on CentOS 8.
+
## Installing erxes on CentOS 8
To have erxes up and running quickly, you can follow the following steps.
@@ -15,11 +17,37 @@ To have erxes up and running quickly, you can follow the following steps.
**Note**: you will be asked to provide a domain for nginx server to set up config for erxes
-3. This installation will create a new user `erxes`. Run the following command to change your password.
+3. Log in to your domain DNS and create A record based on your new server IP.
+
+## Create an admin user
+
+Switch to user `erxes` and run the following commands based on your needs.
+
+```sh
+su erxes
+cd ~/erxes-api
+export MONGO_URL=mongodb://localhost/erxes?replicaSet=rs0
+```
+
+The following will create an admin user admin@erxes.io with a random password (check your console to grab the password)
+
+```
+yarn initProject
+```
+
+## Load initial data
+
+The below command will create initial permission groups, permissions, growth hack templates, email templates and some sample data and reset the admin password (check your console to grab the password)
+
+```
+yarn loadInitialData
+```
- `passwd erxes`
+If do not want to load sample data then you can run following command just to load permissions.
-4. Log in to your domain DNS and create A record based on your new server IP.
+```
+yarn loadPermission
+```
Now you have erxes up and running!
@@ -31,34 +59,34 @@ The following is the demonstration of how to secure your nginx by installing let
1. Log in to your server as `root` via `ssh` and run the following commands.
- ```sh
- curl -O https://dl.eff.org/certbot-auto
- mv certbot-auto /usr/local/bin/certbot-auto
- chmod 0755 /usr/local/bin/certbot-auto
- /usr/local/bin/certbot-auto --nginx
- ```
+```sh
+curl -O https://dl.eff.org/certbot-auto
+mv certbot-auto /usr/local/bin/certbot-auto
+chmod 0755 /usr/local/bin/certbot-auto
+/usr/local/bin/certbot-auto --nginx
+```
- `/usr/local/bin/certbot-auto --nginx` command will install multiple Python packages that are required by certbot and prompt you to answer some questions. Please follow the interactive prompt.
+`/usr/local/bin/certbot-auto --nginx` command will install multiple Python packages that are required by certbot and prompt you to answer some questions. Please follow the interactive prompt.
2. Log in to your server as `erxes` via `ssh` or switch to `erxes` from `root` user.
Edit `erxes/build/js/env.js` file where env vars for frontend app are stored.
The content of the file should be as follows:
- ```javascript
- window.env = {
- PORT: 3000,
- NODE_ENV: "production",
- REACT_APP_API_URL: "https://your_domain/api",
- REACT_APP_API_SUBSCRIPTION_URL: "wss://your_domain/api/subscriptions",
- REACT_APP_CDN_HOST: "https://your_domain/widgets"
- };
- ```
+```javascript
+window.env = {
+ PORT: 3000,
+ NODE_ENV: "production",
+ REACT_APP_API_URL: "https://your_domain/api",
+ REACT_APP_API_SUBSCRIPTION_URL: "wss://your_domain/api/subscriptions",
+ REACT_APP_CDN_HOST: "https://your_domain/widgets"
+};
+```
3. Update all env vars with HTTPS url in the `ecosystem.json` file.
4. Finally, you need to restart pm2 erxes processes by running the following command:
- ```sh
- pm2 restart ecosystem.json
- ```
+```sh
+pm2 restart ecosystem.json
+```
- If you need more information about pm2, please go to official documentation [here](https://pm2.keymetrics.io/docs/usage/application-declaration/).
+If you need more information about pm2, please go to official documentation [here](https://pm2.keymetrics.io/docs/usage/application-declaration/).
diff --git a/docs/docs/installation/debian10.md b/docs/docs/installation/debian10.md
index 23ecee09f08..af7d9e3da40 100644
--- a/docs/docs/installation/debian10.md
+++ b/docs/docs/installation/debian10.md
@@ -3,6 +3,8 @@ id: debian10
title: Debian 10
---
+This steps explain how to install Erxes on Debian 10.
+
## Installing erxes on Debian 10
To have erxes up and running quickly, you can follow the following steps.
@@ -15,11 +17,37 @@ To have erxes up and running quickly, you can follow the following steps.
**Note**: you will be asked to provide a domain for nginx server to set up config for erxes
-3. This installation will create a new user `erxes`. Run the following command to change password.
+3. Log in to your domain DNS and create A record based on your new server IP.
+
+## Create an admin user
+
+Switch to user `erxes` and run the following commands based on your needs.
+
+```sh
+su erxes
+cd ~/erxes-api
+export MONGO_URL=mongodb://localhost/erxes?replicaSet=rs0
+```
+
+The following will create an admin user admin@erxes.io with a random password (check your console to grab the password)
+
+```
+yarn initProject
+```
+
+## Load initial data
+
+The below command will create initial permission groups, permissions, growth hack templates, email templates and some sample data and reset the admin password (check your console to grab the password)
+
+```
+yarn loadInitialData
+```
- `passwd erxes`
+If do not want to load sample data then you can run following command just to load permissions.
-4. Log in to your domain DNS and create A record based on your new server IP.
+```
+yarn loadPermission
+```
Now you have erxes up and running!
@@ -33,21 +61,21 @@ Once you have installed your ssl certificate, you need to update env vars.
2. Edit `erxes/build/js/env.js` file where env vars for frontend app are stored.
The content of the file should be as follows:
- ```javascript
- window.env = {
- PORT: 3000,
- NODE_ENV: "production",
- REACT_APP_API_URL: "https://your_domain/api",
- REACT_APP_API_SUBSCRIPTION_URL: "wss://your_domain/api/subscriptions",
- REACT_APP_CDN_HOST: "https://your_domain/widgets"
- };
- ```
+```javascript
+window.env = {
+ PORT: 3000,
+ NODE_ENV: "production",
+ REACT_APP_API_URL: "https://your_domain/api",
+ REACT_APP_API_SUBSCRIPTION_URL: "wss://your_domain/api/subscriptions",
+ REACT_APP_CDN_HOST: "https://your_domain/widgets"
+};
+```
3. Update all env vars with HTTPS url in the `ecosystem.json` file.
4. Finally, you need to restart pm2 erxes processes by running the following command:
- ```sh
- pm2 restart ecosystem.json
- ```
+```sh
+pm2 restart ecosystem.json
+```
- If you need more information about pm2, please go to official documentation [here](https://pm2.keymetrics.io/docs/usage/application-declaration/).
+If you need more information about pm2, please go to official documentation [here](https://pm2.keymetrics.io/docs/usage/application-declaration/).
diff --git a/docs/docs/installation/digitalocean.md b/docs/docs/installation/digitalocean.md
new file mode 100644
index 00000000000..6ae28f51149
--- /dev/null
+++ b/docs/docs/installation/digitalocean.md
@@ -0,0 +1,77 @@
+---
+id: digitalocean
+title: DigitalOcean Marketplace
+---
+
+Launch a Droplet selecting `erxes` in the DigitalOcean Marketplace.
+Once you have created the Droplet, you will then have erxes up and running and it will be accessible by public IP address of the Droplet.
+
+## Create an admin user
+
+Connect to your Droplet instance via ssh.
+
+Run the following commands.
+
+```sh
+sudo su erxes
+cd ~/erxes-api
+export MONGO_URL=mongodb://localhost/erxes?replicaSet=rs0
+```
+
+The following will create an admin user admin@erxes.io with a random password (check your console to grab the password)
+
+```
+yarn initProject
+```
+
+## Load initial data
+
+The below command will create initial permission groups, permissions, growth hack templates, email templates and some sample data and reset the admin password (check your console to grab the password)
+
+```
+yarn loadInitialData
+```
+
+If do not want to load sample data then you can run the following command just to load permissions.
+
+```
+yarn loadPermission
+```
+
+Now you can access erxes by your Droplet IP address.
+
+## Use your own domain
+
+To be able to use your own domain with erxes, you will need to do a few steps.
+
+1. Update your domain DNS records - point your domain to your Droplet public IP address. The DNS changes may take up to 72 hours to propagate worldwide.
+
+2. Log in to your server as `erxes` via `ssh`.
+
+3. Edit `/home/erxes/erxes/ui/build/js/env.js` file where env vars for frontend app are stored.
+ The content of the file should be as follows:
+
+ ```javascript
+ window.env = {
+ PORT: 3000,
+ NODE_ENV: "production",
+ REACT_APP_API_URL: "http://your_domain/api",
+ REACT_APP_API_SUBSCRIPTION_URL: "ws://your_domain/api/subscriptions",
+ REACT_APP_CDN_HOST: "http://your_domain/widgets"
+ };
+ ```
+
+4. Update all env vars with HTTP url in the `/home/erxes/ecosystem.json` file.
+
+5. Now, you need to restart pm2 erxes processes by running the following command:
+
+ ```sh
+ pm2 restart ecosystem.json
+ ```
+
+6. Switch to `root` user and update your nginx config
+ `server_name` with your domain.
+
+7. Lastly reload your nginx service by running `systemctl reload nginx`
+
+Now you can use erxes with your own domain.
diff --git a/docs/docs/installation/docker.md b/docs/docs/installation/docker.md
index 89c0377b068..3e3e1879b00 100644
--- a/docs/docs/installation/docker.md
+++ b/docs/docs/installation/docker.md
@@ -3,6 +3,8 @@ id: docker
title: Docker
---
+This steps explain how to install Erxes on Docker Hub, to do it, follow the instructions.
+
[erxes on docker hub](https://hub.docker.com/u/erxes/)
## Prerequisites
diff --git a/docs/docs/installation/heroku.md b/docs/docs/installation/heroku.md
index 327708e53ce..6be56fcd5fb 100644
--- a/docs/docs/installation/heroku.md
+++ b/docs/docs/installation/heroku.md
@@ -3,7 +3,9 @@ id: heroku
title: Heroku
---
-## Deploying erxes on Heroku
+Learn how to deploy Erxes on Heroku.
+
+## Deploying Erxes on Heroku
Heroku is a container-based cloud Platform as a Service (PaaS).
diff --git a/docs/docs/installation/ubuntu.md b/docs/docs/installation/ubuntu.md
index e55fd45ae4e..9ed54ca112b 100644
--- a/docs/docs/installation/ubuntu.md
+++ b/docs/docs/installation/ubuntu.md
@@ -3,11 +3,11 @@ id: ubuntu
title: Ubuntu 16.04/18.04 LTS
---
-Manual installation on Ubuntu 16.04/18.04 LTS.
+This document explains how to manually install Ubuntu 16.04 / 18.04 LTS.
## Prerequisites
-There are a couple of pre-reqs for running erxes. This page explain how to quickly install the requirenment needed on an Ubuntu 16.04/18.04 server.
+There are a couple of pre-reqs for running erxes. This page explains how to quickly install the requirement needed on an Ubuntu 16.04/18.04 server.
This guide assumes that the server does not have any other services running on it.
### Install MongoDB v3.6.x
diff --git a/docs/docs/installation/upgrade.md b/docs/docs/installation/upgrade.md
index fa7eb116d68..37c2aadc483 100644
--- a/docs/docs/installation/upgrade.md
+++ b/docs/docs/installation/upgrade.md
@@ -4,10 +4,12 @@ title: Upgrade
sidebar_label: Upgrade
---
+Following the steps in this document you can upgrade the system version.
+
## Upgrading from v0.9+ to the latest release vx.x.x
### Breaking Changes
-- Since version `latest vx.x.x` erxes started using RabbitMQ as message broker service. To update, please see example changes at docker [installation guide.](docker)
+- Since version `latest vx.x.x` Erxes started using RabbitMQ as message broker service. To update, please see example changes at docker [installation guide.](docker)
- Engage module is moved to [separate repository](https://github.com/erxes/erxes-engages-email-sender). Also docker [installation guide](docker) is updated to reflect related changes.
### Env changes
diff --git a/docs/docs/overview/architecture-overview.md b/docs/docs/overview/architecture-overview.md
index febde68b788..d2770101b50 100644
--- a/docs/docs/overview/architecture-overview.md
+++ b/docs/docs/overview/architecture-overview.md
@@ -5,15 +5,16 @@ sidebar_label: Architecture Overview
---
+This document describes the main architecture overview of Erxes.
Erxes at its core is a repository that collects all customer requests from various channels including web chats, Facebook, Twitter, Gmail and provides the ability to respond to those requests from one unified location. In order to accomplish these goals, we have 4 main projects.
-
-
+
+
+
+
+
+
+
+
+
+
-1. **Filter** your leads by **tags**
-2. List of **Created leads**
-3. Click **Create lead**
+1. **Filter** your pop ups by **tags**
+2. List of **Created pop ups**
+3. Click **Create pop up**
---
-## Create Leads
+## Create Pop ups
-- Please follow the steps for setup: **Leads->Create Leads->Type**
+- Please follow the steps for setup: **Pop ups->Create Pop ups->Type**
-1. Insert **Title** for the Leads
+1. Insert **Title** for the Pop ups
2. Choose the **Type**
3. Click **Next**
@@ -44,11 +44,11 @@ Turn regular visitors into qualified leads by capturing them with a customizable
-- Please follow the next steps for setup: **Leads->Create Leads->Type->Callout**
+- Please follow the next steps for setup: **Pop ups->Create Pop ups->Type->Callout**
1. **CallOut section**
@@ -64,7 +64,7 @@ Turn regular visitors into qualified leads by capturing them with a customizable
-- Please follow the steps for setup: **Leads->Create Leads->Type->Callout->Form**
+- Please follow the steps for setup: **Pop ups->Create Pop ups->Type->Callout->Form**
@@ -83,7 +83,7 @@ Turn regular visitors into qualified leads by capturing them with a customizable
13. Click on the form section to change the order
@@ -92,7 +92,7 @@ Turn regular visitors into qualified leads by capturing them with a customizable
-- Please follow the next steps for setup: **Leads->Create Leads->Type->Callout->Form->Options**
+- Please follow the next steps for setup: **Pop ups->Create Pop ups->Type->Callout->Form->Options**
@@ -106,7 +106,7 @@ Turn regular visitors into qualified leads by capturing them with a customizable
-- Please follow the next steps for setup: **Leads->Create Leads->Type->Callout->Form->Options->Thank**
+- Please follow the next steps for setup: **Pop ups->Create Pop ups->Type->Callout->Form->Options->Thank**
@@ -119,9 +119,9 @@ Turn regular visitors into qualified leads by capturing them with a customizable
-## Lead Full Preview
+## Pop up Full Preview
-- Please follow the next steps for setup: **Leads->Create Leads->Type->Callout->Form->Options->Thank Content-> Full Preview**
+- Please follow the next steps for setup: **Pop ups->Create Pop ups->Type->Callout->Form->Options->Thank Content-> Full Preview**
-
-
-
-
-
+### Manipulate your messenger function
+
+A messenger can be launched programmatically on some user interaction, "like clicking on request for help button". Rather than attaching to document, there should be an option to attach the erxes launcher to a specific element, as it causes the problem in single-page apps since it is not ideal to display the launcher icon in every page.You are now able to manipulate your messenger functions such as change the appearance of a messenger style, a position as well as you can set up the button on your website to call the messenger on specified page.
+
+#### Button submit
+Ability to call submit from outside (parent website), which means listen for callSubmit action from outside to force submit action. For example, you can add any button to call action to open your messenger. There is a window.Erxes.showMessenger() function available on the window object. You can use this function to show messenger programmatically. Insert the following script inside your messenger script code.
+
+```
+ document.getElementById('button').onclick = () => {
+ window.Erxes.showMessenger()
+ }
+```
+
+First you need uncheck show launcher check to hide default handler. When you check show launcher, the widget section will invisible but you can still callSubmit action to get messenger.
+
+
+
+Insert the following script inside your messenger script code.
+
+
+
+Once you click submit button on your website, messenger will open.
+
+
+
+
+
+
+#### Messenger position
+
+As part of the support system inside the web, it is always difficult to fix the position of launcher icon to the bottom, or right left position, especially on mobile, since it overlaps with other elements, especially bottom navbar.
+
+You can manipulate the position of the messenger body like following. The messenger is show left side of your website.
+```
+
+```
+
+
+
+
+#### CSS style
+Ability to change form css from parent. In some cases, the developer wants to hide form title, button or modify some auto-generated CSS. Refer the following example of css file.
+
+```
+.erxes-embed-iframe {
+margin-top: 100px !important;
+margin-bottom: 100px !important;
+height: 500px !important;
+}
+
+#erxes-messenger-container {
+left: 0;
+}
+
+#erxes-messenger-iframe {
+left: 24px;
+}
+
+#erxes-messenger-container:after {
+left: -300px;
+transform: scaleX(-1);
+}
+
+#erxes-messenger-container.erxes-messenger-shown:after {
+left: -20px;
+}
+
+```
+The messenger position is now left side.
+
## Advanced combination installation
@@ -746,7 +842,7 @@ This is the script install instruction of Pop-Ups form with Messenger which cont
1. In this combination, first you need to follow the instruction of (M+P+K). Click to the link and check reference.
- [**(M + P + K)**](https://docs.erxes.io/docs/user/script-install#web-messenger--pop-ups--knowledgebase-mpk)
+ [**(M + P + K)**](https://docs.erxes.io/user/script-install#web-messenger--pop-ups--knowledgebase-mpk)
2. Go to Pop-Ups menu from left sidebar (see the below figure).
3. Click on the install code button from the right side (see the below figure).
@@ -788,7 +884,7 @@ This is the script install instruction of Knowledgebase form with Messenger whic
1. In this combination, first you need to follow the instruction of (M+P+K). Click to the link and check reference.
- [**(M + P + K)**](https://docs.erxes.io/docs/user/script-install#web-messenger--pop-ups--knowledgebase-mpk)
+ [**(M + P + K)**](https://docs.erxes.io/user/script-install#web-messenger--pop-ups--knowledgebase-mpk)
2. Go to Knowledge Base menu from left sidebar (see the below figure).
@@ -826,7 +922,7 @@ This is the script install instruction of Pop-Ups, Knowledgebase form with Messe
1. In this combination, first you need to follow the instruction of (M+P+K). Click to the link and check reference.
- [**(M + P + K)**](https://docs.erxes.io/docs/user/script-install#web-messenger--pop-ups--knowledgebase-mpk)
+ [**(M + P + K)**](https://docs.erxes.io/user/script-install#web-messenger--pop-ups--knowledgebase-mpk)
2. Go to Pop-Ups menu from left sidebar (see the below figure).
3. Click on the install code button from the right side (see the below figure).
@@ -1172,7 +1268,7 @@ This is the install instruction of messenger based popup and knowledgebase combi
1. In this combination, first you need to follow the instruction of (M+P+K). Click to the link and check reference.
- [**(M + P + K)**](https://docs.erxes.io/docs/user/script-install#web-messenger--pop-ups--knowledgebase-mpk-1)
+ [**(M + P + K)**](https://docs.erxes.io/user/script-install#web-messenger--pop-ups--knowledgebase-mpk-1)
2. Go to Pop-Ups menu from left sidebar (see the below figure).
3. Click on the install code button from the right side (see the below figure).
@@ -1243,7 +1339,7 @@ This is the install instruction of messenger based popup and knowledgebase combi
1. In this combination, first you need to follow the instruction of (M+P+K). Click to the link and check reference.
- [**(M + P + K)**](https://docs.erxes.io/docs/user/script-install#web-messenger--pop-ups--knowledgebase-mpk-1)
+ [**(M + P + K)**](https://docs.erxes.io/user/script-install#web-messenger--pop-ups--knowledgebase-mpk-1)
2. Go to Knowledge Base menu from left sidebar (see the below figure).
@@ -1297,7 +1393,7 @@ This is the install instruction of messenger based popup and knowledgebase combi
1. In this combination, first you need to follow the instruction of (M+P+K). Click to the link and check reference.
- [**(M + P + K)**](https://docs.erxes.io/docs/user/script-install#web-messenger--pop-ups--knowledgebase-mpk-1)
+ [**(M + P + K)**](https://docs.erxes.io/user/script-install#web-messenger--pop-ups--knowledgebase-mpk-1)
2. Go to Pop-Ups menu from left sidebar (see the below figure).
3. Click on the install code button from the right side (see the below figure).
@@ -1415,14 +1511,14 @@ This is the script install instruction of Messenger contains Pop-Ups form or Mes
1. Go to Advanced combination installation => Web messenger + Pop-Ups (or Knowledgebase).
-[**Advanced combination installation**](https://docs.erxes.io/docs/user/script-install#web-messenger--pop-ups-or-knowledgebase)
+[**Advanced combination installation**](https://docs.erxes.io/user/script-install#web-messenger--pop-ups-or-knowledgebase)
2. Then follow steps number from 1 to 6 of the instruction for Web messenger + Pop-Ups (or Knowledgebase).
#### Step 2: Copy script and paste the code
3. After that, follow the instruction of Erxes script manager => Web messenger. The messenger, you have to select which you created messenger.
-[**Erxes script installation**](https://docs.erxes.io/docs/user/script-install#web-messenger-2)
+[**Erxes script installation**](https://docs.erxes.io/user/script-install#web-messenger-2)
#### Step 3: Result
@@ -1444,7 +1540,7 @@ This is the install instruction of messenger based popup and knowledgebase combi
1. Go to Advanced combination installation => Web messenger + Pop-Ups + Knowledgebase.
-[**Advanced combination installation**](https://docs.erxes.io/docs/user/script-install#web-messenger--pop-ups--knowledgebase-mpk)
+[**Advanced combination installation**](https://docs.erxes.io/user/script-install#web-messenger--pop-ups--knowledgebase-mpk)
2. Then follow steps number from 1 to 9 of the instruction for Web messenger + Pop-Ups + Knowledgebase.
@@ -1452,7 +1548,7 @@ This is the install instruction of messenger based popup and knowledgebase combi
3. After that, follow the instruction of Erxes script manager => Web messenger. The messenger, you have to select which you created messenger.
-[**Erxes script installation**](https://docs.erxes.io/docs/user/script-install#web-messenger-2)
+[**Erxes script installation**](https://docs.erxes.io/user/script-install#web-messenger-2)
#### Step 3: Result
@@ -1466,7 +1562,7 @@ This is the install instruction of messenger based popup and knowledgebase combi
1. In this combination, first you need to follow the Erxes script instruction of (M+P+K). Click to the link and check reference.
- [**Erxes Script (M + P + K)**](https://docs.erxes.io/docs/user/script-install#web-messenger--pop-ups--knowledgebase-mpk-2)
+ [**Erxes Script (M + P + K)**](https://docs.erxes.io/user/script-install#web-messenger--pop-ups--knowledgebase-mpk-2)
2. Go to Settings menu => Script manager (see the below figure).
@@ -1522,7 +1618,7 @@ This is the install instruction of messenger based popup and knowledgebase combi
1. In this combination, first you need to follow the Erxes script instruction of (M+P+K). Click to the link and check reference.
- [**Erxes Script (M + P + K)**](https://docs.erxes.io/docs/user/script-install#web-messenger--pop-ups--knowledgebase-mpk-2)
+ [**Erxes Script (M + P + K)**](https://docs.erxes.io/user/script-install#web-messenger--pop-ups--knowledgebase-mpk-2)
2. Go to Settings menu => Script manager (see the below figure).
diff --git a/docs/docs/user/segments.md b/docs/docs/user/segments.md
new file mode 100644
index 00000000000..5ceba1e2b50
--- /dev/null
+++ b/docs/docs/user/segments.md
@@ -0,0 +1,107 @@
+---
+id: segments
+title: Segments
+---
+
+
+Coordinate and manage your companies and customers in one go from company database. It enables you to filter companies and customers by websites, size, plan industry, session count in an more realistic way.
+
+---
+
+## Setup segment
+Segment is a customer data management and analytics solution that helps you make sense of customer and company data coming from multiple sources.
+
++ Please follow the steps for setup: Certain Features ->Segment > Add Segment
+
+1. Click on top right corner of segment
+2. Click New segment
+
+
+
+
+
+
-
-
-
@@ -28,6 +28,30 @@ title: Subscription getting started
2. Click **Create** to confirm
3. Click for **Initial Setup**
+---
+## Signing in
+
+To sign in, navigate to the erxes sign-in page.
+
+
+
-
-
-
-
-
@@ -211,7 +236,7 @@ export default class Stage extends React.Component{__(desc)}
+{this.props.customer.position}
; } - renderStatus(isUser) { - return| {__('Tax')}: | -{this.renderTotal(tax)} | +{__('Discount')}: | +{this.renderTotal(discount, 'discount')} |
| {__('Discount')}: | -{this.renderTotal(discount)} | +{__('Tax')}: | +{this.renderTotal(tax, 'tax')} |
| {__('Total')}: | -{this.renderTotal(total)} | +{this.renderTotal(total, 'total')} |