Workflow:send email pb with related Module

Hello, I would like to send a custom email due to a specific name relative to a campaign and a contact.

So for example, I have two modules with a relationship

  • Campaign form
  • Contact

When I build my rapport, I have no problem, I can see the campaign and the associated contact.

But when I build a workflow to send an email to the contact that notified the campaign. It doesn’t work. I did exactly the same thing that https://support.sugarcrm.com/Knowledge_Base/Workflows/Notifying_a_Customer_When_Receiving_a_Note_Via_the_Portal/

I put 2 persons to the wished email (the administrator, I and the contact). The contact doesn’t receive the email. I put some dynamic value in the body of the email And I have only the values of the target module. The values of the associated module aren’t displayed. Instead I have a Invalid Value.

https://image.noelshack.com/fichiers/2019/49/3/1575475484-help.jpg

Regards,

Thomas

Parents
  • Hi Thomas,

    The likely issue here is that you are testing against a workflow that is set to trigger when the record is saved rather than after time elapses. The KB article linked in your original post details how to configure the workflow for this scenario. Your condition based off the screenshot provided should read 'Name equals SMS API queries thomas for 0 hours'. 

    The reason why time elapsed workflows are critical for this type of functionality is due to how relationships are formed in Sugar. The order of operations for your current workflow would be:

    1. New Campaign Form record is saved
    2. On-Save workflows are triggered
    3. Relationships are saved

    The reason invalid values are generated is that the on-save workflow is not aware of an existing relationship yet. Configuring a time-elapsed workflow ensures that the relationship is established when the scheduled job processes the workflow. The order of operations in this scenario would be:

    1. New Campaign Form record is saved
    2. Record is queued for workflow processing if field conditions are met
    3. Relationships are saved
    4. Scheduler runs at next interval and processes any records meeting the time-elapsed criteria

    Please let me know if any issues persist after configuring the time-elapsed workflow.

  • Hello,

    Thanks Chris, now it works well. Just one more question, the first specified duration is for 4 hours.Is it really not possible to have 15 minutes or 1 minute ?

    for example : should read 'Name equals SMS API queries thomas for 1 minute'

  • I'm glad to hear it's working, Thomas! With regards to duration, you should have an entry for 0 hours. It is okay to set to this interval since that means it will run on the next available scheduled run. If you do not see this entry, that means the list was likely modified previsouly.

    You can manually add a 0 hour (or any other time interval) entry by modifying the tselect_type_dom dropdown list via Admin > Dropdown Editor. When editing that dropdown list, the 'Item Name' should be a numeric value representing the number of seconds you want to wait on time-elapsed workflows. The 'Display Label' can be any label of your choosing. So, for a 0 hour entry, you should have:

    Item Name: 0

    Display Label: 0 hours

    Once you save the changes to that list, any additions should be available to select when configuring time-elapsed workflows.

  • Hello Chris,

    It's just perfect. Thanks for the asssistance.

    We can close the topic.

    Thanks again !

    Thomas

Reply Children
No Data