AmoCompanies: Companies

Description Usage Arguments Value References Examples

View source: R/AmoCompanies.R

Description

Function to get companies.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
AmoCompanies(
  email = NULL,
  apikey = NULL,
  domain = NULL,
  auth_list = NULL,
  limit = 500,
  flatten = F,
  id = NULL,
  query = NULL,
  responsible_user_id = NULL
)

Arguments

email

Email

apikey

Your api key from settings in interface

domain

Your domain in AmoCRM (xxx in xxx.amocrm.ru)

auth_list

List with auth data, you can build from AmoAuthList

limit

Batch limit, sometimes AmoCRM's API doesn't work properly, you can reduce the value and have a chance to load your data

flatten

Set TRUE if you want to join all the output dataframes You'll have a not tidy-dataframe with left-joining all dataframes

id

Filter. Pass id or vector of ids of companies.

query

Filter. Searching for all fields of companies. String.

responsible_user_id

Filter. Pass id or vector of ids of responsible user ids. You can get ids from AmoUsers().

Value

If flatten is FALSE (default) you'll get a list of 6 tidy-dataframes which you can join by id. You can access it using list_name$dataframe_name.

companies - all companies with unnested parameters.

linked_custom_fields — linked custom fields with all parameters.

linked_tags — linked tags with all parameters.

linked_leads — linked leads with all parameters.

linked_contacts — linked contacts with all parameters.

linked_customers — linked customers with all parameters.

References

Please READ this: Function documentation in Russian on GitHub

Also nice to read: AmoCRM official documentation

Examples

1
2
3
4
5
6
7
## Not run: 
library(dplyr)
companies <- AmoCompanies(auth_list = auth_list)
companies_with_cf <- companies$companies %>%
                        left_join(companies$linked_custom_fields, by = 'id') # not tidy

## End(Not run)

grkhr/amocrm documentation built on May 24, 2021, 5:24 a.m.