Knowledgebase

Articles

Common resources - How to Force the Request to Fail
When leveraging JavaScript in a Common Resource, you force the request to fail by throwing an error. The error message that is passed to Error will be returned in the response from Sugar Integrate In the JavaScript: throw new Error('Your er...
Common Resources - How to Convert a Date into the Desired Format
While the Common Resources UI supports configuring a given field as type date, you must use the Common Resource API to coerce the date format from the provider into the desired format. First, create a Common Resource, with at least one field define...
Custom JavaScript Transformations on Common Resources
Custom JavaScript can be used to manipulate fields from a transformation object to fit the structure and format of a common resource in ways that cannot be achieved through mapping. Suppose that your transformation's contact object has the indiv...
How Can I Retrieve all the Field Levels of my Transformation?
We understand that from time to time, we will have a transformation on a virtual data resource that inherits multiple different field levels (such as organization, account, and instance levels). At times, it can get tricky to manage all the differen...
How do I Create a Transformation with an Array?
When defining a common resource with an array, use the following format: keyToArray[*].keyToValuesInArray This will result in: { "keyToArray": [ “keyToValuesInArray”: “1”, “keyToValuesInArray”: &ld...
Exporting and Importing Transformations and Objects between Environments
Imagine a quick scenario: I have built all of my integrations in the Staging environment and now I am ready to go into Production. However, in addition to my adapter instances, I want to transfer over all the transformations I have created.  H...
How to Properly Export your Transformation using Sugar Integrate
You have created a common resource and mapped fields to it to create a transformation. Now you want to export it to share across your organization and/or different accounts. Here is a quick guide on how to properly export a common resource. Log in...
JS Transformations: How Do I Use the transformedObject Variable?
When doing a JavaScript transformation the transformedObject always represents the final state of the object when you are POSTing or GETting.  IMPORTANT: Do not define in your object definition or map in your transformation any fields that ...
How can Sub-resources be Transformed?
Transformations can be mapped to sub-resources (children) of objects, but it is important to know that transformed sub-resources are not added to the API Docs. To accomplish this task, you have to create a common resources and transformation to the ...
What API can be used to update an existing transformation?
To update an existing transformation via the API, use: PUT /instance/{instanceId}/transformations/{objectName}.