crm

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2022 License: MIT Imports: 5 Imported by: 0

README

Zoho CRM V2 API

NOTE: Not finished and probably unstable. PRs welcome.

This API wrapper should provide access to Zoho CRM. Because some fields exist only in add-ons for CRM, or are custom fields, which cannot be easily differentiated, all fields that are recieved in a record which have no direct corresponding field in the defined struct will be available in a map[string]interface{} field. This may extend to all fields being accessible in a field called "RAW" or some-such, which can then be manually type-asserted against.

Brainstorm: CRM defines many special types for their internal fields (SingleLine, MultiLine, Picklist, MultiSelect, Date, Time, etc.) that must be parsed from the JSON, and provided in a type safe way to this library and back to Zoho. If the records struct fields are made up of mainly these specialized field types (types.go), and each field type has a MarshalJSON/UnmarshalJSON function then parsing may be a little more staight forward. These MarshalJSON/UnmarshalJSON field types will need to handle 'null' cases in the JSON.

Additional Brainstorm: Because of the custom field problem, I believe we can define the definite fields that CRM will return in structs. Then when users that are using this client library need to have custom fields parsed, they can embed the parent struct we defined, into a struct of their own making which defines the custom fields they need.

Usage

import (
    "log"
    "fmt"
    "github.com/schmorrison/Zoho"
)

func main() {
    // get access/refresh tokens
    z := zoho.New()
    scopes := []zoho.ScopeString{
        zoho.BuildScope(zoho.Crm, zoho.ModulesScope, zoho.AllMethod, zoho.NoOp),
    }
    if err := z.AuthorizationCodeRequest("yourClientID", "yourClientSecret", scopes, "http://localhost:8080/oauthredirect"); err != nil {
        log.Fatal(err)
    }

    // Create a new CRM object and provide the Zoho struct
    c := crm.New(z)

    // While untested, getting data should work like so
    notes, err := c.GetNotes(nil)
    if err != nil {
        log.Fatal(err)
    }

    fmt.Println(notes)

    // The API for getting module records is bound to change once the returned data types can be defined.
    // The returned JSON values are subject to change given that custom fields are an instrinsic part of zoho. (see brainstorm above)
    data := crm.Account{}
    _, err := c.ListRecords(&data, crm.AccountsModule, nil)
    if err != nil {
        log.Fatal(err)
    }

    fmt.Println(data)
}

TODO

  • Write a TODO list
  • Comment code with full details
  • Add page context values to returned data, or methods to interact with it via module
  • [ ]

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	*zoho.Zoho
	// contains filtered or unexported fields
}

API is used for interacting with the Zoho CRM API the exposed methods are primarily access to CRM modules which provide access to CRM Methods

func New

func New(z *zoho.Zoho) *API

New returns a *crm.API with the provided zoho.Zoho as an embedded field

func (*API) ConvertLead

func (c *API) ConvertLead(request ConvertLeadData, ID string) (data ConvertLeadResponse, err error)

ConvertLead will modify the Lead record specified by ID and convert it to a Contact/Potential depending on the request data https://www.zoho.com/crm/help/api/v2/#convert-lead

func (*API) CreateNotes

func (c *API) CreateNotes(request CreateNoteData) (data CreateNoteResponse, err error)

CreateNotes will create multiple notes provided in the request data https://www.zoho.com/crm/help/api/v2/#create-notes

func (*API) CreateRecordNote

func (c *API) CreateRecordNote(request CreateRecordNoteData, module Module, recordID string) (data CreateRecordNoteResponse, err error)

CreateRecordNote will create a note on the specified record of the specified module https://www.zoho.com/crm/help/api/v2/#create-spec-notes

func (*API) DeleteNote

func (c *API) DeleteNote(module Module, recordID, noteID string) (data DeleteNoteResponse, err error)

DeleteNote will delete the specified note on the specified record from the module https://www.zoho.com/crm/help/api/v2/#delete-notes

func (*API) DeleteNotes

func (c *API) DeleteNotes(IDs ...string) (data DeleteNoteResponse, err error)

DeleteNotes will delete all notes specified in the IDs https://www.zoho.com/crm/help/api/v2/#delete-bulk-notes

func (*API) DeleteRecord

func (c *API) DeleteRecord(module Module, ID string) (data DeleteRecordResponse, err error)

DeleteRecord will delete the record specified by the id in the specified module https://www.zoho.com/crm/help/api/v2/#delete-specify-records

func (*API) DeleteRecords

func (c *API) DeleteRecords(module Module, ids []string) (data DeleteRecordsResponse, err error)

DeleteRecords will delete the records in the ids in the specified module https://www.zoho.com/crm/help/api/v2/#delete-bulk-records

func (*API) GetBlueprint

func (c *API) GetBlueprint(module Module, id string) (data BlueprintResponse, err error)

GetBlueprint retrieves a blueprint record specified by the ID parameter from the module specified https://www.zoho.com/crm/help/api/v2/#blueprint-api

func (*API) GetModules

func (c *API) GetModules() (data ModulesResponse, err error)

GetModules returns the list of modules available in the CRM account https://www.zoho.com/crm/help/api/v2/#Modules-APIs

func (*API) GetNote

func (c *API) GetNote(module Module, id string) (data NotesResponse, err error)

GetNote returns the note specified by ID and module https://www.zoho.com/crm/help/api/v2/#get-spec-notes-data

func (*API) GetNotes

func (c *API) GetNotes(params map[string]zoho.Parameter) (data NotesResponse, err error)

GetNotes returns a list of all notes https://www.zoho.com/crm/help/api/v2/#notes-api

func (*API) GetOrganization

func (c *API) GetOrganization() (data OrganizationResponse, err error)

GetOrganization will return the organization data related to the logged in account https://www.zoho.com/crm/help/api/v2/#Organization-API

func (*API) GetProfile

func (c *API) GetProfile(id string) (data ProfilesResponse, err error)

GetProfile will return the profile specified by id https://www.zoho.com/crm/help/api/v2/#get-single-profile-data

func (*API) GetProfiles

func (c *API) GetProfiles() (data ProfilesResponse, err error)

GetProfiles will return the list of profiles in this CRM organization https://www.zoho.com/crm/help/api/v2/#Profiles-APIs

func (*API) GetRecord

func (c *API) GetRecord(request interface{}, module Module, ID string) (data interface{}, err error)

GetRecord will retrieve the specified record by id in the specified module. https://www.zoho.com/crm/help/api/v2/#single-records

func (*API) GetRole

func (c *API) GetRole(id string) (data RolesResponse, err error)

GetRole will return the role specified by the id https://www.zoho.com/crm/help/api/v2/#get-single-role-data

func (*API) GetRoles

func (c *API) GetRoles() (data RolesResponse, err error)

GetRoles will return the list of roles in this CRM organization https://www.zoho.com/crm/help/api/v2/#Roles-APIs

func (*API) GetUser

func (c *API) GetUser(id string) (data UsersResponse, err error)

GetUser will return the user specified by id https://www.zoho.com/crm/help/api/v2/#get-single-user-data

func (*API) GetUsers

func (c *API) GetUsers(kind UserType) (data UsersResponse, err error)

GetUsers will return the list of users in the CRM organization. The list can be filtered using the 'kind' parameter https://www.zoho.com/crm/help/api/v2/#Users-APIs

func (*API) InsertRecord

func (c *API) InsertRecord(request InsertRecordData, module Module) (data InsertRecordResponse, err error)

InsertRecord will insert the specifed record in the module https://www.zoho.com/crm/help/api/v2/#create-specify-records

func (*API) InsertRecords

func (c *API) InsertRecords(request InsertRecordsData, module Module) (data InsertRecordsResponse, err error)

InsertRecords will add records in request to the specified module https://www.zoho.com/crm/help/api/v2/#ra-insert-records

func (*API) ListDeletedRecords

func (c *API) ListDeletedRecords(module Module, kind DeletedRecordsType, params map[string]zoho.Parameter) (data ListDeletedRecordsResponse, err error)

ListDeletedRecords will return a list of all records that have been deleted in the specified module. The records can be filtered by the kind parameter. https://www.zoho.com/crm/help/api/v2/#ra-deleted-records

func (*API) ListRecords

func (c *API) ListRecords(request interface{}, module Module, params map[string]zoho.Parameter) (data interface{}, err error)

ListRecords will return a list of the records provided in the request field, and specified by the module https://www.zoho.com/crm/help/api/v2/#record-api

func (*API) SearchRecords

func (c *API) SearchRecords(response interface{}, module Module, params map[string]zoho.Parameter) (data interface{}, err error)

SearchRecords is used for searching records in the specified module using the parameters. Parameters are 'criteria', 'email', 'phone', and 'word' https://www.zoho.com/crm/help/api/v2/#ra-search-records

func (*API) UpdateBlueprint

func (c *API) UpdateBlueprint(request UpdateBlueprintData, module Module, id string) (data UpdateBlueprintResponse, err error)

UpdateBlueprint updates the blueprint specified by ID in the specified module https://www.zoho.com/crm/help/api/v2/#update-blueprint

func (*API) UpdateNote

func (c *API) UpdateNote(request UpdateNoteData, module Module, recordID, noteID string) (data UpdateNoteResponse, err error)

UpdateNote will update the note data of the specified note on the specified record of the module https://www.zoho.com/crm/help/api/v2/#update-notes

func (*API) UpdateRecord

func (c *API) UpdateRecord(request UpdateRecordData, module Module, ID string) (data UpdateRecordResponse, err error)

UpdateRecord will update the record specified by ID in the specified module https://www.zoho.com/crm/help/api/v2/#update-specify-records

func (*API) UpdateRecords

func (c *API) UpdateRecords(request UpdateRecordsData, module Module) (data UpdateRecordsResponse, err error)

UpdateRecords will modify records by the data provided to request in the specified module https://www.zoho.com/crm/help/api/v2/#ra-update-records

When performing an update, because the natural state of the records fields in this package is to 'omitempty', if you want to empty the fields contents you will need to embed the records type in a struct in your own package, and override the field with a field that has a json tag that does not contain 'omitempty'. eg.

type struct Account {
    crm.Account
    CustomField string `json:"Custom_Field"`
 }

func (*API) UpsertRecords

func (c *API) UpsertRecords(request UpsertRecordsData, module Module, duplicateFieldsCheck []string) (data UpsertRecordsResponse, err error)

UpsertRecords will insert the provided records in the request, if they already exist it will be updated https://www.zoho.com/crm/help/api/v2/#ra-insert-or-update

When performing an upsert, because the natural state of the records fields in this package is to 'omitempty' when encoding json, if you want to empty the fields contents in zoho you will need to embed the records type in a struct in your own package, and override the field with a field that has a json tag that does not contain 'omitempty'. eg.

type struct Account {
    crm.Account
    CustomField string `json:"Custom_Field"`
 }

type Account

type Account struct {
	Data []struct {
		Owner struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Owner,omitempty"`
		Ownership        interface{} `json:"Ownership,omitempty"`
		Description      string      `json:"Description,omitempty"`
		CurrencySymbol   string      `json:"$currency_symbol,omitempty"`
		AccountType      interface{} `json:"Account_Type,omitempty"`
		Rating           string      `json:"Rating,omitempty"`
		SICCode          int         `json:"SIC_Code,omitempty"`
		ShippingState    string      `json:"Shipping_State,omitempty"`
		Website          string      `json:"Website,omitempty"`
		Employees        int         `json:"Employees,omitempty"`
		LastActivityTime string      `json:"Last_Activity_Time,omitempty"`
		Industry         string      `json:"Industry,omitempty"`
		RecordImage      interface{} `json:"Record_Image,omitempty"`
		ModifiedBy       struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Modified_By,omitempty"`
		AccountSite    interface{} `json:"Account_Site,omitempty"`
		ProcessFlow    bool        `json:"$process_flow,omitempty"`
		ExchangeRate   int         `json:"Exchange_Rate,omitempty"`
		Phone          string      `json:"Phone,omitempty"`
		Currency       string      `json:"Currency,omitempty"`
		BillingCountry string      `json:"Billing_Country,omitempty"`
		AccountName    string      `json:"Account_Name,omitempty"`
		ID             string      `json:"id,omitempty"`
		AccountNumber  string      `json:"Account_Number,omitempty"`
		Approved       bool        `json:"$approved,omitempty"`
		TickerSymbol   interface{} `json:"Ticker_Symbol,omitempty"`
		Approval       struct {
			Delegate bool `json:"delegate,omitempty"`
			Approve  bool `json:"approve,omitempty"`
			Reject   bool `json:"reject,omitempty"`
			Resubmit bool `json:"resubmit,omitempty"`
		} `json:"$approval,omitempty"`
		ModifiedTime    string        `json:"Modified_Time,omitempty"`
		BillingStreet   string        `json:"Billing_Street,omitempty"`
		CreatedTime     string        `json:"Created_Time,omitempty"`
		Editable        bool          `json:"$editable,omitempty"`
		BillingCode     string        `json:"Billing_Code,omitempty"`
		Territories     []string      `json:"Territories,omitempty"`
		ParentAccount   interface{}   `json:"Parent_Account,omitempty"`
		ShippingCity    string        `json:"Shipping_City,omitempty"`
		ShippingCountry string        `json:"Shipping_Country,omitempty"`
		ShippingCode    string        `json:"Shipping_Code,omitempty"`
		BillingCity     string        `json:"Billing_City,omitempty"`
		BillingState    string        `json:"Billing_State,omitempty"`
		Tag             []interface{} `json:"Tag,omitempty"`
		CreatedBy       struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Created_By,omitempty"`
		Fax            string `json:"Fax,omitempty"`
		AnnualRevenue  int    `json:"Annual_Revenue,omitempty"`
		ShippingStreet string `json:"Shipping_Street,omitempty"`
	} `json:"data,omitempty"`
	Info PageInfo `json:"info,omitempty"`
}

type AutoNumber

type AutoNumber string

type BlueprintResponse

type BlueprintResponse struct {
	Blueprint struct {
		ProcessInfo struct {
			FieldID      string `json:"field_id"`
			IsContinuous bool   `json:"is_continuous"`
			APIName      string `json:"api_name"`
			Continuous   bool   `json:"continuous"`
			FieldLabel   string `json:"field_label"`
			Name         string `json:"name"`
			ColumnName   string `json:"column_name"`
			FieldValue   string `json:"field_value"`
			ID           string `json:"id"`
			FieldName    string `json:"field_name"`
		} `json:"process_info"`
		Transitions []struct {
			NextTransitions    []string `json:"next_transitions"`
			PercentPartialSave float64  `json:"percent_partial_save"`
			Data               struct {
				Attachments string `json:"Attachments"`
			} `json:"data"`
			NextFieldValue  string `json:"next_field_value"`
			Name            string `json:"name"`
			CriteriaMatched bool   `json:"criteria_matched"`
			ID              string `json:"id"`
			Fields          []struct {
				DisplayLabel       string `json:"display_label"`
				Type               string `json:"_type"`
				DataType           string `json:"data_type"`
				ColumnName         string `json:"column_name"`
				PersonalityName    string `json:"personality_name"`
				ID                 string `json:"id"`
				TransitionSequence int    `json:"transition_sequence"`
				Mandatory          bool   `json:"mandatory"`
				Layouts            string `json:"layouts"`
			} `json:"fields"`
			CriteriaMessage string `json:"criteria_message"`
		} `json:"transitions"`
	} `json:"blueprint"`
}

BlueprintResponse is the data returned by the GetBlueprint endpoint

type Call

type Call struct {
	Data []struct {
		CallDuration string `json:"Call_Duration,omitempty"`
		Owner        struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Owner,omitempty"`
		Description    string `json:"Description,omitempty"`
		CurrencySymbol string `json:"$currency_symbol,omitempty"`
		ModifiedBy     struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Modified_By,omitempty"`
		ProcessFlow bool   `json:"$process_flow,omitempty"`
		CallPurpose string `json:"Call_Purpose,omitempty"`
		ID          string `json:"id,omitempty"`
		CallStatus  string `json:"Call_Status,omitempty"`
		Approved    bool   `json:"$approved,omitempty"`
		WhoID       struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Who_Id,omitempty"`
		Approval struct {
			Delegate bool `json:"delegate,omitempty"`
			Approve  bool `json:"approve,omitempty"`
			Reject   bool `json:"reject,omitempty"`
			Resubmit bool `json:"resubmit,omitempty"`
		} `json:"$approval,omitempty"`
		ModifiedTime  string      `json:"Modified_Time,omitempty"`
		Reminder      interface{} `json:"Reminder,omitempty"`
		CreatedTime   string      `json:"Created_Time,omitempty"`
		CallStartTime string      `json:"Call_Start_Time,omitempty"`
		Billable      bool        `json:"Billable,omitempty"`
		Editable      bool        `json:"$editable,omitempty"`
		Subject       string      `json:"Subject,omitempty"`
		SeModule      string      `json:"$se_module,omitempty"`
		CallType      string      `json:"Call_Type,omitempty"`
		CallResult    interface{} `json:"Call_Result,omitempty"`
		WhatID        struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"What_Id,omitempty"`
		CreatedBy struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Created_By,omitempty"`
		Tag []interface{} `json:"Tag,omitempty"`
	} `json:"data,omitempty"`
	Info PageInfo `json:"info,omitempty"`
}

type Campaign

type Campaign struct {
	Data []struct {
		Owner struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Owner,omitempty"`
		Description    string `json:"Description,omitempty"`
		CurrencySymbol string `json:"$currency_symbol,omitempty"`
		CampaignName   string `json:"Campaign_Name,omitempty"`
		EndDate        Date   `json:"End_Date,omitempty"`
		ModifiedBy     struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Modified_By,omitempty"`
		NumSent          string      `json:"Num_sent,omitempty"`
		ProcessFlow      bool        `json:"$process_flow,omitempty"`
		ExchangeRate     int         `json:"Exchange_Rate,omitempty"`
		ExpectedRevenue  interface{} `json:"Expected_Revenue,omitempty"`
		Currency         string      `json:"Currency,omitempty"`
		ActualCost       int         `json:"Actual_Cost,omitempty"`
		ID               string      `json:"id,omitempty"`
		ExpectedResponse interface{} `json:"Expected_Response,omitempty"`
		StartDate        interface{} `json:"Start_Date,omitempty"`
		Approved         bool        `json:"$approved,omitempty"`
		Status           interface{} `json:"Status,omitempty"`
		Approval         struct {
			Delegate bool `json:"delegate,omitempty"`
			Approve  bool `json:"approve,omitempty"`
			Reject   bool `json:"reject,omitempty"`
			Resubmit bool `json:"resubmit,omitempty"`
		} `json:"$approval,omitempty"`
		ModifiedTime string `json:"Modified_Time,omitempty"`
		CreatedTime  string `json:"Created_Time,omitempty"`
		Editable     bool   `json:"$editable,omitempty"`
		Type         string `json:"Type,omitempty"`
		CreatedBy    struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Created_By,omitempty"`
		Tag          []interface{} `json:"Tag,omitempty"`
		BudgetedCost interface{}   `json:"Budgeted_Cost,omitempty"`
	} `json:"data,omitempty"`
	Info struct {
		PerPage     int  `json:"per_page,omitempty"`
		Count       int  `json:"count,omitempty"`
		Page        int  `json:"page,omitempty"`
		MoreRecords bool `json:"more_records,omitempty"`
	} `json:"info,omitempty"`
}

type Case

type Case struct {
}

type Checkbox

type Checkbox bool

type Contact

type Contact struct {
	Data []struct {
		EXT   int64 `json:"EXT,omitempty"`
		Owner struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Owner,omitempty"`
		GCLID        interface{} `json:"GCLID,omitempty"`
		LeadScore    int64       `json:"Lead_Score,omitempty"`
		MailingState string      `json:"Mailing_State,omitempty"`
		OtherCountry string      `json:"Other_Country,omitempty"`
		Department   string      `json:"Department,omitempty"`
		ProcessFlow  bool        `json:"$process_flow,omitempty"`
		Currency     string      `json:"Currency,omitempty"`
		AdNetwork    interface{} `json:"Ad_Network,omitempty"`
		ID           string      `json:"id,omitempty"`
		Approval     struct {
			Delegate bool `json:"delegate,omitempty"`
			Approve  bool `json:"approve,omitempty"`
			Reject   bool `json:"reject,omitempty"`
			Resubmit bool `json:"resubmit,omitempty"`
		} `json:"$approval,omitempty"`
		CostPerClick            float64     `json:"Cost_per_Click,omitempty"`
		FirstVisitedURL         interface{} `json:"First_Visited_URL,omitempty"`
		NegativeTouchPointScore int64       `json:"Negative_Touch_Point_Score,omitempty"`
		CreatedTime             string      `json:"Created_Time,omitempty"`
		NegativeScore           int         `json:"Negative_Score,omitempty"`
		AdClickDate             interface{} `json:"Ad_Click_Date,omitempty"`
		LastVisitedTime         Time        `json:"Last_Visited_Time,omitempty"`
		CreatedBy               struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Created_By,omitempty"`
		TouchPointScore         int         `json:"Touch_Point_Score,omitempty"`
		PositiveScore           int         `json:"Positive_Score,omitempty"`
		Description             string      `json:"Description,omitempty"`
		Ad                      interface{} `json:"Ad,omitempty"`
		NumberOfChats           int64       `json:"Number_Of_Chats,omitempty"`
		SearchPartnerNetwork    interface{} `json:"Search_Partner_Network,omitempty"`
		OtherZip                string      `json:"Other_Zip,omitempty"`
		MailingStreet           string      `json:"Mailing_Street,omitempty"`
		AverageTimeSpentMinutes float64     `json:"Average_Time_Spent_Minutes,omitempty"`
		Salutation              string      `json:"Salutation,omitempty"`
		FullName                string      `json:"Full_Name,omitempty"`
		RecordImage             interface{} `json:"Record_Image,omitempty"`
		SkypeID                 interface{} `json:"Skype_ID,omitempty"`
		AccountName             struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Account_Name,omitempty"`
		EmailOptOut                bool          `json:"Email_Opt_Out,omitempty"`
		Keyword                    interface{}   `json:"Keyword,omitempty"`
		OtherStreet                string        `json:"Other_Street,omitempty"`
		Mobile                     string        `json:"Mobile,omitempty"`
		Territories                []interface{} `json:"Territories,omitempty"`
		AdCampaignName             interface{}   `json:"Ad_Campaign_Name,omitempty"`
		LeadSource                 string        `json:"Lead_Source,omitempty"`
		Tag                        []interface{} `json:"Tag,omitempty"`
		ReasonForConversionFailure interface{}   `json:"Reason_for_Conversion_Failure,omitempty"`
		Email                      string        `json:"Email,omitempty"`
		CurrencySymbol             string        `json:"$currency_symbol,omitempty"`
		VisitorScore               string        `json:"Visitor_Score,omitempty"`
		OtherPhone                 string        `json:"Other_Phone,omitempty"`
		OtherState                 string        `json:"Other_State,omitempty"`
		LastActivityTime           string        `json:"Last_Activity_Time,omitempty"`
		ExchangeRate               int           `json:"Exchange_Rate,omitempty"`
		MailingCountry             string        `json:"Mailing_Country,omitempty"`
		Approved                   bool          `json:"$approved,omitempty"`
		ConversionExportedOn       interface{}   `json:"Conversion_Exported_On,omitempty"`
		ClickType                  interface{}   `json:"Click_Type,omitempty"`
		DaysVisited                int64         `json:"Days_Visited,omitempty"`
		OtherCity                  string        `json:"Other_City,omitempty"`
		Editable                   bool          `json:"$editable,omitempty"`
		AdGroupName                interface{}   `json:"AdGroup_Name,omitempty"`
		PositiveTouchPointScore    int           `json:"Positive_Touch_Point_Score,omitempty"`
		HomePhone                  string        `json:"Home_Phone,omitempty"`
		Score                      int           `json:"Score,omitempty"`
		SecondaryEmail             string        `json:"Secondary_Email,omitempty"`
		VendorName                 struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Vendor_Name,omitempty"`
		MailingZip             string      `json:"Mailing_Zip,omitempty"`
		Twitter                string      `json:"Twitter,omitempty"`
		FirstName              string      `json:"First_Name,omitempty"`
		ConversionExportStatus interface{} `json:"Conversion_Export_Status,omitempty"`
		CostPerConversion      float64     `json:"Cost_per_Conversion,omitempty"`
		ModifiedBy             struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Modified_By,omitempty"`
		Phone            string      `json:"Phone,omitempty"`
		ModifiedTime     string      `json:"Modified_Time,omitempty"`
		MailingCity      string      `json:"Mailing_City,omitempty"`
		DeviceType       interface{} `json:"Device_Type,omitempty"`
		Title            string      `json:"Title,omitempty"`
		FirstVisitedTime Time        `json:"First_Visited_Time,omitempty"`
		LastName         string      `json:"Last_Name,omitempty"`
		Referrer         string      `json:"Referrer,omitempty"`
		Fax              string      `json:"Fax,omitempty"`
	} `json:"data,omitempty"`
	Info PageInfo `json:"info,omitempty"`
}

type ConvertLeadData

type ConvertLeadData struct {
	Data []struct {
		Overwrite            bool   `json:"overwrite,omitempty"`
		NotifyLeadOwner      bool   `json:"notify_lead_owner,omitempty"`
		NotifyNewEntityOwner bool   `json:"notify_new_entity_owner,omitempty"`
		Accounts             string `json:"Accounts,omitempty"`
		Contacts             string `json:"Contacts,omitempty"`
		AssignTo             string `json:"assign_to,omitempty"`
		Deals                struct {
			CampaignSource string  `json:"Campaign_Source,omitempty"`
			DealName       string  `json:"Deal_Name,omitempty"`
			ClosingDate    string  `json:"Closing_Date,omitempty"`
			Stage          string  `json:"Stage,omitempty"`
			ScanStatus     string  `json:"Scan_Status,omitempty"`
			Amount         float64 `json:"Amount,omitempty"`
			City           string  `json:"City,omitempty"`
			AdminLink      string  `json:"Admin_Link,omitempty"`
		} `json:"Deals,omitempty"`
	} `json:"data,omitempty"`
}

ConvertLeadData is the data provided to ConvertLead

type ConvertLeadResponse

type ConvertLeadResponse struct {
	Data []struct {
		Contacts string `json:"Contacts,omitempty"`
		Deals    string `json:"Deals,omitempty"`
		Accounts string `json:"Accounts,omitempty"`
	} `json:"data,omitempty"`
}

ConvertLeadResponse is the data returned by ConvertLead

type CreateNoteData

type CreateNoteData struct {
	Data []struct {
		NoteTitle   string `json:"Note_Title,omitempty"`
		NoteContent string `json:"Note_Content,omitempty"`
		ParentID    string `json:"Parent_Id,omitempty"`
		SeModule    string `json:"se_module,omitempty"`
	} `json:"data,omitempty"`
}

CreateNoteData is the data provided to create 1 or more notes

type CreateNoteResponse

type CreateNoteResponse struct {
	Data []struct {
		Message string `json:"message,omitempty"`
		Details struct {
			CreatedBy struct {
				ID   string `json:"id,omitempty"`
				Name string `json:"name,omitempty"`
			} `json:"created_by,omitempty"`
			ID         string `json:"id,omitempty"`
			ModifiedBy struct {
				ID   string `json:"id,omitempty"`
				Name string `json:"name,omitempty"`
			} `json:"modified_by,omitempty"`
			ModifiedTime Time `json:"modified_time,omitempty"`
			CreatedTime  Time `json:"created_time,omitempty"`
		} `json:"details,omitempty"`
		Status string `json:"status,omitempty"`
		Code   string `json:"code,omitempty"`
	} `json:"data,omitempty"`
}

CreateNoteResponse is the data returned by CreateNotes

type CreateRecordNoteData

type CreateRecordNoteData struct {
	Data []struct {
		NoteTitle   string `json:"Note_Title,omitempty"`
		NoteContent string `json:"Note_Content,omitempty"`
	} `json:"data,omitempty"`
}

CreateRecordNoteData is the data returned by CreateRecordNote

type CreateRecordNoteResponse

type CreateRecordNoteResponse = CreateNoteResponse

CreateRecordNoteResponse is the data returned by CreateRecordNote, it is the same as the data returned by CreateNote

type Currency

type Currency float64

type Date

type Date = zoho.Date

type Deal

type Deal struct {
	Data []struct {
		Owner struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Owner,omitempty"`
		GCLID                interface{} `json:"GCLID,omitempty"`
		CurrencySymbol       string      `json:"$currency_symbol,omitempty"`
		LastActivityTime     interface{} `json:"Last_Activity_Time,omitempty"`
		ProcessFlow          bool        `json:"$process_flow,omitempty"`
		DealName             string      `json:"Deal_Name,omitempty"`
		ExchangeRate         int         `json:"Exchange_Rate,omitempty"`
		Currency             string      `json:"Currency,omitempty"`
		AdNetwork            interface{} `json:"Ad_Network,omitempty"`
		Stage                string      `json:"Stage,omitempty"`
		ID                   string      `json:"id,omitempty"`
		Approved             bool        `json:"$approved,omitempty"`
		ConversionExportedOn interface{} `json:"Conversion_Exported_On,omitempty"`
		Approval             struct {
			Delegate bool `json:"delegate,omitempty"`
			Approve  bool `json:"approve,omitempty"`
			Reject   bool `json:"reject,omitempty"`
			Resubmit bool `json:"resubmit,omitempty"`
		} `json:"$approval,omitempty"`
		Territory    []interface{} `json:"Territory,omitempty"`
		CostPerClick int           `json:"Cost_per_Click,omitempty"`
		ClickType    interface{}   `json:"Click_Type,omitempty"`
		CreatedTime  string        `json:"Created_Time,omitempty"`
		Editable     bool          `json:"$editable,omitempty"`
		AdGroupName  interface{}   `json:"AdGroup_Name,omitempty"`
		AdClickDate  interface{}   `json:"Ad_Click_Date,omitempty"`
		CreatedBy    struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Created_By,omitempty"`
		Description            interface{} `json:"Description,omitempty"`
		Ad                     interface{} `json:"Ad,omitempty"`
		CampaignSource         interface{} `json:"Campaign_Source,omitempty"`
		SearchPartnerNetwork   interface{} `json:"Search_Partner_Network,omitempty"`
		ClosingDate            string      `json:"Closing_Date,omitempty"`
		ConversionExportStatus string      `json:"Conversion_Export_Status,omitempty"`
		CostPerConversion      int         `json:"Cost_per_Conversion,omitempty"`
		ModifiedBy             struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Modified_By,omitempty"`
		LeadConversionTime   interface{} `json:"Lead_Conversion_Time,omitempty"`
		OverallSalesDuration int         `json:"Overall_Sales_Duration,omitempty"`
		AccountName          interface{} `json:"Account_Name,omitempty"`
		ModifiedTime         string      `json:"Modified_Time,omitempty"`
		Keyword              interface{} `json:"Keyword,omitempty"`
		Amount               int         `json:"Amount,omitempty"`
		DeviceType           interface{} `json:"Device_Type,omitempty"`
		NextStep             string      `json:"Next_Step,omitempty"`
		Probability          int         `json:"Probability,omitempty"`
		ContactName          struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Contact_Name,omitempty"`
		PredictionScore            int           `json:"Prediction_Score,omitempty"`
		SalesCycleDuration         int           `json:"Sales_Cycle_Duration,omitempty"`
		AmountQuoted               interface{}   `json:"Amount_Quoted,omitempty"`
		AdCampaignName             interface{}   `json:"Ad_Campaign_Name,omitempty"`
		LeadSource                 string        `json:"Lead_Source,omitempty"`
		Tag                        []interface{} `json:"Tag,omitempty"`
		ReasonForConversionFailure interface{}   `json:"Reason_for_Conversion_Failure,omitempty"`
	} `json:"data,omitempty"`
	Info PageInfo `json:"info,omitempty"`
}

type Decimal

type Decimal float64

type DeleteNoteResponse

type DeleteNoteResponse struct {
	Data []struct {
		Code    string `json:"code"`
		Details struct {
			ID string `json:"id"`
		} `json:"details"`
		Message string `json:"message"`
		Status  string `json:"status"`
	} `json:"data"`
}

DeleteNoteResponse is the data returned when deleting a note

type DeleteRecordResponse

type DeleteRecordResponse = DeleteRecordsResponse

DeleteRecordResponse is the data returned by DeleteRecord

type DeleteRecordsResponse

type DeleteRecordsResponse struct {
	Data []struct {
		Code    string `json:"code,omitempty"`
		Details struct {
			ID string `json:"id,omitempty"`
		} `json:"details,omitempty"`
		Message string `json:"message,omitempty"`
		Status  string `json:"status,omitempty"`
	} `json:"data,omitempty"`
}

DeleteRecordsResponse is the data returned by DeleteRecords

type DeletedRecordsType

type DeletedRecordsType string

DeletedRecordsType is a type for filtering deleted records

const (
	// AllDeleted - To get the list of all deleted records
	AllDeleted DeletedRecordsType = "All"
	// RecycledDeleted - To get the list of deleted records from recycle bin
	RecycledDeleted DeletedRecordsType = "Recycle"
	// PermanentDeleted - To get the list of permanently deleted records
	PermanentDeleted DeletedRecordsType = "Permanent"
)

type Email

type Email string

Email is the field type in Zoho that defines an email address field

func (Email) MarshalJSON

func (s Email) MarshalJSON() ([]byte, error)

func (*Email) UnmarshalJSON

func (s *Email) UnmarshalJSON(data []byte) error

type Error

type Error struct {
	Code    string `json:"code,omitempty"`
	Details struct {
	} `json:"details,omitempty"`
	Message string `json:"message,omitempty"`
	Status  string `json:"status,omitempty"`
}

type Event

type Event struct {
}

type InsertRecordData

type InsertRecordData = InsertRecordsData

InsertRecordData is the data provided to InsertRecord

type InsertRecordResponse

type InsertRecordResponse = InsertRecordsResponse

InsertRecordResponse is the data returned by InsertRecord

type InsertRecordsData

type InsertRecordsData struct {
	Data    interface{} `json:"data,omitempty"`
	Trigger []string    `json:"trigger,omitempty"`
}

InsertRecordsData is the data provided to InsertRecords

type InsertRecordsResponse

type InsertRecordsResponse struct {
	Data []InsertRecordsResponseData `json:"data,omitempty"`
}

InsertRecordsResponse is the data returned by InsertRecords

type InsertRecordsResponseData

type InsertRecordsResponseData struct {
	Message string `json:"message,omitempty"`
	Details struct {
		CreatedBy struct {
			ID   string `json:"id,omitempty"`
			Name string `json:"name,omitempty"`
		} `json:"created_by,omitempty"`
		ID         string `json:"id,omitempty"`
		ModifiedBy struct {
			ID   string `json:"id,omitempty"`
			Name string `json:"name,omitempty"`
		} `json:"modified_by,omitempty"`
		ModifiedTime time.Time `json:"modified_time,omitempty"`
		CreatedTime  time.Time `json:"created_time,omitempty"`
	} `json:"details,omitempty"`
	Status string `json:"status,omitempty"`
	Code   string `json:"code,omitempty"`
}

type Invoice

type Invoice struct {
}

type Layout

type Layout struct {
	Name string `json:"name,omitempty"`
	ID   string `json:"id,omitempty"`
}

type Lead

type Lead struct {
}

type ListDeletedRecordsResponse

type ListDeletedRecordsResponse struct {
	Data []struct {
		DeletedBy struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"deleted_by,omitempty"`
		ID          string `json:"id,omitempty"`
		DisplayName string `json:"display_name,omitempty"`
		Type        string `json:"type,omitempty"`
		CreatedBy   struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"created_by,omitempty"`
		DeletedTime time.Time `json:"deleted_time,omitempty"`
	} `json:"data,omitempty"`
	Info PageInfo `json:"info,omitempty"`
}

ListDeletedRecordsResponse is the data returned by ListDeletedRecords

type Long

type Long int64

type Lookup

type Lookup struct {
	Name string `json:"name,omitempty"`
	ID   string `json:"id,omitempty"`
}

type Module

type Module string
const (
	AccountsModule       Module = "Accounts"
	CallsModule          Module = "Calls"
	CampaignsModule      Module = "Campaigns"
	CasesModule          Module = "Cases"
	ContactsModule       Module = "Contacts"
	CustomModule         Module = "Custom"
	DealsModule          Module = "Deals"
	EventsModule         Module = "Events"
	InvoicesModule       Module = "Invoices"
	LeadsModule          Module = "Leads"
	PotentialsModule     Module = "Potentials"
	PriceBooksModule     Module = "PriceBooks"
	ProductsModule       Module = "Products"
	PurchaseOrdersModule Module = "PurchaseOrders"
	QuotesModule         Module = "Quotes"
	SalesOrdersModule    Module = "SalesOrders"
	SolutionsModule      Module = "Solutions"
	TasksModule          Module = "Tasks"
	VendorsModule        Module = "Vendors"
)

Proper names for CRM modules

type ModulesResponse

type ModulesResponse struct {
	Modules []struct {
		Convertable   bool   `json:"convertable,omitempty"`
		Editable      bool   `json:"editable,omitempty"`
		Deletable     bool   `json:"deletable,omitempty"`
		WebLink       string `json:"web_link,omitempty"`
		SingularLabel string `json:"singular_label,omitempty"`
		ModifiedTime  Time   `json:"modified_time,omitempty"`
		Viewable      bool   `json:"viewable,omitempty"`
		APISupported  bool   `json:"api_supported,omitempty"`
		Createable    bool   `json:"createable,omitempty"`
		PluralLabel   string `json:"plural_label,omitempty"`
		APIName       string `json:"api_name,omitempty"`
		ModifiedBy    string `json:"modified_by,omitempty"`
		GeneratedType string `json:"generated_type,omitempty"`
		ID            string `json:"id,omitempty"`
		ModuleName    string `json:"module_name,omitempty"`
	} `json:"modules,omitempty"`
}

ModulesResponse is the data returned by GetModules

type MultiLine

type MultiLine string

MultiLine is the field type in Zoho that defines a multiline input field, like text area in HTML

func (MultiLine) MarshalJSON

func (s MultiLine) MarshalJSON() ([]byte, error)

func (*MultiLine) UnmarshalJSON

func (s *MultiLine) UnmarshalJSON(data []byte) error

type MultiSelect

type MultiSelect []string

type NotesResponse

type NotesResponse struct {
	Data []struct {
		Owner struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Owner,omitempty"`
		SeModule string `json:"$se_module,omitempty"`
		Approval struct {
			Delegate bool `json:"delegate,omitempty"`
			Approve  bool `json:"approve,omitempty"`
			Reject   bool `json:"reject,omitempty"`
		} `json:"$approval,omitempty"`
		ModifiedBy struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Modified_By,omitempty"`
		ModifiedTime Time `json:"Modified_Time,omitempty"`
		CreatedTime  Time `json:"Created_Time,omitempty"`
		Followed     bool `json:"$followed,omitempty"`
		ParentID     struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Parent_Id,omitempty"`
		ID        string `json:"id,omitempty"`
		CreatedBy struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Created_By,omitempty"`
		NoteTitle   string `json:"Note_Title,omitempty"`
		NoteContent string `json:"Note_Content,omitempty"`
	} `json:"data,omitempty"`
	Info PageInfo `json:"info,omitempty"`
}

NotesResponse is the data returned by GetNotes and GetNote

type Number

type Number int

type OrganizationResponse

type OrganizationResponse struct {
	Org []struct {
		Country        string `json:"country,omitempty"`
		McStatus       bool   `json:"mc_status,omitempty"`
		GappsEnabled   bool   `json:"gapps_enabled,omitempty"`
		ID             string `json:"id,omitempty"`
		State          string `json:"state,omitempty"`
		EmployeeCount  string `json:"employee_count,omitempty"`
		Website        string `json:"website,omitempty"`
		CurrencySymbol string `json:"currency_symbol,omitempty"`
		Mobile         string `json:"mobile,omitempty"`
		CurrencyLocale string `json:"currency_locale,omitempty"`
		PrimaryZuid    string `json:"primary_zuid,omitempty"`
		Zgid           string `json:"zgid,omitempty"`
		CountryCode    string `json:"country_code,omitempty"`
		LicenseDetails struct {
			PaidExpiry            Time   `json:"paid_expiry,omitempty"`
			UsersLicensePurchased int    `json:"users_license_purchased,omitempty"`
			TrialType             string `json:"trial_type,omitempty"`
			TrialExpiry           Time   `json:"trial_expiry,omitempty"`
			Paid                  bool   `json:"paid,omitempty"`
			PaidType              string `json:"paid_type,omitempty"`
		} `json:"license_details,omitempty"`
		CompanyName     string `json:"company_name,omitempty"`
		PrivacySettings bool   `json:"privacy_settings,omitempty"`
		PrimaryEmail    string `json:"primary_email,omitempty"`
		IsoCode         string `json:"iso_code,omitempty"`
	} `json:"org,omitempty"`
}

OrganizationResponse is the data returned by GetOrganization

type Owner

type Owner struct {
	Name string `json:"name,omitempty"`
	ID   string `json:"id,omitempty"`
}

type PageInfo

type PageInfo struct {
	PerPage     int  `json:"per_page,omitempty"`
	Count       int  `json:"count,omitempty"`
	Page        int  `json:"page,omitempty"`
	MoreRecords bool `json:"more_records,omitempty"`
}

type Percent

type Percent float64

type Phone

type Phone string

Phone is the field type in Zoho that defines a phone number field

func (Phone) MarshalJSON

func (s Phone) MarshalJSON() ([]byte, error)

func (*Phone) UnmarshalJSON

func (s *Phone) UnmarshalJSON(data []byte) error

type PickList

type PickList string

PickList is the field type in Zoho that defines a dropdown that has been selected

func (PickList) MarshalJSON

func (s PickList) MarshalJSON() ([]byte, error)

func (*PickList) UnmarshalJSON

func (s *PickList) UnmarshalJSON(data []byte) error

type Potential

type Potential struct {
}

type PriceBook

type PriceBook struct {
}

type Product

type Product struct {
}

type ProfilesResponse

type ProfilesResponse struct {
	Profiles []struct {
		Name        string `json:"name,omitempty"`
		ModifiedBy  string `json:"modified_by,omitempty"`
		Description string `json:"description,omitempty"`
		ID          string `json:"id,omitempty"`
		Category    bool   `json:"category,omitempty"`
	} `json:"profiles,omitempty"`
}

ProfilesResponse is the data returned by GetProfiles and GetProfile

type PurchaseOrder

type PurchaseOrder struct {
}

type Quote

type Quote struct {
}

type RolesResponse

type RolesResponse struct {
	Roles []struct {
		DisplayLabel string `json:"display_label,omitempty"`
		Name         string `json:"name,omitempty"`
		ID           string `json:"id,omitempty"`
		ReportingTo  string `json:"reporting_to,omitempty"`
		AdminUser    bool   `json:"admin_user,omitempty"`
	} `json:"roles,omitempty"`
}

RolesResponse is the data returned by GetRoles and GetRole

type SalesOrder

type SalesOrder struct {
}

type SingleLine

type SingleLine string

SingleLine is the field type in Zoho that defines a single line input field

func (SingleLine) MarshalJSON

func (s SingleLine) MarshalJSON() ([]byte, error)

func (*SingleLine) UnmarshalJSON

func (s *SingleLine) UnmarshalJSON(data []byte) error

type Solution

type Solution struct {
}

type Task

type Task struct {
}

type Time

type Time = zoho.Time

type URL

type URL string

type UpdateBlueprintData

type UpdateBlueprintData struct {
	Blueprint []struct {
		TransitionID string                 `json:"transition_id"`
		Data         map[string]interface{} `json:"data"`
	} `json:"blueprint"`
}

UpdateBlueprintData is the data that should be provided to UpdateBlueprint

type UpdateBlueprintResponse

type UpdateBlueprintResponse struct {
	Code    string `json:"code"`
	Details struct {
	} `json:"details"`
	Message string `json:"message"`
	Status  string `json:"status"`
}

UpdateBlueprintResponse is the data returned by UpdateBlueprint

type UpdateNoteData

type UpdateNoteData = CreateRecordNoteData

UpdateNoteData is the data required by UpdateNote

type UpdateNoteResponse

type UpdateNoteResponse = CreateNoteResponse

UpdateNoteResponse is the data returned by UpdateNote

type UpdateRecordData

type UpdateRecordData = InsertRecordsData

UpdateRecordData is the data provided to UpdateRecord

type UpdateRecordResponse

type UpdateRecordResponse = UpdateRecordsResponse

UpdateRecordResponse is the data returned by UpdateRecord

type UpdateRecordsData

type UpdateRecordsData = InsertRecordsData

UpdateRecordsData is the data provided to UpdateRecords

type UpdateRecordsResponse

type UpdateRecordsResponse struct {
	Data []UpdateRecordsResponseData `json:"data,omitempty"`
}

UpdateRecordsResponse is the data returned by UpdateRecords

type UpdateRecordsResponseData

type UpdateRecordsResponseData struct {
	Message string `json:"message,omitempty"`
	Details struct {
		ExpectedDataType string `json:"expected_data_type,omitempty"`
		APIName          string `json:"api_name"`
	} `json:"details,omitempty"`
	Status string `json:"status,omitempty"`
	Code   string `json:"code,omitempty"`
}

UpdateRecordsResponseData is the data provided to UpdateRecords

type UpsertRecordsData

type UpsertRecordsData struct {
	Data    interface{} `json:"data,omitempty"`
	Trigger []string    `json:"trigger,omitempty"`
}

UpsertRecordsData is the data provided to UpsertRecords

type UpsertRecordsResponse

type UpsertRecordsResponse struct {
	Data []struct {
		Message string `json:"message,omitempty"`
		Details struct {
			CreatedBy struct {
				ID   string `json:"id,omitempty"`
				Name string `json:"name,omitempty"`
			} `json:"created_by,omitempty"`
			ID         string `json:"id,omitempty"`
			ModifiedBy struct {
				ID   string `json:"id,omitempty"`
				Name string `json:"name,omitempty"`
			} `json:"modified_by,omitempty"`
			ModifiedTime time.Time `json:"modified_time,omitempty"`
			CreatedTime  time.Time `json:"created_time,omitempty"`
		} `json:"details,omitempty"`
		Status         string `json:"status,omitempty"`
		DuplicateField string `json:"duplicate_field,omitempty"`
		Action         string `json:"action,omitempty"`
		Code           string `json:"code,omitempty"`
	} `json:"data,omitempty"`
}

UpsertRecordsResponse is the data returned by UpsertRecords

type UserType

type UserType = zoho.Parameter

UserType is the 'kind' parameter in the GetUsers function

const (
	// None - Do not filter the Users list
	None UserType = ""
	// AllUsers - To list all users in your organization (both active and inactive users)
	AllUsers UserType = "AllUsers"
	// ActiveUsers - To get the list of all Active Users
	ActiveUsers UserType = "ActiveUsers"
	// DeactiveUsers - To get the list of all users who were deactivated
	DeactiveUsers UserType = "DeactiveUsers"
	// ConfirmedUsers - To get the list of confirmed users
	ConfirmedUsers UserType = "ConfirmedUsers"
	// NotConfirmedUsers - To get the list of non-confirmed users
	NotConfirmedUsers UserType = "NotConfirmedUsers"
	// DeletedUsers - To get the list of deleted users
	DeletedUsers UserType = "DeletedUsers"
	// ActiveConfirmedUsers - To get the list of active users who are also confirmed
	ActiveConfirmedUsers UserType = "ActiveConfirmedUsers"
	// AdminUsers - To get the list of admin users.
	AdminUsers UserType = "AdminUsers"
	// ActiveConfirmedAdmins - To get the list of active users with the administrative privileges and are also confirmed
	ActiveConfirmedAdmins UserType = "ActiveConfirmedAdmins"
	// CurrentUser - To get the list of current CRM users
	CurrentUser UserType = "CurrentUser"
)

type UsersResponse

type UsersResponse struct {
	Users []struct {
		Country string `json:"country,omitempty"`
		Role    struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"role,omitempty"`
		City       string `json:"city,omitempty"`
		Language   string `json:"language,omitempty"`
		Locale     string `json:"locale,omitempty"`
		ModifiedBy struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Modified_By,omitempty"`
		Street        string `json:"street,omitempty"`
		Currency      string `json:"Currency,omitempty"`
		Alias         string `json:"alias,omitempty"`
		ID            string `json:"id,omitempty"`
		State         string `json:"state,omitempty"`
		Fax           string `json:"fax,omitempty"`
		CountryLocale string `json:"country_locale,omitempty"`
		FirstName     string `json:"first_name,omitempty"`
		Email         string `json:"email,omitempty"`
		ReportingTo   string `json:"Reporting_To,omitempty"`
		Zip           string `json:"zip,omitempty"`
		CreatedTime   string `json:"created_time,omitempty"`
		ModifiedTime  string `json:"modified_time,omitempty"`
		Website       string `json:"website,omitempty"`
		TimeFormat    string `json:"time_format,omitempty"`
		Offset        int64  `json:"offset,omitempty"`
		Profile       struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"profile,omitempty"`
		Mobile    string `json:"mobile,omitempty"`
		LastName  string `json:"last_name,omitempty"`
		CreatedBy struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"created_by,omitempty"`
		Zuid        string `json:"zuid,omitempty"`
		Confirm     bool   `json:"confirm,omitempty"`
		FullName    string `json:"full_name,omitempty"`
		Territories []struct {
			Manager bool   `json:"manager,omitempty"`
			Name    string `json:"name,omitempty"`
			ID      string `json:"id,omitempty"`
		} `json:"territories,omitempty"`
		Phone         string `json:"phone,omitempty"`
		Dob           string `json:"dob,omitempty"`
		DateFormat    string `json:"date_format,omitempty"`
		Status        string `json:"status,omitempty"`
		CustomizeInfo struct {
			NotesDesc       string `json:"notes_desc,omitempty"`
			ShowRightPanel  bool   `json:"show_right_panel,omitempty"`
			BcView          string `json:"bc_view,omitempty"`
			ShowHome        bool   `json:"show_home,omitempty"`
			UnpinRecentItem bool   `json:"unpin_recent_item,omitempty"`
		} `json:"customize_info,omitempty,omitempty"`
		Signature           string `json:"signature,omitempty,omitempty"`
		NameFormat          string `json:"name_format,omitempty,omitempty"`
		PersonalAccount     bool   `json:"personal_account,omitempty,omitempty"`
		NtcNotificationType []int  `json:"ntc_notification_type,omitempty,omitempty"`
		DefaultTabGroup     string `json:"default_tab_group,omitempty,omitempty"`
		Theme               struct {
			NormalTab struct {
				FontColor  string `json:"font_color,omitempty"`
				Background string `json:"background,omitempty"`
			} `json:"normal_tab,omitempty"`
			SelectedTab struct {
				FontColor  string `json:"font_color,omitempty"`
				Background string `json:"background,omitempty"`
			} `json:"selected_tab,omitempty"`
			NewBackground string `json:"new_background,omitempty"`
			Background    string `json:"background,omitempty"`
			Screen        string `json:"screen,omitempty"`
			Type          string `json:"type,omitempty"`
		} `json:"theme,omitempty,omitempty"`
		TelephonyEnabled bool   `json:"telephony_enabled,omitempty,omitempty"`
		ImapStatus       bool   `json:"imap_status,omitempty,omitempty"`
		DecimalSeparator string `json:"decimal_separator,omitempty,omitempty"`
		TimeZone         string `json:"time_zone,omitempty"`
		RtlEnabled       bool   `json:"rtl_enabled,omitempty,omitempty"`
		NtcEnabled       bool   `json:"ntc_enabled,omitempty,omitempty"`
	} `json:"users,omitempty"`
	Info PageInfo `json:"info,omitempty"`
}

UsersResponse is the data returned by GetUsers and GetUser

type Vendor

type Vendor struct {
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL