Giter Site home page Giter Site logo

javascript-api's People

Contributors

gashokvr avatar graut avatar karthikagile avatar ranjanagilecrm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

javascript-api's Issues

SSL will be distrusted

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?

Generated code is not versioned

The generated tracking code is not versioned.
This broke our production code as you updated the functions of the distributed code.

set_property callback error

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.

Redirect Loop

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

No error callbacks are being thrown when receiving bad server response

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.

Using _agile.set_email() doesn't seem to backtrack web visits

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

this.namespace is null and points api to localhost

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.

content length limit for requests?

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?

API for webrules

Any api available for creating or updating web rules like for subscription?
i dont want to use default

Add Note is not working

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

api url points to localhost:8888

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.

create_company disappeared

The create_company disappeared from the code you distribute from the tracking code you generate on the website.

Set custom property for company

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.

custom fields are not updating from script

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!

Analytics Code Not Working in Safari & Firefox

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

Custom contact field object key

I have a custom field for contacts defined as:

screen shot 2017-02-21 at 9 11 48 pm

Howerver, what is the object key in JavaScript when creating a contact? I've tried:

var contact = {};
contact.plan = 'Unsure'; // does not work
contact.plan_interest = 'Unsure'; // does not work
contact.planInterest = 'Unsure'; // does not work

how to create campaign using add_campaign() function

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 ');
    }
  });


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

#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
    }`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.