Can I send message to an external API instead of an email in Process Definition

Hello,

My company is trying to evaluate the use of SugarCRM and SugarBPM. During our Process Definition, we want to send an API post to a REST API located in another business application. We don't want to build a process to pull information out of SugarCRM; we would like to post a notification of a change.

Is this possible and what areas do I need to study to learn about, what I'm trying to do.

Thank you,

  • Hey  

    It is possible through the API! First, here is our documentation on it: https://support.sugarcrm.com/documentation/sugar_developer/sugar_developer_guide_14.0/integration/web_services/rest_api/endpoints/emails_post/

    I followed the section "Creating an Email" and I was able to get it work. I use Postman for testing and here is the Request URL and the body of the request:



    Request URL: POST https://<instance_name>.sugarondemand.com/rest/v11_16/Emails

    Body:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    {
    "state": "Ready",
    "outbound_email_id": "491fb9f6-81ba-11ef-ba3e-02a5a97c2d5e",
    "name": "Discuss Proposal",
    "description_html": "<p>When is a good time for us to chat?</p>",
    "parent_type": "Leads",
    "parent_id": "5615d9a8-8c03-11ef-bbcc-0684a87b501c",
    "to": {
    "create": [{
    "parent_type": "Leads",
    "parent_id": "5615d9a8-8c03-11ef-bbcc-0684a87b501c"
    }]
    },
    "cc": {
    "create": [{
    "parent_type": "Users",
    "parent_id": "seed_will_id",
    "email_address_id": "5ae9e062-81ba-11ef-8ff5-02a5a97c2d5e"
    }]}}
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    You will have to know the Outbound Email ID for the email address you are sending from - along with the IDs for all of the recipients. Let me know if you have any questions! Would be happy to clarify on anything.

    - casey

  • Hi  ,

    SugarBPM does not have a native way to post API calls. Depending on the complexity of your needs, Sugar's Web Logic Hooks feature may meet your needs. However, if you are looking to be more selective on how and when to send API calls, that would need either a plugin or customization to achieve. If your use case falls into the latter category, would you be looking to send a payload of the triggered record to the REST endpoint or would you want to be more selective in the information and format of what you are sending?

    Chris