ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 19 replies, has 4 voices, and was last updated by  achyuthb 1 year, 6 months ago.

  • Creator
    Topic
  • #10214

    Rodolfo
    Participant

    How to create a sales process automatically when a new Lead is added?

    If I understood well, I can’t do that just cloning and changing the workflow process right?

    I have two ideas:

    1) Create a Process to do that;
    2) Use the API to create a Sales Process based on a Lead. I can detect when this event happens because I’m saving these Leads with my integration api;

    Do you guys have other idea?
    Thank you

Viewing 15 replies - 1 through 15 (of 19 total)
  • Author
    Replies
  • #10220
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    Hello, Rodolfo.

    If you need to create Sales Process in one specific case (e.g. during some workflow transition), then you have to add new entity creation in this one specific place (e.g. @create_entity action in workflow definition).

    If you need to create new Sales Process FOR ALL Leads no matter when and where they are creating, then you can create process that will listen to “create” event and create new entity there (you can even start workflow on a new entity).

    #10221

    Rodolfo
    Participant

    Thank you @yshyshkin

    I’ll try to implement the process.

    #10227

    fati
    Participant

    pllllllz Yevhen Shyshkin

    schema update Failed
    Error
    Dropping database schema…
    Database schema dropped successfully!

    Command “doctrine:schema:drop” executed in 89 second(s), memory usage: 18.34Mb

    [2015-05-23 17:08:52] Launching “oro:entity-config:cache:clear” command
    Clear the entity config cache

    Command “oro:entity-config:cache:clear” executed in 1 second(s), memory usage: 4.46Mb

    [2015-05-23 17:08:56] Launching “oro:entity-extend:cache:clear” command
    Clear the extended entity cache

    Command “oro:entity-extend:cache:clear” executed in 1 second(s), memory usage: 5.18Mb

    [2015-05-23 17:09:15] Launching “oro:migration:load” command
    Process migrations…
    > Oro\Bundle\MigrationBundle\Migration\CreateMigrationTableMigration
    > Oro\Bundle\OrganizationBundle\Migrations\Schema\OroOrganizationBundleInstaller
    > Oro\Bundle\SecurityBundle\Migrations\Schema\v1_0\OroSecurityBundle
    > Oro\Bundle\AttachmentBundle\Migrations\Schema\OroAttachmentBundleInstaller
    > Oro\Bundle\EmailBundle\Migrations\Schema\OroEmailBundleInstaller
    > Oro\Bundle\UserBundle\Migrations\Schema\OroUserBundleInstaller
    > Oro\Bundle\SSOBundle\Migrations\Schema\OroUserBundleInstaller
    > Oro\Bundle\EntityConfigBundle\Migrations\Schema\OroEntityConfigBundleInstaller
    > Oro\Bundle\EntityConfigBundle\Migrations\Schema\v1_3\OroEntityConfigBundle
    > Oro\Bundle\EntityConfigBundle\Migrations\Schema\v1_4\FixOptionSetObjects
    > Oro\Bundle\EntityConfigBundle\Migrations\Schema\v1_5\DropFieldConfig
    > Oro\Bundle\EntityExtendBundle\Migrations\Schema\OroEntityExtendBundleInstaller
    > Oro\Bundle\IntegrationBundle\Migrations\Schema\OroIntegrationBundleInstaller
    > Oro\Bundle\ActivityBundle\Migrations\Schema\OroActivityBundleInstaller
    > Oro\Bundle\ActivityListBundle\Migrations\Schema\OroActivityListBundleInstaller
    > Oro\Bundle\AddressBundle\Migrations\Schema\OroAddressBundleInstaller
    > Oro\Bundle\BatchBundle\Migrations\Schema\OroBatchBundleInstaller
    > Oro\Bundle\CalendarBundle\Migrations\Schema\OroCalendarBundleInstaller
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_9\OroCalendarBundle
    > Oro\Bundle\ConfigBundle\Migrations\Schema\OroConfigBundleInstaller
    > Oro\Bundle\CronBundle\Migrations\Schema\v1_0\OroCronBundle
    > Oro\Bundle\CronBundle\Migrations\Schema\v1_0\JmsJob
    > Oro\Bundle\CronBundle\Migrations\Schema\v1_1\JmsJob
    > Oro\Bundle\DataAuditBundle\Migrations\Schema\v1_0\OroDataAuditBundle
    > Oro\Bundle\DataAuditBundle\Migrations\Schema\v1_1\OroDataAuditBundle
    > Oro\Bundle\DataAuditBundle\Migrations\Schema\v1_2\OroDataAuditBundle
    > Oro\Bundle\DataGridBundle\Migrations\Schema\OroDataGridBundleInstaller
    > Oro\Bundle\EmbeddedFormBundle\Migrations\Schema\OroEmbeddedFormBundleInstaller
    > Oro\Bundle\ImapBundle\Migrations\Schema\v1_0\OroImapBundle
    > Oro\Bundle\ImapBundle\Migrations\Schema\v1_1\OroImapBundle
    > Oro\Bundle\ImapBundle\Migrations\Schema\v1_2\OroImapBundle
    > Oro\Bundle\InstallerBundle\Migrations\Schema\OroInstallerBundle
    > Oro\Bundle\MigrationBundle\Migrations\Schema\v1_0\OroMigrationBundle
    > Oro\Bundle\MigrationBundle\Migrations\Schema\v1_1\OroMigrationBundle
    > Oro\Bundle\NoteBundle\Migrations\Schema\v1_0\OroNoteBundle
    > Oro\Bundle\NoteBundle\Migrations\Schema\v1_1\OroNoteBundle
    > Oro\Bundle\NotificationBundle\Migrations\Schema\OroNotificationBundleInstaller
    > Oro\Bundle\ReportBundle\Migrations\Schema\OroReportBundleInstaller
    > Oro\Bundle\SearchBundle\Migrations\Schema\OroSearchBundleInstaller
    > Oro\Bundle\SegmentBundle\Migrations\Schema\OroSegmentBundleInstaller
    > Oro\Bundle\SidebarBundle\Migrations\Schema\v1_0\OroSidebarBundle
    > Oro\Bundle\SidebarBundle\Migrations\Schema\v1_1\OroSidebarBundle
    > Oro\Bundle\TagBundle\Migrations\Schema\OroTagBundleInstaller
    > Oro\Bundle\TranslationBundle\Migrations\Schema\OroTranslationBundleInstaller
    > Oro\Bundle\WindowsBundle\Migrations\Schema\v1_0\OroWindowsBundle
    > Oro\Bundle\WorkflowBundle\Migrations\Schema\OroWorkflowBundleInstaller
    > Oro\Bundle\CommentBundle\Migrations\Schema\v1_0\OroCommentBundle
    > Oro\Bundle\DashboardBundle\Migrations\Schema\OroDashboardBundleInstaller
    > Oro\Bundle\NavigationBundle\Migrations\Schema\v1_0\OroNavigationBundle
    > Oro\Bundle\NavigationBundle\Migrations\Schema\v1_1\OroNavigationBundle
    > Oro\Bundle\NavigationBundle\Migrations\Schema\v1_2\OroNavigationBundle
    > Oro\Bundle\NavigationBundle\Migrations\Schema\v1_3\OroNavigationBundle
    > OroCRM\Bundle\ContactBundle\Migrations\Schema\OroCRMContactBundleInstaller
    > OroCRM\Bundle\AccountBundle\Migrations\Schema\OroCRMAccountBundleInstaller
    > OroCRM\Bundle\MarketingListBundle\Migrations\Schema\OroCRMMarketingListBundleInstaller
    > OroCRM\Bundle\MarketingListBundle\Migrations\Schema\v1_2\OroCRMMarketingListBundle
    > Oro\Bundle\TrackingBundle\Migrations\Schema\OroTrackingBundleInstaller
    > Oro\Bundle\ReminderBundle\Migrations\Schema\OroReminderBundleBundleInstaller
    > OroCRM\Bundle\CallBundle\Migrations\Schema\OroCRMCallBundleInstaller
    > OroCRM\Bundle\CampaignBundle\Migrations\Schema\OroCRMCampaignBundleInstaller
    > OroCRM\Bundle\ChannelBundle\Migrations\Schema\OroCRMChannelBundleInstaller
    > OroCRM\Bundle\ChannelBundle\Migrations\Schema\v1_4\OroCRMChannelBundle
    > OroCRM\Bundle\TaskBundle\Migrations\Schema\OroCRMTaskBundleInstaller
    > OroCRM\Bundle\AnalyticsBundle\Migrations\Schema\v1_0\OroCRMAnalyticsBundle
    > OroCRM\Bundle\SalesBundle\Migrations\Schema\OroCRMSalesBundleInstaller

    [2015-05-23 17:19:38] Launching “oro:workflow:definitions:load” command
    Loading workflow definitions…

    [Oro\Bundle\WorkflowBundle\Exception\AssemblerException]
    Option “label” is required

    oro:workflow:definitions:load [–directories[=”…”]] [–workflows[=”…”]] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-s|–shell] [–process-isolation] [-e|–env=”…”] [–no-debug] [–current-user=”…”] [–current-organization=”…”] [–disabled-listeners=”…”] command

    Command “oro:workflow:definitions:load” executed in 21 second(s), memory usage: 7.94Mb

    #10228
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    Hello, fati.

    Please, check, whether all attributes without property paths, steps and transitions have labels.

    #10229

    fati
    Participant

    hello
    thanks but i do not understanding

    platform/src/oro/bundle/workflowbundle/resource/config/workflow ?

    imports:
    – { resource: ‘oro/workflow/b2b_flow_lead.yml’ }
    – { resource: ‘oro/workflow/b2b_flow_sales.yml’ }
    – { resource: ‘oro/workflow/b2b_flow_sales_funnel.yml’ }

    #10230
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    This code includes and merges data from specified files.

    #10252

    Rodolfo
    Participant

    Hi @igor-chornobay and @yshyshkin,

    I’m following this post: http://www.orocrm.com/forums/topic/processes-entities#post-6877

    It worked for me too but if I click on ‘Sales Process Item’ I can’t see the “Qualify” and “Disqualify” button. I only see “Create from Leads” and “Create from Opportunity”.
    The entity created on Sales Funnel doesn’t have:
    – ‘workflow_item_id’;
    – ‘workflow_step_id’;
    – ‘data_channel_id’;

    So, I’m wondering if I create the Workflow in the same process is it solve the problem? Can you please help me changing this process.yml to create this workflow?

    Thank you.

    process.yml

    #10253

    Rodolfo
    Participant

    How about this one?

    #10254
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    Hello, @Rodolfo.

    You see, creating of new entity not always starts workflow – it can be done only if start step is defined, and Sales Funnel flow does not have it.

    If I understand you correctly, you need to create SalesFunnel entity and automatically start workflow using “Create from Lead” transition – to do that you have to save entity right after creation (see “flush” option of @create_entity action), and then start workflow using “start_from_lead” transition with @start_workflow action.

    For more information about @start_workflow action see action code.

    #10388

    Rodolfo
    Participant

    Hi @yshyshkin

    Thank you for your help. After adding @start_workflow, now I’m getting this error:

    #10392
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    Hello, Rodolfo.

    Security issue appears because this is queued process, workflow start action covered with ACL and there is no security/permissions in CLI execution. The easiest way to fix that is to make it not queued.

    Also you missed some important parts – entity, channel etc. Here is how it should look like to work:

    #10393

    Rodolfo
    Participant

    Hello @yshyshkin !

    Thank you so much! It’s working!

    #17769

    achyuthb
    Participant

    Hi All,
    Could please help me on installation issue. Please find issue details below.

    Error image link

    [2016-05-04 13:59:34] Launching “cache:clear” command
    Clearing the cache for the prod environment with debug false

    Command “cache:clear” executed in 37 second(s), memory usage: 57.49Mb

    [2016-05-04 14:00:27] Launching “oro:migration:load” command
    Process migrations…
    > Oro\Bundle\EntityExtendBundle\Migration\LoadEntityConfigStateMigration
    > Oro\Bundle\MigrationBundle\Migration\CreateMigrationTableMigration
    > Oro\Bundle\PlatformBundle\Migrations\Schema\OroPlatformBundleInstaller
    > Oro\Bundle\OrganizationBundle\Migrations\Schema\OroOrganizationBundleInstaller
    > Oro\Bundle\SecurityBundle\Migrations\Schema\OroSecurityBundleInstaller
    > Oro\Bundle\AttachmentBundle\Migrations\Schema\OroAttachmentBundleInstaller
    > Oro\Bundle\EmailBundle\Migrations\Schema\OroEmailBundleInstaller
    > Oro\Bundle\CronBundle\Migrations\Schema\OroCronBundleInstaller
    > Oro\Bundle\UserBundle\Migrations\Schema\OroUserBundleInstaller
    > Oro\Bundle\SSOBundle\Migrations\Schema\OroUserBundleInstaller
    > Oro\Bundle\EntityConfigBundle\Migrations\Schema\OroEntityConfigBundleInstaller
    > Oro\Bundle\EntityExtendBundle\Migrations\Schema\OroEntityExtendBundleInstaller
    > Oro\Bundle\IntegrationBundle\Migrations\Schema\OroIntegrationBundleInstaller
    > Oro\Bundle\ActivityBundle\Migrations\Schema\OroActivityBundleInstaller
    > Oro\Bundle\ActivityListBundle\Migrations\Schema\OroActivityListBundleInstaller
    > Oro\Bundle\AddressBundle\Migrations\Schema\OroAddressBundleInstaller
    > Oro\Bundle\BatchBundle\Migrations\Schema\OroBatchBundleInstaller
    > Oro\Bundle\CalendarBundle\Migrations\Schema\OroCalendarBundleInstaller
    > Oro\Bundle\ConfigBundle\Migrations\Schema\OroConfigBundleInstaller
    > Oro\Bundle\DataAuditBundle\Migrations\Schema\OroDataAuditBundleInstaller
    > Oro\Bundle\DataGridBundle\Migrations\Schema\OroDataGridBundleInstaller
    > Oro\Bundle\EmbeddedFormBundle\Migrations\Schema\OroEmbeddedFormBundleInstaller
    > Oro\Bundle\ImapBundle\Migrations\Schema\OroImapBundleInstaller
    > Oro\Bundle\InstallerBundle\Migrations\Schema\OroInstallerBundleInstaller
    > Oro\Bundle\MigrationBundle\Migrations\Schema\OroMigrationBundleInstaller
    > Oro\Bundle\NoteBundle\Migrations\Schema\OroNoteBundleInstaller
    > Oro\Bundle\NotificationBundle\Migrations\Schema\OroNotificationBundleInstaller
    > Oro\Bundle\ReportBundle\Migrations\Schema\OroReportBundleInstaller
    > Oro\Bundle\SearchBundle\Migrations\Schema\OroSearchBundleInstaller
    > Oro\Bundle\SegmentBundle\Migrations\Schema\OroSegmentBundleInstaller
    > Oro\Bundle\SidebarBundle\Migrations\Schema\OroSidebarBundleInstaller
    > Oro\Bundle\TagBundle\Migrations\Schema\OroTagBundleInstaller
    > Oro\Bundle\TranslationBundle\Migrations\Schema\OroTranslationBundleInstaller
    > Oro\Bundle\WindowsBundle\Migrations\Schema\v1_0\OroWindowsBundle
    > Oro\Bundle\WindowsBundle\Migrations\Schema\v1_1\OroWindowsBundle
    > Oro\Bundle\WorkflowBundle\Migrations\Schema\OroWorkflowBundleInstaller
    > OroCRM\Bundle\ActivityContactBundle\Migrations\Schema\OroCRMActivityContactBundleInstaller
    > Oro\Bundle\CommentBundle\Migrations\Schema\OroCommentBundleInstaller
    > Oro\Bundle\DashboardBundle\Migrations\Schema\OroDashboardBundleInstaller
    > Oro\Bundle\NavigationBundle\Migrations\Schema\OroNavigationBundleInstaller
    > OroCRM\Bundle\ContactBundle\Migrations\Schema\OroCRMContactBundleInstaller
    > OroCRM\Bundle\AccountBundle\Migrations\Schema\OroCRMAccountBundleInstaller
    > OroCRM\Bundle\MarketingListBundle\Migrations\Schema\OroCRMMarketingListBundleInstaller
    > Oro\Bundle\TrackingBundle\Migrations\Schema\OroTrackingBundleInstaller
    > Oro\Bundle\ReminderBundle\Migrations\Schema\OroReminderBundleBundleInstaller
    > OroCRM\Bundle\CallBundle\Migrations\Schema\OroCRMCallBundleInstaller
    > OroCRM\Bundle\CampaignBundle\Migrations\Schema\OroCRMCampaignBundleInstaller
    > OroCRM\Bundle\ChannelBundle\Migrations\Schema\OroCRMChannelBundleInstaller

    [2016-05-04 14:10:31] Launching “oro:workflow:definitions:load” command
    Loading workflow definitions…

    [Oro\Bundle\WorkflowBundle\Exception\AssemblerException]
    Option “label” is required

    oro:workflow:definitions:load [–directories [DIRECTORIES]] [–workflows [WORKFLOWS]] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-s|–shell] [–process-isolation] [-e|–env ENV] [–no-debug] [–disabled-listeners DISABLED-LISTENERS] [–] <command>

    Command “oro:workflow:definitions:load” executed in 4 second(s), memory usage: 4.21Mb

    #17771
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    Hello.

    You should check your workflow configuration – probably, you missed label for attribute or transition.

    To check only workflow assembling you can run “php app/console oro:workflow:definitions:load” separately, fix issues (you can use -v flag to see exception stack trace) and only then try to install from scratch.

    #17786

    achyuthb
    Participant

    Hi Yevhen,
    I am very new to Orocrm could you please elaborate bit more.

Viewing 15 replies - 1 through 15 (of 19 total)

You must be logged in to reply to this topic.