Custom fields in Opportunities not showing up in REST API

Anonymous
Not applicable

Custom fields in Opportunities not showing up in REST API

Hello,

I've been trying to use the new REST end points for the Marketo Opportunity object, documents here:

Marketo REST APIs: Opportunity Objects » Marketo Developers

I've noticed though that I can't update, or access custom fields we added to our opportunity object. Instead I get 1006 errors on the custom fields in the response object.  Is this not supported yet? Or is there some trick i'm missing?

Thanks!

Tags (1)
12 REPLIES 12
John_M
Marketo Employee

Re: Custom fields in Opportunities not showing up in REST API

Hi Michael

I just tried adding the field "color" to Opportunity in my test instance.. and the describe and getOpportunity REST call beings it back fine. Have you recently recreated the API Role, API User and updated the Launchpoint service? With a major new addition to the REST API, I always do that.

Get Opportunity:

Request: https://491-ABC-123.mktorest.com/rest/v1/opportunities.json?fields=color,marketoGUID&filterType= ext...

Response:

{

    "requestId": "aea9#14da09cc9d1",

    "result": [

        {

            "seq": 0,

            "marketoGUID": "1af21fd7-9308-4bbd-970c-9514b4f5e89e",

            "externalOpportunityId": "19UYA31581L000000",

            "color": "blue"

        },

        {

            "seq": 2,

            "marketoGUID": "841537ae-7c7a-4ed4-9d25-be95ad4257b3",

            "externalOpportunityId": "29UYA31581L000000",

            "color": null

        },

        {

            "seq": 3,

            "marketoGUID": "841537ae-7c7a-4ed4-9d25-be95ad4257b3",

            "externalOpportunityId": "29UYA31581L000000",

            "color": null

        },

        {

            "seq": 4,

            "marketoGUID": "841537ae-7c7a-4ed4-9d25-be95ad4257b3",

            "externalOpportunityId": "29UYA31581L000000",

            "color": "red"

        }

    ],

    "success": true

}

Describe:

Request: https://491-ABC-123.mktorest.com/rest/v1/opportunities/describe.json?access_token=5e36173d-d6bb-4ca1...

Response:

{

    "requestId": "1340#14da097c0c0",

    "result": [

        {

            "name": "opportunity",

            "displayName": "Opportunity",

            "description": "Marketo Opportunity",

            "createdAt": "2015-04-25T01:11:27Z",

            "updatedAt": "2015-04-25T01:11:27Z",

            "idField": "marketoGUID",

            "dedupeFields": [

                "externalOpportunityId"

            ],

            "searchableFields": [

                [

                    "externalOpportunityId"

                ],

                [

                    "marketoGUID"

                ]

            ],

            "fields": [

                {

                    "name": "createdAt",

                    "displayName": "createdAt",

                    "dataType": "datetime",

                    "updateable": false

                },

                {

                    "name": "externalOpportunityId",

                    "displayName": "externalOpportunityId",

                    "dataType": "string",

                    "length": 50,

                    "updateable": false

                },

                {

                    "name": "marketoGUID",

                    "displayName": "marketoGUID",

                    "dataType": "string",

                    "length": 36,

                    "updateable": false

                },

                {

                    "name": "updatedAt",

                    "displayName": "updatedAt",

                    "dataType": "datetime",

                    "updateable": false

                },

                {

                    "name": "amount",

                    "displayName": "amount",

                    "dataType": "currency",

                    "updateable": true

                },

                {

                    "name": "closeDate",

                    "displayName": "closeDate",

                    "dataType": "date",

                    "updateable": true

                },

                {

                    "name": "color",

                    "displayName": "Color",

                    "dataType": "string",

                    "length": 255,

                    "updateable": true

                },

                {

                    "name": "description",

                    "displayName": "description",

                    "dataType": "string",

                    "length": 2000,

                    "updateable": true

                },

                {

                    "name": "expectedRevenue",

                    "displayName": "expectedRevenue",

                    "dataType": "currency",

                    "updateable": true

                },

                {

                    "name": "externalCreatedDate",

                    "displayName": "externalCreatedDate",

                    "dataType": "datetime",

                    "updateable": true

                },

                {

                    "name": "fiscal",

                    "displayName": "fiscal",

                    "dataType": "string",

                    "length": 255,

                    "updateable": true

                },

                {

                    "name": "fiscalQuarter",

                    "displayName": "fiscalQuarter",

                    "dataType": "integer",

                    "updateable": true

                },

                {

                    "name": "fiscalYear",

                    "displayName": "fiscalYear",

                    "dataType": "integer",

                    "updateable": true

                },

                {

                    "name": "forecastCategoryName",

                    "displayName": "forecastCategoryName",

                    "dataType": "string",

                    "length": 255,

                    "updateable": true

                },

                {

                    "name": "isClosed",

                    "displayName": "isClosed",

                    "dataType": "boolean",

                    "updateable": true

                },

                {

                    "name": "isWon",

                    "displayName": "isWon",

                    "dataType": "boolean",

                    "updateable": true

                },

                {

                    "name": "lastActivityDate",

                    "displayName": "lastActivityDate",

                    "dataType": "date",

                    "updateable": true

                },

                {

                    "name": "leadSource",

                    "displayName": "leadSource",

                    "dataType": "string",

                    "length": 255,

                    "updateable": true

                },

                {

                    "name": "name",

                    "displayName": "name",

                    "dataType": "string",

                    "length": 255,

                    "updateable": true

                },

                {

                    "name": "nextStep",

                    "displayName": "nextStep",

                    "dataType": "string",

                    "length": 255,

                    "updateable": true

                },

                {

                    "name": "probability",

                    "displayName": "probability",

                    "dataType": "integer",

                    "updateable": true

                },

                {

                    "name": "quantity",

                    "displayName": "quantity",

                    "dataType": "float",

                    "updateable": true

                },

                {

                    "name": "stage",

                    "displayName": "stage",

                    "dataType": "string",

                    "length": 255,

                    "updateable": true

                },

                {

                    "name": "type",

                    "displayName": "type",

                    "dataType": "string",

                    "length": 255,

                    "updateable": true

                }

            ]

        }

    ],

    "success": true

}

Anonymous
Not applicable

Re: Custom fields in Opportunities not showing up in REST API

Thanks for the input, however that didn't help.

I recreated my role, user, and webservice with no luck. The describe does not return any of our custom opportunity object fields, nor does 'Id' visible in REST, the old SOAP system id.

I notice you're using a MarketoGUID, how do i find out the this new id is for existing opportunities?

John_M
Marketo Employee

Re: Custom fields in Opportunities not showing up in REST API

Michael

Interesting. Okay, next question. As a Marketo Enterprise consultant, I have special access to add fields on the Opportunity. How did you get the field added to your instance? Typically its support or consulting. You can also check the activity log for an add to opportunity to see the custom fields... just to make sure they're there.. since you can see them under lead detail.

Anonymous
Not applicable

Re: Custom fields in Opportunities not showing up in REST API

Where's the activity log for that information? We had Marketo Consulting create the fields for us a few weeks ago, and have been using them since.

And the fields are there.

We have thousands of opportunities, and opportunityrole objects and their respect leads. Our data behaves as expected in smart-lists and flow logic.  I can 'sync' using SOAP, and rely heavily upon the marketo opportunity 'id' for opportunities. However, the 'id' is missing in addition to all our custom fields in our opportunity object via the REST. Where do i go from here? is it a bug in our instance or ?

thanks for the help!

John_M
Marketo Employee

Re: Custom fields in Opportunities not showing up in REST API

You'd look in the Lead's activity log (lead details, activity tab) looking for opportunities that have been added. If you double click them youll see the custom fields.

I think you might want to open up a support ticket because I was just able to extract the custom fields for an opportunity using REST.

John

Anonymous
Not applicable

Re: Custom fields in Opportunities not showing up in REST API

Actually.... We recently noticed we can't see our custom fields in our opportunity object in the UI. When we look at lead details and opportunity object none of our customizations are available.

Our only visibility is through the SOAP. Could this be related?

Thanks,

John_M
Marketo Employee

Re: Custom fields in Opportunities not showing up in REST API

I don't think so. Unfortunately, custom opportunity fields are never visible in the UI.

Anonymous
Not applicable

Re: Custom fields in Opportunities not showing up in REST API

I have a case number and we're working through this topic. But i have a general question:

How do i get access to my existing opportunity objects through the REST? there's that externalID and GUID, but i've only ever used the SOAP opportunity ID. I see no obvious way to get opportunity by the old Integer ID.

John_M
Marketo Employee

Re: Custom fields in Opportunities not showing up in REST API

Michael

I've found a resolved ticket indicating your original issue is now fixed. Can you confirm that?