AmoCustomers: Customers

Description Usage Arguments Value References Examples

View source: R/AmoCustomers.R

Description

Function to get customers.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
AmoCustomers(
  email = NULL,
  apikey = NULL,
  domain = NULL,
  auth_list = NULL,
  limit = 500,
  flatten = F,
  id = NULL,
  query = NULL,
  main_user = NULL,
  date_type = NULL,
  date_from = NULL,
  date_to = NULL,
  next_date_from = NULL,
  next_date_to = 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 customers.

query

Filter. Searching for all fields of customers. String.

main_user

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

date_type

Filter. Choose date type which you want to filter ('create' or 'modify')

date_from

Filter. Date from, e.g. '2019-01-01'.

date_to

Filter. Date to, e.g. '2019-01-01'.

next_date_from

Filter. Date from of next purchasing.

next_date_to

Filter. Date to of next purchasing.

Value

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

linked_custom_fields — linked custom fields with all parameters.

linked_tags — linked tags with all parameters.

linked_contacts — linked contacts 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)
customers <- AmoCustomers(auth_list = auth_list)
customers_with_cf <- customers$customers %>%
                        left_join(customers$linked_custom_fields, by = 'id') # not tidy

## End(Not run)

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