Description Usage Arguments Value References Examples
Function to get leads.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | AmoLeads(
email = NULL,
apikey = NULL,
domain = NULL,
auth_list = NULL,
limit = 500,
flatten = F,
id = NULL,
query = NULL,
responsible_user_id = NULL,
with_with = "is_price_modified_by_robot,loss_reason_name",
status = NULL,
date_create_from = NULL,
date_create_to = NULL,
date_modify_from = NULL,
date_modify_to = NULL,
tasks = NULL,
active = NULL
)
|
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 |
id |
Filter. Pass id or vector of ids of leads. |
query |
Filter. Searching for all fields of leads. String. |
responsible_user_id |
Filter. Pass id or vector of ids of responsible user ids. You can get ids from AmoUsers(). |
with_with |
Additional data. Default to |
status |
Filter. Single status id or vector of ids. You can get ids from AmoPipelinesStatuses(). |
date_create_from |
Filter. Date create of lead. You can pass like |
date_create_to |
Filter. Date create of lead. You can pass like |
date_modify_from |
Filter. Date modify of lead. You can pass like |
date_modify_to |
Filter. Date modify of lead. You can pass like |
tasks |
Filter. Pass |
active |
Filter. Pass |
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.
leads - all leads with unnested parameters.
linked_custom_fields — linked custom fields with all parameters.
linked_tags — linked tags with all parameters.
linked_contacts — linked contacts with all parameters.
Please READ this: Function documentation in Russian on GitHub
Also nice to read: AmoCRM official documentation
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
# simple
library(dplyr)
leads <- AmoLeads(auth_list = auth_list)
leads_with_cf <- leads$leads %>%
left_join(leads$linked_custom_fields, by = 'id') # not tidy
# filters
leads <- AmoLeads(auth_list = auth_list,
date_create_from = '2019-02-01 05:00:00',
date_create_to = '2019-02-20 17:00:00',
active = 1)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.