Community
Showing results for 
Search instead for 
Do you mean 
Reply

Creating a new Opportunity via API

New Member
Posts: 8
Country: United_Kingdom

Creating a new Opportunity via API

[ Edited ]

Hi

 

I am completely new to Act developing. I am submitting a JSON to the appropriate URL (see Figure 1 below). You can see that the "customFields" are filled in. The API then returns a confirmed copy of the inserted record (see Figure 2 below). This has a generated ID from the Act software. As you can see, all of the "customFields" data is missing. Also the "contactNames" data is also missing. The "name" and "status" fields appear to be the only fields which are being saved. My field names completely match the return JSON field names. No error message is being given as to why this information is not being saved. Also, despite this returning a confirmation-response with a server generated ID field (proving it has been processed), I cannot find this record anywhere in the Act portal in Opportunities. Any ideas what is going wrong? Act Verion: 18.2.64.0

 

Figure 1:
{
"name": "344238",
"status": 1,
"actualCloseDate": "2016-12-12T00:00:00+00:00",
"estimatedCloseDate": "2016-12-12T00:00:00+00:00",
"grossMargin": 0.00,
"isPrivate": false,
"isPublic": true,
"openDate": "2016-12-12T00:00:00+00:00",
"probability": 100,
"productTotal": 0.00,
"weightedTotal": 0.00,
"totalPerContact": 0.00,
"totalPerGroup": 0.0,
"totalPerCompany": 0.0,
"contactNames": "Test Name",
"competitor": null,
"source": null,
"reason": null,
"opportunityRelation": null,
"customFields": {
"quantity": "1",
"total discount": "0.00",
"invoice address 1": "1 Test Road",
"event code": "66177",
"price": "22.00",
"billing city": "",
"billing address 1": "1 Test Road",
"billing postcode": "A1 1AA",
"invoice city": "",
"invoice address 2": "",
"billing country": "United Kingdom",
"event type": "Partypack",
"event date": "02-02-2017 00:00:00",
"invoice postcode": "A1 1AA",
"billing address 3": "",
"invoice country": "United Kingdom",
"billing address 2": ""
},
"opportunityRelation": {
"productsAdded": [
{
"name": "partypack",
"price": 11.00,
"quantity": 2,
"total": 22.00
}
]
}
}


Figure 2:
{
"id": "e36ed0c7-7c52-4495-8f2e-9e6c0e756cc0",
"name": "344238",
"creator": "Test User",
"manager": "Test User",
"daysOpen": 0,
"status": 1,
"actualCloseDate": "2016-12-12T00:00:00+00:00",
"estimatedCloseDate": "2016-12-12T00:00:00+00:00",
"grossMargin": 0.00,
"isPrivate": false,
"isPublic": true,
"openDate": "2016-12-12T00:00:00+00:00",
"probability": 100,
"productTotal": 0.00,
"weightedTotal": 0.00,
"totalPerContact": 0.0,
"totalPerGroup": 0.0,
"totalPerCompany": 0.0,
"contactNames": "",
"created": "2016-12-12T22:04:17+00:00",
"edited": "2016-12-12T22:04:17+00:00",
"competitor": null,
"source": null,
"reason": null,
"opportunityRelation": null,
"customFields": {
"opportunity_field_1": null,
"quantity": null,
"total discount": null,
"invoice address 3": null,
"opportunity_field_8": null,
"invoice address 1": null,
"event code": null,
"price": null,
"billing city": null,
"billing county": null,
"billing address 1": null,
"billing postcode": null,
"invoice city": null,
"opportunity_field_7": null,
"invoice address 2": null,
"billing country": null,
"event type": null,
"event date": null,
"invoice postcode": null,
"opportunity_field_2": null,
"invocie county": null,
"billing address 3": null,
"invoice country": null,
"opportunity_field_3": null,
"billing address 2": null,
"booking date": null,
"opportunity_field_6": null,
"opportunity_field_5": null,
"opportunity_field_4": null
},
"editedBy": "Test User",
"recordOwner": "Test User"
}