Git Product home page Git Product logo

insightly's Introduction

insightly

This is a rest client library to handle talking to http://Insight.ly V1.

This project was originally developed to talk to the v1 version of Insight.ly's API. It looks like Insight.ly has released v2 of their API. We moved to a different CRM so this project isn't going to be updated.

The official API for Insigh.ly was released on August 12, 2012. This library is in the very early stages of implementing access to everything expose in that API. The focus is primarily on opportunities and tasks.

Getting Started

Besides including the gem you need to use the Configuration class to set your API key.

  Insightly::Configuration.api_key = "XXX-XXX-XXX-XXXX"

This key is provided to you in your User Settings section of Insight.ly.

Custom Fields

Some of the resources allow you to have custom fields. They are returned as number fields (c.f. OPPORTUNITY_FIELD_1). You can call them directly in your code by that name.

opportunity = Insightly::Opportunity.new(1000)
opportunity.opportunity_field_1 = "Ron Campbell"

To make your code more readable, you can add in labels for those fields so you can refer to them more readable. The fields are lined up based on the order they are provided to the setting. For example, Opportunities support 10 custom fields. You can provide up to 10 labels to match all 10 fields. You can set this up in the same place you set your API key.

Insightly::Configuration.custom_fields_for_opportunities(:person_who_referred_them, :where_they_saw_the_ad)
opportunity = Insightly::Opportunity.new(1000)
opportunity.opportunity_field_1 = "Ron Campbell"
opportunity.person_who_referred_them == "Ron Campbell"

Opportunity State Reasons

The API allows you to change the state of an opportunity directly by modifying the OPPORTUNITY_STATE field. This doesn't store the reason that the opportunity state was changed. In order to store the reason, you have to PUT to OpportunityStateChange with a valid OpportunityStateReason. OpportunityStateReasons can only be created manually in the web interface and then referred to via the API.

This is important if you want to have it show you the state changes in the Opportunity details. Direct modifications don't create a log entry. Whereas the log entry is created if you do create them. In order for your code to work, you need to make sure you have valid Opportunity State Reasons for all the states.

We default to creating two for open - "Created by API", and "Reopened by API". This allows us to set those as reasons if they exist.

Organisation? Organization

The documentation for Insight.ly the mixes the use of Organization and Organisation. Insight.ly spells it Organisation in urls and in the API - so we only use that spelling in the library.

Custom Fields vs Tags

Insight.ly supports both custom fields (up to 10 on Opportunities, Organisations, and Contacts). Opportunities, Organisations, Contacts also support tags. What is the difference? Custom fields allow you to put data on the item. This data shows up when you look at the details page of that record. Tags show up in the summary list, and also allow you to search/sort by.

insightly's People

Contributors

delmendo avatar douglasjsellers avatar economysizegeek avatar

Watchers

 avatar

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.