"Failed to retrieve object metadata" while creating a mapping in Common Resource

Hello All,

I'm looking for help with creating a mapping in a Common Resource. The Common Resource maps the Opportunity table in an instance of Sugar adapter to the Opportunity table in an instance of ServiceNow adapter. The first thing I did was to create the required fields at Organization level in the Common Resource. Then I mapped them to the fields in the Sugar instance. This worked with no problems. Then, I started mapping the ServiceNow instance. I added the Opportunity resource to the adapter manually because the adapter did not have it. Then, I added the ServiceNow mapping to the Common Resource. As soon as I added the mapping, I got an error message "Failed to retrieve object metadata". When trying to fill in the ServiceNow field names, the names would not auto-complete. The names did auto-complete when I was creating the Sugar mapping in the same Common Resource. This led me to think that the lack of auto-completion must be relation to the error message. What are the possible causes of this error?

Thank you,

Yury

  • Hi Yury,

    I am not sure as I am not directly familiar with ServiceNow but I will try to help out.

    What happens if you attempt to call the ServiceNow api you are trying to call, natively in some other tool like Postman? Does that work? If it does not, perhaps the syntax of the api you use is incorrect or it does not exist. Note that it will require for you to handle authentication as well, outside of SugarIntegrate, to verify if the api is correct, independently.

    Next, if the api you are using is incorrect/not existent, I would reach out to ServiceNow's support to see what might be wrong with the direct api call you are making and go from there.

    Once you get it to work in Postman, then you would have reference points to proceed further with Sugar Integrate.

    That is how I would approach the problem as there could be different variables at play (eg: the api is not available to your ServiceNow subscription).

    Hope it helps break down the problem and get to a resolution

    Enrico Simonetti

    Principal Technical Advisory Manager

  • Thank you Enrico. This is a good approach. The ServiceNow endpoints do work in Postman. I also have another Common Resource that maps the Accounts table in Sugar to the Accounts table in ServiceNow, with the same type of Sugar and ServiceNow transformations that I'm trying to add for the Opportunity resource. The Common Resource for Account did not throw any errors and the auto-complete worked well. The current problem seems to be related to the way I set up the Common Resource for Opportunity. I'll try creating a case with Sugar Support.

  • Hi Yury,

    Could you try to follow steps in this knowledge base article? In particular, you may need to generate the model for the resource via a sample payload.

    integrate.apidocs.sugarcrm.com/.../10b2d39

  • Thank you Matt. The opportunity resource does have models for each endpoint. I noticed another issue with the opportunity resource though. Turns out the /opportunity endpoint throws an error " 'rootKey field is needed". Could this be the cause of "Failed to retrieve object metadata" error? I created a new post about the rootKey error.