Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

datakick

Conseqs - new module under development - ideas needed

Recommended Posts

Hi everyone,

here I go again, developing a new paid(trial) module. I was thinking about this one for over a year now, and I really think it could be very useful for most merchants. But I may be gravely wrong, so I wanted to ask you guys about your opinions.

This new module is named conseqs (as in consequences) and is based on simple idea - to execute some action when something happens. It's vague on purpose -- it's because there would be many triggers (new order created, product changed, page visit, product added to cart,...) and many actions (send email, raise error, log information, update record in db, send notification to slack,...) and you could bind any of them together. Actions could be executed only when some conditions are met, of course. 

This module would allows you to create rules like this:

- when new order is created send email to my email address

- when product stock quantity changed, and product reference is 'mug', and new quantity is below 30, then send email

- when user navigates to url that contains string '/blabla' then redirect to '/blabla2'

- when employee logs in to back office then log this information to access.txt file 

- when user ends up on 404 page, then log the url address

- before email is send, if name contains 'www.' then raise error message

- when customer's total amount spent is greater than 1000EUR then update customer and change his group to 'Premium customers' 

So, my question is, do you need module like this? And if so, could you elaborate on some use cases you would like to achieve? 

 

  • Like 1

Share this post


Link to post
Share on other sites

Sounds like a universal hook module. All these triggers (should) have a hook already, the module apparently provides some simple way to connect some kind of code on them.

I'd expect success of such a module to raise and fall with the way this "code" gets generated. Is it selecting from a list of predefined snippets? Is it moving some control boxes? Is it an actual code editor?

Share this post


Link to post
Share on other sites
33 minutes ago, Traumflug said:

Sounds like a universal hook module. All these triggers (should) have a hook already, the module apparently provides some simple way to connect some kind of code on them.

I'd expect success of such a module to raise and fall with the way this "code" gets generated. Is it selecting from a list of predefined snippets? Is it moving some control boxes? Is it an actual code editor?

You are right, it's basically a smart bindings between existing hooks and some actions. Very similar to IFTTT concept, if you are familiar with. If not, this is how their UI looks like, I wanna make something similar

Share this post


Link to post
Share on other sites

I have a use case. I would like to help my employees to not forget to do certain actions and to remind them by email. Don't know if this is applicable here though.

One thing that I have thought of is when a choosen order status has has been active for a amount of time I would like a reminder email to be sent to my customer care and remind them to handle this order. 

For example we have order statuses for ordered goods and sometimes the supplier doesnt deliver as they should and this would be great to remind us contact the supplier and ask why.

Another one is when we have to contact a customer about something before sending the order. Sometimes they doesn't respond and we have to send a new mail. This would be great to get a notice of.

Share this post


Link to post
Share on other sites

Thanks @Briljander for your input, I really appreciate

Unfortunately these use cases will be out of the scope of my module (at least for now), because there aren't any immediate triggers that I could hook to. My module can only react when something happens (record is saved to database, visitors perform some action, email is about to be sent, etc...). Here there aren't such immediate actions, it's more about state in the database.

I do, however, plan to implement scheduled triggers in the future, if this module takes off. There would be a cron task that would periodically check if some condition is met, and if so then trigger action. This mechanism could be used to implement your use cases.

Share this post


Link to post
Share on other sites
Posted (edited)

I like the idea! Some use cases I see in addition to the ones you mentioned (and I'm sure there are lots more) are:

- If products in shopping cart are under free shipping amount, show text: Only X Euro to get free shipping! Here are some products to help you get free shipping: (Display products close to the missing amount)

- I use the loyalty points module. I'd love to have an email sent to customers ca. 10 days before the loyalty points expire. (Could one use as a general trigger to get around the required cron something like every new customer registration?)

- If product X with attribute Z is sold, deduct stock from product Y with attribute Q.

- If visitor visits a sold out product X, recommend product Y instead.

Edited by 30knees

Share this post


Link to post
Share on other sites
2 hours ago, datakick said:

Unfortunately these use cases will be out of the scope of my module (at least for now), because there aren't any immediate triggers that I could hook to. My module can only react when something happens (record is saved to database, visitors perform some action, email is about to be sent, etc...). Here there aren't such immediate actions, it's more about state in the database.

In an old module someone implemented as a trigger each time the store was visited (I guess visit saved to database?) to get around having a cron task. Would this be an easy workaround, i.e. having a "universal" trigger?

Share this post


Link to post
Share on other sites
1 hour ago, 30knees said:

I like the idea! Some use cases I see in addition to the ones you mentioned (and I'm sure there are lots more😞

- If products in shopping cart are under free shipping amount, show text: Only X Euro to get free shipping! Here are some products to help you get free shipping: (Display products close to the missing amount)

- I use the loyalty points module. I'd love to have an email sent to customers ca. 10 days before the loyalty points expire. (Could one use as a general trigger to get around the required cron something like every new customer registration?)

- If product X with attribute Z is sold, deduct stock from product Y with attribute Q.

- If visitor visits a sold out product X, recommend product Y instead.

Thanks for the ideas.

The first one is probably not possible -- it would be hard/possibly impossible to change page content. Actions that can be triggered are somewhat independent, not related to the source / trigger. 

The rest of your ideas could be theoretically done

Share this post


Link to post
Share on other sites

Sounds like a great module, but with such big scope is it feasable? I just mean that every person will think something different, with a new trigger o a new consequence and most of them should be included to not give the user frustration. But if it is technically possible, it is a good idea. Seems to me like an "internal PrestaShop Zapier"

I write you a PM

Share this post


Link to post
Share on other sites
1 hour ago, rubben1985 said:

I just mean that every person will think something different, with a new trigger o a new consequence and most of them should be included to not give the user frustration

That's true. But fortunately, creating new trigger or action is very easy (at least it has been easy so far). One needs to declare input/output parameters, and then implement the actual action execution. If there will be a demand for this module, I'll be happy to invest some time on this task. And maybe some tech savvy users will be able to implement (and share) their own actions/triggers. 

Share this post


Link to post
Share on other sites
On 5/17/2019 at 11:20 AM, datakick said:

Thanks for the ideas.

The first one is probably not possible -- it would be hard/possibly impossible to change page content. Actions that can be triggered are somewhat independent, not related to the source / trigger. 

The rest of your ideas could be theoretically done

About the first one: I was thinking of adding a line in the shopping cart summary, in case that makes it easier.

Share this post


Link to post
Share on other sites

If the module is capable to blacklist customers I will buy it 🙂

For example: If customer is added to a blacklist and some of customer’s details like phone number, name, address etc. match in new order, the module sends warning email to the merchant.

Share this post


Link to post
Share on other sites
17 hours ago, MockoB said:

If the module is capable to blacklist customers I will buy it 🙂

For example: If customer is added to a blacklist and some of customer’s details like phone number, name, address etc. match in new order, the module sends warning email to the merchant.

This is, in general, the intended use case. 

The module will work like this:

1) something happens in your thirtybees that will trigger the consequence rule

2) every trigger type will collect and provide details about the event. For example, *product added to cart* event would fetch information about added product, information about cart, information about customer, current cart total, etc... and pass these information forward to conditions/action layer

3) conditions can be build using only those information passed by trigger. So, there can be condition like 'added product id equals 100' or 'added product description contains word T-shirt'. 

4)  if all conditions are met, then the action is trigger

5) most actions needs some parameters for execution. For example, action 'Redirect' needs redirect url. These action parameters can be provided as constant during rule definition, or can be derived from trigger output. For example, we could say the redirect url is 'https://www.google.com/{product_name}' where {product_name} will be substituted on the fly

 

Your use case would require to define condition (step 3) like this:

- there exists some customer record in database that is marked as blacklisted and has same email as currently pending email

While this condition can be implemented, it will not be in the first few versions, as I will first try to tackle primitive conditions 

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×