agilecrm / javascript-api Goto Github PK
View Code? Open in Web Editor NEWJavascript Connector for Agile
Javascript Connector for Agile
Hey Guys,
I'm getting this warning while using agile-crm on chrome:
The SSL certificate used to load resources from https://****.agilecrm.com will be distrusted in M66. Once distrusted, users will be prevented from loading these resources. See https://g.co/chrome/symantecpkicerts for more information.
are you tracking this?
The generated tracking code is not versioned.
This broke our production code as you updated the functions of the distributed code.
Hi,
I'm recieving this respone:
json9554095720843121(
Please contact Agile CRM to enable this method);
My request looks like this:
https://dstest.agilecrm.com/core/js/api/contacts/get-property?callback=json9554095720843121&id=jpbv2fue44t2d67cgfmr2uqc35&name=customTestProperty&email=email53%40email.com
I have no idea what does this mean. It was working some time ago, now it suddenly stoped working. It makes no sense that get_property method is somewhat premium and needs to contact support.
Thank you for any help.
As soon as I add the analytics code, there is a redirect loop.
You can visit 1 page and it will work fine. Once you click a link in the navigation....it will say theres a redirect loop
I've tested this with get_contact, create_contact, and create_deal. I suspect this affects all of the async methods.
when there is some issue with the server response, the error callback never gets thrown. This means there is no way for us to handle unforeseen errors, network failures, and server errors.
Hi
I trying to save data in this website (http://mobilenet.responsimulator.com/) using chrome and agilecrm js api. But when put my email and website click on button success or error functions is never raise.
Can someone help me here, to understand whats happing? Its a agilecrm issue?
Hi there,
I use a PHP CMS called October CMS and I have created a form plugin. Upon a user submitting this form, I use the REST API to add a contact, and optionally add them to a campaign. This is all working perfectly.
I would like to track the user's previous web visits. Based on your documentation, it sounds like this should be possible.
Anonymous users are tracked and backtracked when a user email is added using set_email.
I validate the form with Parsely.js and listen for the submit event, then get all the inputs, find the email input and then use the agile set email function:
$.listen('parsley:form:submit', function(e) {
var inputs = e.$element.serializeArray();
for (var i = 0; i < inputs.length; i++) {
if (inputs[i]['name'] == 'email') {
console.log(inputs[i]['value']);
_agile.set_email(inputs[i]['value']);
}
}
});
This works as I then get a notification within Agile telling me the new user is viewing my page, however, it hasn't backed tracked their views. For example:
I look at the contact record in Agile and I only see 1 visit to the homepage.
It seems to then continue to track web visits as you'd expect, just doesn't do the backtracking.
Please advise.
Regards,
Mat
How do I create a ticket for a contact with the Javascript API?
Running this with angular, and this works and calls the correct api when on my local.
But on production, when creating a new contact in agile, and setting tags, it calls to this url:
http://localhost:8888/core/js/api/contacts?callback=json49788018478453026&id=undefined&contact=%7B%22properties%22%3A%5B%7B%22type%22%3A%22SYSTEM%22%2C%22name%22%3A%22email%22%2C%22value%22%3A%22matkle414%40gmail.com%22%7D%2C%7B%22type%22%3A%22SYSTEM%22%2C%22name%22%3A%22original_ref%22%2C%22value%22%3A%22http%3A%2F%2Fmirror.targetproof.com%2F%22%7D%5D%2C%22tags%22%3A%5B%22Scored%2077%22%2C%22mirror%22%5D%7D&browserId=null&guId=715bcdff-7ee8-fd66-b6d4-76b33ff8f820
I think this is due to "this.namespace" the url builder that is in place. it tries to find this.namespace, which is undefined, and this points the script to localhost instead of agilecrm.com.
I'm using the latest script via your CDN, and with essentially a copy paste of what is listed below.
Does this work with NodeJS somehow?
Trying to create a deal via _agile.add_deal - and I'm getting a 400 error from the server when the "description" field is longer than 1200 or 1300 characters. Is there a limit to the length of the deal description?
Any api available for creating or updating web rules like for subscription?
i dont want to use default
Hello
Please see the code
_agile.create_contact({
"email": "[email protected]",
"first_name": "Test",
"last_name": "New",
"tags":"tag1"
}, { success: function add_note() {
console.log("Done");
_agile.add_note({
"subject": "How to test",
"description": "Running"
}, { success: function(data){
console.log(data);
console.log("contact created");
}, error: function(err){
console.log("data1");
console.log(err);
}
});
}, error: function(data){
}
});
this is not working, Please help me in that.
Thanks
It would be great if we could create a widget that would allow us to create a ticket for a user starting with a note of provided text.
Requests to the api are being rejected because the api url is being set incorrectly. This is almost a replica of issue number 13 but im using jquery instead of angularjs.
http://localhost:8888/core/js/api/contacts?callback=json49788018478453026 ......
I think this is due to "this.namespace" the url builder that is in place. it tries to find this.namespace, which is undefined, and this points the script to localhost instead of agilecrm.com.
I'm using the latest script via your CDN, and with essentially a copy paste of what is listed below.
Is there a way to set contact, deal or task owner?
This is also occurring in plain javascript. please fix this
The create_company disappeared from the code you distribute from the tracking code you generate on the website.
Hello, I'm trying to create a company with a custom field like this
_agile.create_company({
name: businessName,
phone: phone,
business_type: businessType
}, {error: reject, success: resolve})
looks like business_type is not set at all.
Problem statement:
Agile CRM JS library treats email with symbol "+" (plus) as invalid and displays an error message "Please enter a valid email."
I am using AgileCRM for creating contacts from agile javascript.
I need two custom fields in my contact information.
So I created two custom fields, one is list and another one is text.
From the website I am able to update my custom fields,
But when I am trying to create a contact with custom fields, those are not updating.
Scenario :
I created two fields one is Department as list with values (developing; supporting, Auditing; production;DBA) and another one is Employee code as text
When I try to add contact I just use below code :
var contact = {};
contact.email = "[email protected]";
contact.first_name = "Test";
contact.last_name = "Contact";
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";
_agile.create_contact(contact, {
success: function (data) {
console.log("success");
},
error: function (data) {
console.log("error");
}
});
Then it is working fine.
But if I modify code as
var contact = {};
contact.email = "[email protected]";
contact.first_name = "Test";
contact.last_name = "Contact";
contact.company = "abc corp";
contact.title = "lead";
contact.phone = "+1-541-754-3010";
contact.Department = " developing ";
contact.phone = "Tech12SE021"
contact.website = "http://www.example.com";
var address = {"city":"new delhi", "state":"delhi", "country":"india"};
contact.address = JSON.stringify(address);
contact.tags = "tag1, tag2";
_agile.create_contact(contact, {
success: function (data) {
console.log("success");
},
error: function (data) {
console.log("error");
}
});
It is not updating in my contact.
Now I change my custom fields to compulsory, then also it is not updating, and also It is not displaying any error message for absent of compulsory fields.
Any help would be greatly appreciated!
After finishing up my site in Chrome, I found out it doesn't work in Safari or Chrome. The problem is the provided analytics code fails to load in the firefox console .. "Loading failed for the <script> with source โhttps://sudogroup.agilecrm.com/stats/min/agile-min.jsโ .. I have the same visual cues that the problem exists in Safari as well, but everything works great in Chrome. No idea on IE at this time. Site is https://www.sudogroup.com
how we can set the own image on custom widget.
inside add_campaign() function
what are data we need to pass for adding campaign to particular email
_agile.add_campaign('**what data to pass here** ',{
success: function (data) {
console.log('campain pass');
_agile.set_email(email_received);
},
error: function (data) {
console.log('campain fail ');
}
});
#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
}`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.