javascript-api icon indicating copy to clipboard operation
javascript-api copied to clipboard

add_deal returning 204 (no response data) and not creating the deal

Open ghost opened this issue 7 years ago • 6 comments

#code `function createContact() { var email_received = document.getElementById('email').value; var contact = {}; contact.email = email_received; contact.first_name = document.getElementById('f_name').value; contact.last_name = document.getElementById('l_name').value; contact.company = "abc corp"; contact.title = "lead"; contact.phone = "+1-541-754-3010"; contact.website = "http://www.example.com"; var address = {"city": "new delhi", "state": "delhi", "country": "india"}; contact.address = JSON.stringify(address); contact.tags = "tag1, tag2"; // Custom fields can be added to contact object as contact.status = "incomplete"; contact.custom_id = "EN001C";

        _agile.create_contact(contact, {
            success: function (data) {
                // Set Email at success of contact creation. But you can set it at failure too.
                _agile.set_email(email_received);

                console.log("CONTACT success");

                var deal = {};
                deal.name = "Test Deal";
                deal.description = "This is a test deal";
                deal.expected_value = "10000";
                deal.milestone = "Target";
                deal.probability = "95";
                deal.close_date = "1514160000";		// Epoch time

                _agile.add_deal(deal, {
                    success: function (data) {
                        console.log("success");
                    },
                    error: function (data) {
                        console.log("error");
                    }
                });


            },
            error: function (data) {
                console.log("error");
                console.log("Error Cause = "+data);
            }
        });
        // Function end
    }`

ghost avatar Nov 23 '17 20:11 ghost

Contact was created though!

ghost avatar Nov 23 '17 20:11 ghost

Same for me. Contact is created and set_email worked. When I try to create the deal I get 204 response and no errors but I can't see the deal on the dashboard

izziaraffaele avatar Dec 13 '17 08:12 izziaraffaele

Same issue for me, any ideas @graut

Emil-A avatar Jan 11 '18 20:01 Emil-A

same here

fariszaher avatar Mar 05 '18 15:03 fariszaher

Same here. Any news on that? Someone found a solution?

yofisim avatar Aug 20 '18 13:08 yofisim

HI All, Thanks for using Agile CRM , We Fixed the issue moved to production .

In case you need more information regarding Agile CRM REST API please check below main reference :

https://github.com/agilecrm/rest-api

Thanks, Agile crm support team.

rammohan-agile avatar Jun 13 '19 11:06 rammohan-agile