How to add a Sugar custom module as a resource in a Sugar Adapter instance ?

Hello,

What is the best why to add a Sugar custom module as a resource in a Sugar Adapter instance ?

We can see this documentation for a from scratch adapters Adapter Bui | Sugar Integrate  however that doesn't take care about specificity of Sugar API. W have what things that can be consider as a template with the "{ObjectName}" resource that we can duplicate however when you try the API something seems missing.

By example Michael Shaheen Matt Marum if we use the School learning tool, how to use PR_Professors module in Sugar Integrate to send a notification on slack when a new Professors appears in the system. We would like a step by step guide for that more than an "import/export" solution :-)

Best regards, 

Parents
  • So I think you noticed one of the nice features of the Sugar Adapters is they support accessing Sugar Modules by name directly instead of having to define specific resources for all modules. This is done via the {objectName} resource.

    So a GET /PR_Professors should return Professor records.

    Ex. 

    curl -X GET "">api-us.integrate.sugarapps.com/.../PR_Professors" -H  "Content-Type: application/json" -H  "Accept: application/json" -H  "Authorization: User USER_SECRET, Organization ORG_SECRET, Element ADAPTER_SECRET"

    This also works with out of the box modules which might have different names than the resources listed in Adapter.

    Ex.

    A GET on "/accounts" or "/Accounts" will return same data.

    Finally - For your adapter instance, you should be able to go to "Resources" tab and add your custom module as an actual resource.

    If you need to generate Professor events to be used in a procedure then you'll need to clone the Adapter and add it as a polling resource.

    I suppose the other alternative is to setup a time based procedure that effectively does the same thing - poll the PR_Professors endpoint for recently modified records.

    App Ecosystem @ SugarCRM

  • Thanks Matt,

    By consequence if we need to add it as a resource, the explicit declaration of a resource is a requirement ?

Reply Children