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,

Parents
  • 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:

    {
      "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"
        }]}}


    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

Reply
  • 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:

    {
      "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"
        }]}}


    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

Children
No Data