Download the PHP package remp/crm-scenarios-module without Composer

On this page you can find all versions of the php package remp/crm-scenarios-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package crm-scenarios-module

CRM Scenarios Module

Translation status @ Weblate

Scenarios module main feature is a scenario builder, a tool for modeling scenarios within CRM system using drag-and-drop UI toolkit. Each scenario is visually represented by a graph, connecting various events (e.g. user registration, subscription) with conditions (e.g. user segment check) and actions (e.g. send email, show banner).

Scenario example ![Scenario goals overview](docs/scenario_example.png)

Scenario builder elements

Scenario builder provides several node types to build a graph with. User can link nodes in arbitrary ways, connecting output of one node into an input of another node. After saving (and enabling) the scenario, it will be executed every time the scenario trigger is hit.

Triggers

Each scenario has to start with a trigger node. Currently, there is two trigger types - "Event" node and "Before Event".

Event

Event provides several hooks on changes related to user. Currently it supports event types:

Every time user triggers specified event, all scenarios having this event will be executed, passing a user (triggering the scenario) down the graph.

Before Event

Before Event requires two parameters - an event and a time interval. Time interval specifies how long before the actual event the trigger fires, starting the scenario. Currently it supports event types:

Conditions

The condition block allows to edit the flow of graph based on the result of specified criteria. One condition block is able to combine more criteria of a single type. All defined criteria are evaluated together and based on the result, graph flow follows either positive or negative direction. Currently supported criteria types:

Actions

Send email

This node sends an email to an user who triggered the scenario and reached this node. Email list is loaded from CRM.

Show banner

Warning: enabled only when REMP-Campaign module is installed and integrated with Campaign tool.

This node shows a one-time banner to user triggering the node. Available banners are loaded from Campaign tool.

Run generic action

This node emits League event specified in createEvent method in generic action definition. You can specify custom params which will render in ui and will be passed as options to createEvent method.

You can try how this feature works by registering TestGenericEvent in your configuration:

Operations

Typically, scenario actions should be reached only by a subset of users triggering the initial scenario trigger. Therefore, the builder provides several elements to filter users or delay execution of later actions in the graph.

Segment

Segment node checks whether user reaching the node is present in specified segment. Based on the result, the node redirects execution flow to either positive (user in segment) or negative (user not in segment) path.

Segment node details ![Scenario goals overview](docs/segment_node_detail.png)

Wait

This node simply delays execution of next element in a graph by specified time interval.

Goal

Goal element checks if user triggering the node have completed selected onboarding goals. For more details, see "Onboarding module" documentation.

AB Test

AB Test element chooses one flow from two or more variants based on the percentual distribution.

Installing module

We recommend using Composer for installation and update management.

Enabling module

Add installed extension to your app/config/config.neon file.

When it's added, generate ACL for newly created module.

Building assets

Install dependencies inside module folder yarn install Be sure to have scenario config filled in a global scope. It should look like this:

Run yarn build-prod if you want to build whole application for the deployment. Then, at the root of the project, copy assets using:

Engine

Scenarios module requires Scenario engine worker to run separately in a background to process graph execution flows. In addition, it also requires Hermes worker to process asynchronous tasks. Execute:

Make sure both workers are started again if killed, e.g. by running a service or a watchog.

Speed of engine processing is configurable. One can specify lower and upper limit on sleep delay between processing rounds (in each round, all jobs in queue are processed) in your configuration:

The actual sleep time is computed using exponential backoff algorithm. Default values are 0.05 and 1 second for min/max delay.

Schedule commands

Aggregate statistic data older than 5 days or data from the specific date with using option from. Setup cron to run command every hour.

Remove statistic data older than 31 days. To specify exact date use option date-to. Setup cron to run command daily.

Before events

For generating "Before Event" triggers, add the following command to your crontab. Optionally set it up to run every 10 minutes.

Graceful shutdown of workers

To gracefully shutdown both workers (application:hermes_worker and scenarios:worker) use command from ApplicationModule:

Use this to in case CRM modules were updated and you need to reload workers. More details in README of ApplicationModule.


All versions of crm-scenarios-module with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package remp/crm-scenarios-module contains the following files

Loading the files please wait ....