I am able to create an object and fields but I cannot add cases to the custom object. Below are the request and response. In this example I am trying to UPSERT the product ID (key) and marketing ID (Link to Lead object). Both fields are integers in the custom object. I am able to make other calls using the same header. Any help or suggestions to try would be appreciated.
Request:
<ns2:paramsSyncCustomObjects xmlns:ns2="http://www.marketo.com/mktows/">
<objTypeName>testProduct_c</objTypeName>
<customObjList>
<customObj>
<customObjKeyList>
<attribute>
<attrName>productID</attrName>
<attrValue>999999</attrValue>
</attribute>
</customObjKeyList>
<customObjAttributeList>
<attribute>
<attrName>marketingID</attrName>
<attrValue>112617</attrValue>
</attribute>
</customObjAttributeList>
</customObj>
</customObjList>
<operation>UPSERT</operation>
</ns2:paramsSyncCustomObjects>
Response:
<ns2:successSyncCustomObjects xmlns:ns2="http://www.marketo.com/mktows/">
<result>
<syncCustomObjStatusList>
<syncCustomObjStatus>
<objTypeName>testProduct_c</objTypeName>
<customObjKeyList>
<attribute>
<attrName>productID</attrName>
<attrType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<attrValue>999999</attrValue>
</attribute>
</customObjKeyList>
<status>FAILED</status>
<error>Unexpected error</error>
</syncCustomObjStatus>
</syncCustomObjStatusList>
</result>
</ns2:successSyncCustomObjects>
Reply from support:
"I have escalated this to engineering. There is also not the ability to create new objects using the INSERT option as well. I have checked and it does not appear the Custom Object is allowing creation at all. I will post back once we have had time in engineering to look at this case. There is a repair being developed and should be pushed as a patch in the next 2 weeks. This should repair the issue of not having the ability to create new instances of the custom objects. I will update this case as progress is made.
I tested after the fix was installed and was able to UPSERT data to the custom object.
Can you provide the result of a describe call for this object type? Does the result change if you switch operation types?
Thanks for the help. I've reformatted the JSON to tables for readability. This is the result of /rest/v1/customobjects/testProduct_c/describe.json
"name" | "displayName" | "description" | "createdAt" | "updatedAt" | "idField" |
testProduct_c | Test Product | This is a test to sync custom objects with product information | ################ | ################ | marketoGUID |
---|
"dedupeFields"[] |
---|
productID |
"searchableFields"[] |
---|
[0] |
productID |
marketoGUID |
marketingID |
"relationships"[] | |||
---|---|---|---|
"field" | "type" | "relatedTo" | |
marketingID | child | "name" | "field" |
Lead | marketingID |
"fields"[] | ||||
---|---|---|---|---|
"name" | "displayName" | "dataType" | "updateable" | "length" |
createdAt | Created At | datetime | FALSE | |
marketoGUID | Marketo GUID | string | FALSE | 36 |
updatedAt | Updated At | datetime | FALSE | |
balance | Balance | currency | TRUE | |
chargeOffAmount | Charge Off Amount | currency | TRUE | |
chargeOffDate | Charge Off Date | date | TRUE | |
closedDate | Closed Date | date | TRUE | |
creditCardRewardsPoints | Credit Card Rewards Points | integer | TRUE | |
dueDate | Due Date | date | TRUE | |
fundedAmount | Funded Amount | currency | TRUE | |
interest | Interest | float | TRUE | |
lastSkip | Last Skip | date | TRUE | |
marketingID | Marketing ID | integer | TRUE | |
maturityDate | Maturity Date | date | TRUE | |
openDate | Open Date | date | TRUE | |
paymentAmount | Payment Amount | currency | TRUE | |
productCategory | Product Category | string | TRUE | 255 |
productDescriptionName | Product Description Name | string | TRUE | 255 |
productID | Product ID | integer | TRUE | |
productType | Product Type | string | TRUE | 255 |
term | Term | integer | TRUE |
The result does not change. I have tried INSERT and UPDATE as well.
The JSON from the describe call is below:
{"requestId":"1036e#150d90b3c27","result":[{"name":"testProduct_c","displayName":"Test Product","description":"This is a test to sync custom objects with product information","createdAt":"2015-10-29T15:23:29Z","updatedAt":"2015-10-29T15:23:30Z","idField":"marketoGUID","dedupeFields":["productID"],"searchableFields":[["productID"],["marketoGUID"],["marketingID"]],"relationships":[{"field":"marketingID","type":"child","relatedTo":{"name":"Lead","field":"marketingID"}}],"fields":[{"name":"createdAt","displayName":"Created At","dataType":"datetime","updateable":false},{"name":"marketoGUID","displayName":"Marketo GUID","dataType":"string","length":36,"updateable":false},{"name":"updatedAt","displayName":"Updated At","dataType":"datetime","updateable":false},{"name":"balance","displayName":"Balance","dataType":"currency","updateable":true},{"name":"chargeOffAmount","displayName":"Charge Off Amount","dataType":"currency","updateable":true},{"name":"chargeOffDate","displayName":"Charge Off Date","dataType":"date","updateable":true},{"name":"closedDate","displayName":"Closed Date","dataType":"date","updateable":true},{"name":"creditCardRewardsPoints","displayName":"Credit Card Rewards Points","dataType":"integer","updateable":true},{"name":"dueDate","displayName":"Due Date","dataType":"date","updateable":true},{"name":"fundedAmount","displayName":"Funded Amount","dataType":"currency","updateable":true},{"name":"interest","displayName":"Interest","dataType":"float","updateable":true},{"name":"lastSkip","displayName":"Last Skip","dataType":"date","updateable":true},{"name":"marketingID","displayName":"Marketing ID","dataType":"integer","updateable":true},{"name":"maturityDate","displayName":"Maturity Date","dataType":"date","updateable":true},{"name":"openDate","displayName":"Open Date","dataType":"date","updateable":true},{"name":"paymentAmount","displayName":"Payment Amount","dataType":"currency","updateable":true},{"name":"productCategory","displayName":"Product Category","dataType":"string","length":255,"updateable":true},{"name":"productDescriptionName","displayName":"Product Description Name","dataType":"string","length":255,"updateable":true},{"name":"productID","displayName":"Product ID","dataType":"integer","updateable":true},{"name":"productType","displayName":"Product Type","dataType":"string","length":255,"updateable":true},{"name":"term","displayName":"Term","dataType":"integer","updateable":true}]}],"success":true}
I don't see anything out of the ordinary here. You might want to file a support ticket with this info(and a timestamp of the unsuccessful call) to see what they can find in the logs.
I will do that. Will report back with any update with Support.