In this article:
- Overview
- SFTP Server Configuration
- Inbound Subscriptions
- Outbound Subscriptions
- Subscription Jobs Configuration
Overview
This article aims to provide a comprehensive guide for configuring Inbound and Outbound Subscriptions. This functionality offers Genius CE and Enterprise Admin users a streamlined and secure method for transferring data files between systems.
- The "Inbound Subscriptions" feature enables automatic, scheduled subscriptions that import CSV files via an SFTP channel. The import process adheres to the existing CSV import and template standards currently in use.
- The "Outbound Subscriptions" feature enables automatic, scheduled subscriptions for receiving reports via a designated channel. These reports can be generated based on a SQL Query or a pre-existing custom report.
There are two channels available for receiving these subscriptions:
- SFTP
- Send reports via HTTP
SFTP Server Configuration
To utilize the Inbound/Outbound SFTP subscription, it is essential to register or set up an SFTP server that Genius CE or Enterprise will use to retrieve the CSV files.
- To register a new SFTP server, navigate to the Administration > Integrations > SFTP Servers section.
- By clicking the "Add New SFTP Server" link, a pop-up window will appear, allowing you to configure a new SFTP server.
- Once all required information has been entered, the user can validate their access to the SFTP server by clicking the "Test SFTP Settings" button. This test will create a dummy file and attempt to transfer it to the SFTP server, thereby confirming the connection.
- If the test is successful, the system will display a message indicating, “The test file was transferred successfully,” and a CSV file will be transferred to the specified server.
- In the event of any issues during the test, the system will show an error message detailing the server's response.
-
After completing the test, ensure to save the SFTP server information, which will then be available for subscription configuration.
Inbound Subscriptions
To create or modify an inbound subscription, access the Administration menu and navigate to Integrations > Inbound Subscription. This page displays all available subscriptions, along with logs from their executions.
- To create a new subscription, click on the "Add New Subscription" link.
Below is an explanation of each field:
- Name: This is the designation for the newly created subscription.
-
Pattern Name: This field specifies the name pattern that the system will search for in the SFTP directory. For instance, if you register the term "LEARNERS_", the system will look for all files that start with this term. Here are some examples of files that would match this pattern:
- LEARNERS_2023.csv
- LEARNERS_FIRST_EXAMPLE.csv
- LEARNERS_20230801_120000.csv
- Periodicity: This indicates the frequency at which these reports will be dispatched to the designated destination.
-
Type: This refers to the types of imports that the system supports. Currently, this list mirrors what is available on the AdmBulkImport page:
- Users
- Inventory
- Learners
- Courses
- Sections
- Teachers
- Enrollments
- Meeting_times
- External_courses
- Affiliations
- Learning_path_assignments
- Recipients: This field accepts email addresses that will receive notifications regarding the execution of the subscription or the generated report file if the selected delivery method is “Email.” If multiple emails are entered, they should be separated by either a comma (",") or a semicolon (";").
- SFTP Server: Here, you will select the SFTP server designated to receive the file.
Once the subscription is registered, the system will execute these subscriptions according to the configured frequency. Both jobs must remain active for the process to function as intended.
- Two jobs are responsible for processing and sending:
- "inboundSubscription.Create”: This job is responsible for validating the schedule, searching for files on the SFTP, and registering these files in Genius CE or Enterprise.
- "InboundSubscription.Process”: This job handles the importation of the file and notifies users via email about the results of the processing.
Processing Logs
Users can monitor execution through logs within the system and can re-trigger a specific subscription if necessary.
- To access the log, simply click on the button labeled on the Subscription screen.
Subscription execution logs:
This screen displays logs from the past 30 days.
- To re-process the file, click on the following button:
Inbound Subscription Jobs Configuration
To configure the jobs related to processing and sending subscriptions, navigate to the Administration menu and select 'Edit Jobs'. Two jobs must be active.
- For the "InboundSubscription.Create" job, it is recommended to schedule it to run "EVERY_DAY" at a time that falls outside of peak usage hours for Enterprise+ to prevent concurrency issues.
2. The recommended frequency for the "InboundSubscription.Process" job is also "EVERY_DAY," but it should be scheduled to run a few hours after the "InboundSubscription.Create" job.
-
After processing, if the file is processed successfully, it will be moved within the SFTP to the folder “/PROCESSED/SUCCESS.” Conversely, if an error occurs, the file will be relocated to the folder “/PROCESSED/ERROR.”
Outbound Subscriptions
To create or modify an outbound subscription, access the Reports menu and navigate to Administration > Integrations > Outbound Subscription. This page displays all available subscriptions, along with their execution logs.
- To create a new subscription, click on the "Add New Subscription" link.
Below is an explanation of each field:
- Name: This is the name or nickname assigned to the created subscription.
- Periodicity: This indicates the frequency at which these reports will be dispatched to the specified destination.
- Type: Here, you select how the file will be made available, either through Email or SFTP.
- Recipients: This field accepts email addresses that will receive notifications about the execution of the subscription or the generated report file if the selected delivery method is “Email.” If multiple emails are specified, they should be separated by either a comma (",") or a semicolon (";").
- SFTP Server: Select the SFTP server designated to receive the file.
- Report: You may select a pre-registered report to be sent.
- SQL Query: This text field is intended for entering an SQL query that will be utilized to generate the report that will be sent.
The SFTP Server option will only appear if you select SFTP in the Type field.
- You can either select the Report or enter the SQL query.
- Once the subscription is registered, the system will execute the subscription according to the configured frequency.
There are two jobs responsible for processing and sending:
- “Subscriptions.Create”: This job is responsible for validating the schedule, executing the report, and saving the file in the designated storage.
- “Subscriptions.Send”: This job is tasked with sending the files to the configured destination.
Both jobs must be active for the process to function as expected.
Send Reports via HTTP
When selecting the HTTP delivery type, you’ll configure:
- Endpoint URL – The secure web address where the report should be sent.
- Maximum File Size (MB) – Set a size limit for the delivery (default is 10MB, maximum is 100MB).
This helps ensure your receiving system can handle the file size appropriately.
Note: CSV, TXT, and JSON formats are currently supported. You can also define and add a time stamp to the file name.
Based on the timeframe that is selected, we will send your report to a secure web address (URL) you provide, package the file securely within the request, and deliver it directly to your receiving system.
Processing Logs
Users can monitor execution through logs within the system and can re-trigger a specific subscription if necessary.
- To access the log, simply click on the button marked on the Subscription screen.
Subscription execution logs:
-
This screen will display logs from the last 7 days. You can download the sent file through your browser, and also request the resending of a specific file.
- To request that a file be resent, click on the following button:
-
- To download the file in your browser, click on the following button:
-
-
On this screen, the "Status" field indicates whether the entire processing was successful or if any issues occurred during the processing or sending of the file.
-
Subscription Jobs Configuration
To configure the jobs related to processing and sending subscriptions, navigate to the Administration menu and select 'Edit Jobs'. Two jobs must be active:
- For the "Subscriptions.Create" job, it is recommended to schedule it to run "EVERY_DAY" at a time that is outside of Genius CE & Enterprise's peak usage hours to avoid concurrency issues.
2. For the "Subscriptions.Send" job, it is advisable to set the frequency to "EVERY_DAY," but it should run a few hours after the "Subscriptions.Create" job has completed.
It is important to note that there are two jobs dedicated to executing the inbound subscription, ensuring resilience and retry processes. The system does not download and process files simultaneously, so if a user neglects to configure the job correctly or forgets to enable the import process, it will not execute as intended.
- InboundSubscription.Create: This job is responsible for downloading all files from all SFTP servers.
- InboundSubscription.Process: This job is responsible for importing the downloaded files.
Steps for Creating a Periodic Email or SFTP Report (Through Subscriptions):
- Activate the jobs that facilitate the execution of email reports
- Navigate to “Edit Jobs”
- “Subscriptions.Create” – This job is responsible for creating the subscriptions that need to be sent out at specified intervals.
- “Subscriptions.Send” – This job is responsible for sending out the subscriptions at specified intervals.
- Please note that increasing the frequency of these two jobs may impact the latency of your instance.
- Additionally, instead of waiting for the scheduled frequency of these jobs, an admin user has the option to click the play button next to each job to run it immediately. It is always advisable to run the “Subscriptions.Create” job prior to the “Subscriptions.Send” job. Doing so will redirect you to the Hangfire dashboard, where you can confirm job execution.
- Construct an email or SFTP report through Outbound Subscriptions
- Navigate to Administration --> Integrations --> Outbound Subscriptions
- Click “Add new subscription.”
- Assign a name of your choice.
- Select the periodicity.
- Choose between Email or SFTP.
- Add relevant recipient(s).
- If SFTP is selected, ensure you have an SFTP setup in your Genius CE or Enterprise instance.
- Select the report you wish to send ,OR paste in a SQL query.
- Please note that any custom report you create in your Genius CE or Enterprise instance should be listed among the available reports.
Comments
0 comments
Please sign in to leave a comment.