Hey guys, my name is Oscar, new here.
First of all, I thank the Suite CRM community for providing such an amazing tool. I’m going nuts with all its possibilities! I am remodeling my company’s processes based on everything it can do.
Now, about this issue on workflows not running on imported records, did anyone find a solution? @pgr I’ve seen you writing that indeed, it doesn’t, but that was way back. Is that still true today? I’ve seen Sugar CRM documentation and it states clearly that Imports DO trigger workflows.
I have a simple workflow where I import new “Contacts” and I want it to create automatic registers of “Subscriptions”, a custom module, with fields filled in with mirror-fields in the “Contact” register.
Importing Contacts: Works as a charm, all fields filled in and Contact created
Workflow: Set to always run on all records DOES NOT run, therefore Subcription is not created
I Manually modify a random field from Contact: workflow triggers, subscription is created and properly related to the Contact
I’ve tried all combinations of Workflow “Run” and “Run on” parameters
What I have managed to troubleshoot is:
Workflow condition is working fine: workflow triggers when I edit random fields
Contact and Subscription entities are properly related when the workflow triggers after modifying a field
It all seems to be a problem with Suite CRM not recognizing the need to treat a Contact created by an Import Wizard as any other contact.
I moved your post to a separate thread. Please read this.
About your issue, in Admin/Schedulers , enter the Process Workflows job. What does it say in the Last ran successfully field? Is it recent? Is it in the correct timezone?
Hi, pgr!
Yes, It is running smoothly every minute, timezone is also correct. All other workflows, and the one in question, run normally when I edit or create a Contact within the right conditions. It only ignore those created through import wizard.
Reason I need this is because I don’t have developers to integrate these contacts through Suite’s API. Unfortunately I need to import them on a daily basis manually and rely on workflows to do the rest for me.
Thanks again and apologies for forgetting to put the scheduler info in my first post.
I think imports don’t trigger Workflows by design. It’s not something obviously desire - for some people like you it would work great, for other people it would just make imports super heavy and ineffective, when they don’t require any Workflows to run.
I think you could try a Workaround:
import records marking them with a certain field set in a certain way. You can use a custom field, but it’s probably easier to just use an existing field that your don’t need for anything else: for example set assistant field to imported.
make a workflow that has a condition to work only on records with assistant = imported. In that Workflow, do your magic, and when you’re done, set assistant to processed or something like that.
Hi pgr! Thanks for the reply.
Is there a roadmap item to configure some Workflows to run on imported items? It could be a checkbox when creating a Workflows.
Well, about your suggestion, it is what I already do. I import all my Contacts with all the fields filled in and only on those with “Status Conta” = “Novo” I’m trying to run the workflow and when I do I change its status.
Do you know of this is something that can “easily” be changed in the source code?
I don’t think anyone is planning to work on this.
Have you considered using after_save logic hooks instead of Workflows? you have more control there. I am 80% sure they are fired during Imports. And you can test inside the logic hook, if it’s being called from Import module or from a normal UI operation.