Hi,
I am still reviewing OnePageCRM to see if it suits our workflow. The most interesting feature of OnePageCRM is the deal items.
But apparently it's still not possible to create and update predefined items (deal items) using the API. We will need this since we have about 400 items, and the prices are changing from time to time. So it would be very useful for our team to get the latest price directly from OnePageCRM rather than having to go back and forth with the office team to know the latest price.
Please let me know if there is a work around for this using API, since updating the price manually on the web will be a tedious and error prone job.
Also, deal item picture would be a great addition to the feature.
Best regards
Hi @awicrm!
Thanks for the question.
To create new deal items, the request may look like this:
PUT
/api/v3/deals/5eb2bed77c5571457897a822
{
"partial": true,
"has_deal_items": true,
"deal_items": [
{
"name": "Data security",
"description": "Cloud-Integrated All-In- One back up",
"cost": 0.0,
"price": 650.0,
"qty": 1.0,
"predefined_item_id": "5e878b127c55711d5a2e8e75"
},
{
"name": "Hosting",
"description": "Domain registration",
"cost": 0.0,
"price": 100.0,
"qty": 2.0,
"predefined_item_id": "5e878b127c55711d5a2e8e76"
}
]
}
To update deal items, keep id
for each existing deal item. Request may look like this:
PUT
/api/v3/deals/5eb2bed77c5571457897a822
{
"partial": true,
"has_deal_items": true,
"deal_items": [
{
"id": "5eb2d7f97c5571457897a982",
"name": "Data security NEW",
"description": "Cloud-Integrated All-In- One back up",
"cost": 0.0,
"price": 650.0,
"qty": 1.0,
"predefined_item_id": "5e878b127c55711d5a2e8e75"
},
{
"id": "5eb40d927c5571e58e21e6a5",
"name": "Hosting NEW",
"description": "Domain registration",
"cost": 0.0,
"price": 100.0,
"qty": 2.0,
"predefined_item_id": "5e878b127c55711d5a2e8e76"
}
]
}
Important! On create/update keep existing deal items in the list (with id), otherwise they will be removed.
You can always find more info at API docs https://developer.onepagecrm.com/api/#/Deals
@awicrm Predefined items is another thing. Right now it can't be created/updated via API. Only retrieved. Related API docs at https://developer.onepagecrm.com/api/#/Predefined_Items