Spec - CRM Activities

Table Of Contents

 

Get CRM Activities

This function allows the caller to retrieve CRM activities from the database. Search parameters should be specified inside the tag. CRM activities can be retrieved by activity ID, contact (ID or name), done by contact ID, group (ID or Name), or activity. Leaving all search criteria blank would return all of the CRM activities in the account.

Input

Specify search criteria within the GetCRMActivitiesRequest tag. Search criteria can be

If no search criteria, return all CRM activities in the account.

To get CRM activities after a timestamp obtained earlier, pass updated_timestamp=”(timestampvalue)”.

Specify account_id for shared access to another account.

Specify get_all=”true” to return all CRM activities that the account has access to, including shared access. Note that when passing get_all=”true” and response=”json” arguments altogether, results are paginated by default and only the first 100 CRM activities will be returned. To fetch the next page, pass the ‘page’ parameter. To use a different result size other than the default 100, pass the ‘chunk_size’ parameter. Automatic pagination only applies when requesting JSON response, XML response is not paginated.

To get chunks of 250 CRM activities, specify start_chunk_id - an Activity ID to get all CRM activities with a greater ID up to 250 contacts. Specify start_chunk_id = ‘0’ to get the first chunk.

Note: to use chunking in conjunction with get_all=”true”, a start_chunk_acctno must also be passed, because it is possible that CRM activities from multiple accounts will be fetched with overlapping ID numbers like start_chunk_id, start_chunk_acctno = ‘0’ can be passed to get the first chunk.

show_assignables = ‘true’ can be passed to show a list of contacts assignable to the CRM activities.

Specify get_last_x_activities=”(integer)” to retrieve the last ‘x’ amout of CRM activities. Note that ‘get_last_x_activities’ parameter does not work if ‘get_all’ parameter is passed.

Output

Success or failure. Total number of CRM Activites matching search. For each CRM activity found: Activity_id, Contact_id, Contact_firstname, Contact_lastname, Done_by_contact_id, Group_id, Group_name, Done_date, Due_date, Activity, Notes, UpdatedTimeStamp, AccountNumber.

Example Request

<GetCRMActivitiesRequest></GetCRMActivitiesRequest>

Example Request

<GetCRMActivitiesRequest group_name="MyTestGroup"></GetCRMActivitiesRequest>

Example Request

<GetCRMActivitiesRequest updated_timestamp="2012-01-06 14:02:34"></GetCRMActivitiesRequest>

Example Request (shared access)

<GetCRMActivitiesRequest account_id="143996"></GetCRMActivitiesRequest>

Example Request (shared access with get_all)

<GetCRMActivitiesRequest get_all="true"></GetCRMActivitiesRequest>

Example Request (when requesting JSON response with ‘get_all’, only the first page of 100 CRM activities from all accounts are returned)

<GetCRMActivitiesRequest get_all="true" response="json"></GetCRMActivitiesRequest>

Example Request (to fetch subsequent pages when requesting JSON response with ‘get_all’, pass ‘page’, first page starts at 0)

<GetCRMActivitiesRequest get_all="true" response="json" page="1"></GetCRMActivitiesRequest>

Example Request (to override the default 100 chunk size)

<GetCRMActivitiesRequest get_all="true" response="json" page="0" chunk_size="200"></GetCRMActivitiesRequest>

Example Request (shared access with get_all and chunking)

<GetCRMActivitiesRequest get_all="true" start_chunk_acctno="0" start_chunk_id="0"></GetCRMActivitiesRequest>

Example Request (get the latest 5 activities)

<GetCRMActivitiesRequest get_last_x_activities="5"></GetCRMActivitiesRequest>

Example Request (filter by activity)

<GetCRMActivitiesRequest activity="Phone Call"></GetCRMActivitiesRequest>

Example Request (filter by activities)

<GetCRMActivitiesRequest>
    <Activities>
        <Activity>Phone Call</Activity>
        <Activity>Left Message</Activity>
    </Activities>
</GetCRMActivitiesRequest>

Example Request (activities deleted after timestamp - note only activities deleted after 2023/03/24 when this feature was added are returned)

<GetCRMActivitiesRequest deleted="true" updated_timestamp="2023-03-24 12:00:00"></GetCRMActivitiesRequest>

Successful Response

<GetCRMActivitiesResponse>
    <Result>Success</Result>
    <CRMActivities>
        <CRMActivity>
            <Activity_id>23</Activity_id>
            <Contact_id>443</Contact_id>
            <Contact_firstname>Jeff</Contact_firstname>
            <Contact_lastname>Gordon</Contact_lastname>
            <Done_by_contact_id>447</Done_by_contact_id>
            <Group_id>443</Group_id>
            <Group_name>My Test Team</Group_name>
            <Date>2011-07-12 08:55:00</Date>
            <Due_date>2011-07-10 09:03:00</Due_date>
            <Activity>Meeting</Activity>
            <Notes>Had a really awesome meeting with Jeff.</Notes>
            <UpdatedTimeStamp>2012-06-23 10:43:12</UpdatedTimeStamp>
            <AccountNumber>91234</AccountNumber>
            <Opportunity_id></Opportunity_id>
            <Opportunity_title></Opportunity_title>
            <Completed_by_contact_id></Completed_by_contact_id>
            <Completed_by_firstname></Completed_by_firstname>
            <Completed_by_lastname></Completed_by_lastname>
            <Completed_by_email></Completed_by_email>
            <Workflow_id></Workflow_id>
            <Workflow_name></Workflow_name>
            <Send_reminder_hour_before_due>Y</Send_reminder_hour_before_due>
            <Send_reminder_24_hours_before_due>Y</Send_reminder_24_hours_before_due>
        </CRMActivity>
        <CRMActivity>
            <Activity_id>26</Activity_id>
            <Contact_id>446</Contact_id>
            <Contact_firstname>Steve</Contact_firstname>
            <Contact_lastname>Johnson</Contact_lastname>
            <Done_by_contact_id>453</Done_by_contact_id>
            <Group_id>572</Group_id>
            <Group_name>Another Test Team</Group_name>
            <Date>2011-11-01 13:00</Date>
            <Due_date>2011-11-02 07:25</Due_date>
            <Activity>Phone Call</Activity>
            <Notes>Touched base with Steve regarding our latest product.</Notes>
            <UpdatedTimeStamp>2012-06-23 10:43:12</UpdatedTimeStamp>
            <AccountNumber>91234</AccountNumber>
            <Opportunity_id></Opportunity_id>
            <Opportunity_title></Opportunity_title>
            <Completed_by_contact_id></Completed_by_contact_id>
            <Completed_by_firstname></Completed_by_firstname>
            <Completed_by_lastname></Completed_by_lastname>
            <Completed_by_email></Completed_by_email>
            <Workflow_id>1</Workflow_id>
            <Workflow_name>Workflow A</Workflow_name>
            <Send_reminder_hour_before_due>N</Send_reminder_hour_before_due>
            <Send_reminder_24_hours_before_due>Y</Send_reminder_24_hours_before_due>
        </CRMActivity>
    </CRMActivities>
    <TotalMatchingActivities>2</TotalMatchingActivities>
</GetCRMActivitiesResponse>

Get CRM Activities Emails

This function allows the caller to retrieve CRM activities emails from the database. These would include broadcasts or other emails sent through the system, as well as queued emals for future sends.

Input

If no parameters other than ‘contact_id’ is passed, all results for the contact will be returned.

Specify ‘account_id’ for shared access to another account.

Pass the ‘start_date’ or/and ‘end_date’ parameters to filter the results by ‘Datetime_sent’ and ‘Scheduled_for_delivery’.

Pass the ‘read_start_date’ or/and ‘read_end_date’ parameters to filter the results by ‘DatetimeRead’.

Pass the ‘click_start_date’ or/and ‘click_end_date’ parameters to filter the results by ‘DatetimeClicked’.

Read and click parameters can both be passed together to filter results that satisfy either one (‘OR’ relationship).

To paginate the results, pass the ‘chunk_size’ and ‘page’ parameters. First page starts with 0.

Output

Success or failure. AccountNumber, Contact_id. For each email sent - Broadcast_id, Message_type, Subject, Datetime_sent, Read_data, Click_data. For each broadcast queued - Broadcast_id, Subject, Scheduled_for_delivery.

Example Request 1

<GetCRMActivitiesEmailsRequest contact_id="3432" ></GetCRMActivitiesEmailsRequest>

Example Request 2 (shared access with date range)

<GetCRMActivitiesEmailsRequest account_id="2341" contact_id="8493" start_date="2012-01-01 00:00:00" end_date="2012-12-31 23:59:59"></GetCRMActivitiesEmailsRequest>

Example Request 3 (filter by read datetime)

<GetCRMActivitiesEmailsRequest account_id="2341" contact_id="8493" read_start_date="2018-01-01 00:00:00" read_end_date="2018-01-31 23:59:59"></GetCRMActivitiesEmailsRequest>

Example Request 4 (filter by click datetime)

<GetCRMActivitiesEmailsRequest account_id="2341" contact_id="8493" click_start_date="2018-01-01 00:00:00" click_end_date="2018-01-31 23:59:59"></GetCRMActivitiesEmailsRequest>

Example Request 5 (filter by read datetime OR click datetime)

<GetCRMActivitiesEmailsRequest account_id="2341" contact_id="8493" read_start_date="2018-01-01 00:00:00" click_start_date="2018-01-01 00:00:00"></GetCRMActivitiesEmailsRequest>

Successful Response

<GetCRMActivitiesEmailsResponse>
    <Result>Success</Result>
    <AccountNumber>2341</AccountNumber>
    <Contact_id>8493</Contact_id>
    <SentEmails>
        <SentEmail>
            <Broadcast_id>98403</Broadcast_id>
            <Message_type>Sent Email</Message_type>
            <Subject>Message 1</Subject>
            <Datetime_sent>2012-11-09 10:34:56</Datetime_sent>
            <Read_data>
                <DatetimeRead>2012-11-09 13:45:45</DatetimeRead>
                <DatetimeRead>2012-11-19 08:00:00</DatetimeRead>
            </Read_data>
            <Click_data>
                <Click>
                    <LinkClicked>http://www.mysite.com/mylink1.html</LinkClicked>
                    <DatetimeClicked>2012-11-09 13:47:08</DatetimeClicked>
                </Click>
                <Click>
                    <LinkClicked>http://www.mysite.com/mylink2.html</LinkClicked>
                    <DatetimeClicked>2012-11-19 08:10:18</DatetimeClicked>
                </Click>
            </Click_data>
        </SentEmail>
        <SentEmail>
            <Broadcast_id>98434</Broadcast_id>
            <Message_type>Personal Email</Message_type>
            <Subject>Message 2</Subject>
            <Datetime_sent>2012-11-12 13:14:23</Datetime_sent>
            <Read_data>
                <DatetimeRead>2012-11-12 13:45:45</DatetimeRead>
                <DatetimeRead>2012-11-13 08:00:00</DatetimeRead>
            </Read_data>
            <Click_data>
                <Click>
                    <LinkClicked>http://www.mysite.com/mylink3.html</LinkClicked>
                    <DatetimeClicked>2012-11-18 13:47:08</DatetimeClicked>
                </Click>
                <Click>
                    <LinkClicked>http://www.mysite.com/mylink4.html</LinkClicked>
                    <DatetimeClicked>2012-11-19 13:48:18</DatetimeClicked>
                </Click>
            </Click_data>
        </SentEmail>
    </SentEmails>
    <QueuedBroadcasts>
        <QueuedBroadcast>
            <Broadcast_id>98774</Broadcast_id>
            <Subject>Message 3</Subject>
            <Scheduled_for_delivery>2012-12-01 03:42:34</Scheduled_for_delivery>
        </QueuedBroadcast>
        <QueuedBroadcast>
            <Broadcast_id>98798</Broadcast_id>
            <Subject>Message 4</Subject>
            <Scheduled_for_delivery>2012-12-01 04:00:00</Schedule_for_delivery>
        </QueuedBroadcast>
    </QueuedBroadcasts>
</GetCRMActivitiesEmailsResponse>

Get CRM Activities Website Visits

This function allows the caller to retrieve CRM activities website visits from the database.

Input

Contact_id (required). account_id required if shared access, otherwise account owned by user will be searched. start_date, end_date both optional, yyy-mm-dd hh:mm:ss format.

Output

Success or failure. AccountNumber, Contact_id. For each website visit - Datetime_visited, Page_visited, Points_for_visit, Referring_page.

Example Request 1

<GetCRMActivitiesWebsiteVisitsRequest contact_id="3432" ></GetCRMActivitiesWebsiteVisitsRequest>

Example Request 2 (shared access with date range)

<GetCRMActivitiesWebsiteVisitsRequest account_id="2341" contact_id="8493" start_date="2012-01-01 00:00:00" end_date="2012-12-31 23:59:59"></GetCRMActivitiesWebsiteVisitsRequest>

Successful Response

<GetCRMActivitiesWebsiteVisitsResponse>
    <Result>Success</Result>
    <AccountNumber>2341</AccountNumber>
    <Contact_id>8493</Contact_id>
    <WebsiteVisits>
        <WebsiteVisit>
            <Datetime_visited>2012-11-06 07:30:00</Datetime_visited>
            <Page_visited>mysite.com</Page_visited>
            <Points_for_visit>1</Points_for_visit>
            <Referring_page>www.google.com</Referring_page>
        </WebsiteVisit>
    </WebsiteVisits>
</GetCRMActivitiesWebsiteVisitsResponse>

Get All CRM Activities Emails

This function allows the caller to retrieve all CRM activities emails sent from the database.

Input

If no parameter is passed, all sent emails data will be returned.

Specify ‘account_id’ for shared access to another account. ‘group_id’ is required too.

Pass the ‘group_id’ or ‘group_name’ parameter to filter the results by group.

Pass an array of ‘Contact_id’ request tags to filter by contacts.

Pass the ‘start_date’ or/and ‘end_date’ parameters to filter the results by ‘Datetime_sent’.

Pass the ‘read_start_date’ or/and ‘read_end_date’ parameters to filter the results by ‘DatetimeRead’.

Pass the ‘click_start_date’ or/and ‘click_end_date’ parameters to filter the results by ‘DatetimeClicked’.

To paginate the results, pass the ‘chunk_size’ and ‘page’ parameters. First page starts with 0.

Output

Success or failure. Email read and click data.

Example Request 1

<GetAllCRMActivitiesEmailsRequest></GetAllCRMActivitiesEmailsRequest>

Example Request 2 (For shared access users)

<GetAllCRMActivitiesEmailsRequest account_id="45159" group_id="1"></GetAllCRMActivitiesEmailsRequest>

Example Request 3 (To filter by group)

<GetAllCRMActivitiesEmailsRequest group_id="1"></GetAllCRMActivitiesEmailsRequest>

<GetAllCRMActivitiesEmailsRequest group_name="My Group"></GetAllCRMActivitiesEmailsRequest>

Example Request 4 (To filter by contacts)

<GetAllCRMActivitiesEmailsRequest>
    <Contacts>
        <Contact_id>12</Contact_id>
    </Contacts>
</GetAllCRMActivitiesEmailsRequest>

<GetAllCRMActivitiesEmailsRequest>
    <Contacts>
        <Contact_id>12</Contact_id>
        <Contact_id>13</Contact_id>
        <Contact_id>14</Contact_id>
    </Contacts>
</GetAllCRMActivitiesEmailsRequest>

Example Request 5 (Pagination)

<GetAllCRMActivitiesEmailsRequest page="0" chunk_size="50"></GetAllCRMActivitiesEmailsRequest>

<GetAllCRMActivitiesEmailsRequest page="1" chunk_size="50"></GetAllCRMActivitiesEmailsRequest>

Example Request 6 (To filter by email sent datetime)

<GetAllCRMActivitiesEmailsRequest start_date="2018-01-01 00:00:00"></GetAllCRMActivitiesEmailsRequest>

<GetAllCRMActivitiesEmailsRequest end_date="2018-01-31 00:00:00"></GetAllCRMActivitiesEmailsRequest>

<GetAllCRMActivitiesEmailsRequest start_date="2018-01-01 00:00:00" end_date="2018-01-31 00:00:00"></GetAllCRMActivitiesEmailsRequest>

Example Request 7 (To filter by email read datetime)

<GetAllCRMActivitiesEmailsRequest read_start_date="2018-01-01 00:00:00"></GetAllCRMActivitiesEmailsRequest>

<GetAllCRMActivitiesEmailsRequest read_end_date="2018-01-31 00:00:00"></GetAllCRMActivitiesEmailsRequest>

<GetAllCRMActivitiesEmailsRequest read_start_date="2018-01-01 00:00:00" read_end_date="2018-01-31 00:00:00"></GetAllCRMActivitiesEmailsRequest>
<GetAllCRMActivitiesEmailsRequest click_start_date="2018-01-01 00:00:00"></GetAllCRMActivitiesEmailsRequest>

<GetAllCRMActivitiesEmailsRequest click_end_date="2018-01-31 00:00:00"></GetAllCRMActivitiesEmailsRequest>

<GetAllCRMActivitiesEmailsRequest click_start_date="2018-01-01 00:00:00" click_end_date="2018-01-31 00:00:00"></GetAllCRMActivitiesEmailsRequest>

Successful Response

<GetAllCRMActivitiesEmailsResponse>
    <Result>Success</Result>
    <SentEmails>
        <SentEmail>
            <AccountNum>38193</AccountNum>
            <GroupID>1</GroupID>
            <GroupName>My Group</GroupName>
            <Broadcast_id>698409</Broadcast_id>
            <FromName>John Connor</FromName>
            <FromEmail>john.connor@gmail.com</FromEmail>
            <Subject>Test</Subject>
            <Message_type>Sent Email</Message_type>
            <DatetimeQueued>2014-08-04 12:00:00</DatetimeQueued>
            <DatetimeSent>2014-08-04 13:49:00</DatetimeSent>
            <Contacts>
                <Contact>
                    <Contact_id>623</Contact_id>
                    <Contact_firstname>John</Contact_firstname>
                    <Contact_lastname>Smith</Contact_lastname>
                    <Contact_email>john.smith@gmail.com</Contact_email>
                    <Read_data>
                        <DatetimeRead>2014-08-04 13:50:23</DatetimeRead>
                    </Read_data>
                    <Click_data>
                        <Click>
                            <DatetimeClicked>2017-03-21 12:56:00</DatetimeClicked>
                            <LinkClicked>http://www.mysite.com/mylink1.html</LinkClicked>
                        </Click>
                        <Click>
                            <DatetimeClicked>2017-03-21 12:56:00</DatetimeClicked>
                            <LinkClicked>http://www.mysite.com/mylink2.html</LinkClicked>
                        </Click>
                    </Click_data>
                </Contact>
            </Contacts>
        </SentEmail>
        <SentEmail>
            <AccountNum>38193</AccountNum>
            <GroupID>1</GroupID>
            <GroupName>My Group</GroupName>
            <Broadcast_id>698411</Broadcast_id>
            <FromName>John Connor</FromName>
            <FromEmail>john.connor@gmail.com</FromEmail>
            <Subject>Test</Subject>
            <Message_type>Sent Email</Message_type>
            <DatetimeQueued>2014-08-04 12:00:00</DatetimeQueued>
            <DatetimeSent>2014-08-04 13:52:00</DatetimeSent>
            <Contacts>
                <Contact>
                    <Contact_id>623</Contact_id>
                    <Contact_firstname>John</Contact_firstname>
                    <Contact_lastname>Smith</Contact_lastname>
                    <Contact_email>john.smith@gmail.com</Contact_email>
                    <Read_data>
                        <DatetimeRead>2014-08-04 13:53:40</DatetimeRead>
                    </Read_data>
                    <Click_data></Click_data>
                </Contact>
            </Contacts>
        </SentEmail>
        <SentEmail>
            <AccountNum>38193</AccountNum>
            <GroupID>4</GroupID>
            <GroupName>Members Group</GroupName>
            <Broadcast_id>867662</Broadcast_id>
            <FromName>John Connor</FromName>
            <FromEmail>john.connor@gmail.com</FromEmail>
            <Subject>Test Subject</Subject>
            <Message_type>Sent Email</Message_type>
            <DatetimeQueued>2014-08-04 12:00:00</DatetimeQueued>
            <DatetimeSent>2014-12-09 07:34:00</DatetimeSent>
            <Contacts>
                <Contact>
                    <Contact_id>566</Contact_id>
                    <Contact_firstname>John</Contact_firstname>
                    <Contact_lastname>Smith</Contact_lastname>
                    <Contact_email>john.smith@gmail.com</Contact_email>
                    <Read_data>
                        <DatetimeRead>2014-12-29 10:13:03</DatetimeRead>
                    </Read_data>
                    <Click_data></Click_data>
                </Contact>
            </Contacts>
        </SentEmail>
    </SentEmails>
    <TotalSentEmails>3</TotalSentEmails>
</GetAllCRMActivitiesEmailsResponse>

Get All CRM Activities Website Visits

This function allows the caller to retrieve all CRM activities website visits from the database.

Input

If no parameter is passed, all website visits data will be returned.

Specify ‘account_id’ for shared access to another account. ‘group_id’ is required too.

Pass the ‘group_id’ or ‘group_name’ parameter to filter the results by group.

Pass an array of ‘Contact_id’ request tags to filter by contacts.

Pass the ‘start_date’ or/and ‘end_date’ parameters to filter the results by ‘Datetime_visited’.

To paginate the results, pass the ‘chunk_size’ and ‘page’ parameters. First page starts with 0.

Output

Success or failure. Website visits data.

Example Request 1

<GetAllCRMActivitiesWebsiteVisitsRequest></GetAllCRMActivitiesWebsiteVisitsRequest>

Example Request 2 (For shared access users)

<GetAllCRMActivitiesWebsiteVisitsRequest account_id="45159" group_id="1"></GetAllCRMActivitiesWebsiteVisitsRequest>

Example Request 3 (To filter by group)

<GetAllCRMActivitiesWebsiteVisitsRequest group_id="1"></GetAllCRMActivitiesWebsiteVisitsRequest>

<GetAllCRMActivitiesWebsiteVisitsRequest group_name="My Group"></GetAllCRMActivitiesWebsiteVisitsRequest>

Example Request 4 (To filter by contacts)

<GetAllCRMActivitiesWebsiteVisitsRequest>
    <Contacts>
        <Contact_id>12</Contact_id>
    </Contacts>
</GetAllCRMActivitiesWebsiteVisitsRequest>

<GetAllCRMActivitiesWebsiteVisitsRequest>
    <Contacts>
        <Contact_id>12</Contact_id>
        <Contact_id>13</Contact_id>
        <Contact_id>14</Contact_id>
    </Contacts>
</GetAllCRMActivitiesWebsiteVisitsRequest>

Example Request 5 (Pagination)

<GetAllCRMActivitiesWebsiteVisitsRequest page="0" chunk_size="50"></GetAllCRMActivitiesWebsiteVisitsRequest>

<GetAllCRMActivitiesWebsiteVisitsRequest page="1" chunk_size="50"></GetAllCRMActivitiesWebsiteVisitsRequest>

Example Request 6 (To filter by website visited datetime)

<GetAllCRMActivitiesWebsiteVisitsRequest start_date="2018-01-01 00:00:00"></GetAllCRMActivitiesWebsiteVisitsRequest>

<GetAllCRMActivitiesWebsiteVisitsRequest end_date="2018-01-31 00:00:00"></GetAllCRMActivitiesWebsiteVisitsRequest>

<GetAllCRMActivitiesWebsiteVisitsRequest start_date="2018-01-01 00:00:00" end_date="2018-01-31 00:00:00"></GetAllCRMActivitiesWebsiteVisitsRequest>

Successful Response

<GetAllCRMActivitiesWebsiteVisitsResponse>
    <Result>Success</Result>
    <AccountNum>38193</AccountNum>
    <WebsiteVisits>
        <WebsiteVisit>
            <Contact_id>123</Contact_id>
            <Contact_email>john.smith@gmail.com</Contact_email>
            <Datetime_visited>2016-02-19 07:07:00</Datetime_visited>
            <Page_visited>http://www.mysite.com/mylink1.html</Page_visited>
            <Points_for_visit></Points_for_visit>
            <Referrer>Manually added by Workflow A</Referrer>
        </WebsiteVisit>
        <WebsiteVisit>
            <Contact_id>123</Contact_id>
            <Contact_email>john.smith@gmail.com</Contact_email>
            <Datetime_visited>2016-04-10 03:07:00</Datetime_visited>
            <Page_visited>http://www.mysite.com/mylink2.html</Page_visited>
            <Points_for_visit></Points_for_visit>
            <Referrer>Manually added by Workflow A</Referrer>
        </WebsiteVisit>
        <WebsiteVisit>
            <Contact_id>623</Contact_id>
            <Contact_email>jane.smith@gmail.com</Contact_email>
            <Datetime_visited>2017-03-21 17:44:00</Datetime_visited>
            <Page_visited>http://www.mysite.com/mylink3.html</Page_visited>
            <Points_for_visit>1</Points_for_visit>
            <Referrer></Referrer>
        </WebsiteVisit>
        <WebsiteVisit>
            <Contact_id>623</Contact_id>
            <Contact_email>jane.smith@gmail.com</Contact_email>
            <Datetime_visited>2017-03-21 17:45:00</Datetime_visited>
            <Page_visited>http://www.mysite.com/mylink4.html</Page_visited>
            <Points_for_visit>1</Points_for_visit>
            <Referrer>wordpress.com</Referrer>
        </WebsiteVisit>
        <WebsiteVisit>
            <Contact_id>623</Contact_id>
            <Contact_email>jane.smith@gmail.com</Contact_email>
            <Datetime_visited>2017-03-21 17:45:00</Datetime_visited>
            <Page_visited>http://www.mysite.com/mylink5.html</Page_visited>
            <Points_for_visit>1</Points_for_visit>
            <Referrer></Referrer>
        </WebsiteVisit>
    </WebsiteVisits>
    <TotalWebsiteVisits>47</TotalWebsiteVisits>
</GetAllCRMActivitiesWebsiteVisitsResponse>

Add CRM Activities

This function allows the caller to add one or more CRM Activities. Passing a Workflow_id will activate the workflow if the CRM activity is marked as complete.

Input

Output

For each CRM Activity ID, success or failure.

Example Request

<AddCRMActivitiesRequest>
    <CRMActivities>
        <CRMActivity request_id="a1b2c3">
            <Contact_id>37</Contact_id>
            <Done_by_contact_id>39</Done_by_contact_id>
            <Group_id>3</Group_id>
            <Due_date>201109011100</Due_date>
            <Activity>Meeting</Activity>
            <Notes>Meet with George regarding contracts.</Notes>
            <Opportunity_id></Opportunity_id>
            <Completed_by_contact_id>0</Completed_by_contact_id>
            <Workflow_id>7</Workflow_id>
            <Send_reminder_hour_before_due>Y</Send_reminder_hour_before_due>
            <Send_reminder_24_hours_before_due>Y</Send_reminder_24_hours_before_due>
        </CRMActivity>
        <CRMActivity request_id="d4e5f6">
            <Contact_id>32</Contact_id>
            <Group_id>4</Group_id>
            <Activity>Phone Call</Activity>
            <Opportunity_id></Opportunity_id>
            <Completed_by_contact_id>0</Completed_by_contact_id>
        </CRMActivity>
    </CRMActivities>
</AddCRMActivitiesRequest>

Example Request (Shared Access)

<AddCRMActivitiesRequest>
    <CRMActivities>
        <CRMActivity account_id="91234">
            <Contact_id>37</Contact_id>
            <Done_by_contact_id>39</Done_by_contact_id>
            <Group_id>3</Group_id>
            <Due_date>201109011100</Due_date>
            <Activity>Meeting</Activity>
            <Notes>Meet with George regarding contracts.</Notes>
            <Send_reminder_hour_before_due>Y</Send_reminder_hour_before_due>
            <Send_reminder_24_hours_before_due>Y</Send_reminder_24_hours_before_due>
        </CRMActivity>
        <CRMActivity account_id="91234">
            <Contact_id>32</Contact_id>
            <Group_id>4</Group_id>
            <Activity>Phone Call</Activity>
        </CRMActivity>
    </CRMActivities>
</AddCRMActivitiesRequest>

Example Request (send email notification to assignee #39)

<AddCRMActivitiesRequest>
    <CRMActivities>
        <CRMActivity notify_assignee="true">
            <Contact_id>37</Contact_id>
            <Done_by_contact_id>39</Done_by_contact_id>
            <Group_id>3</Group_id>
            <Due_date>201109011100</Due_date>
            <Activity>Meeting</Activity>
            <Notes>Meet with George regarding contracts.</Notes>
            <Opportunity_id></Opportunity_id>
            <Completed_by_contact_id>0</Completed_by_contact_id>
            <Workflow_id>7</Workflow_id>
            <Send_reminder_hour_before_due>Y</Send_reminder_hour_before_due>
            <Send_reminder_24_hours_before_due>Y</Send_reminder_24_hours_before_due>
        </CRMActivity>
        <CRMActivity>
            <Contact_id>32</Contact_id>
            <Group_id>4</Group_id>
            <Activity>Phone Call</Activity>
            <Opportunity_id></Opportunity_id>
            <Completed_by_contact_id>0</Completed_by_contact_id>
        </CRMActivity>
    </CRMActivities>
</AddCRMActivitiesRequest>

Successful Response

<AddCRMActivitiesResponse>
    <CRMActivities>
        <CRMActivity request_id="a1b2c3">
            <Activity_id>21</Activity_id>
            <Result>Success</Result>
            <AccountNumber>91234</AccountNumber>
            <UpdatedTimeStamp>2012-08-30 14:24:09</UpdatedTimeStamp>
        </CRMActivity>
        <CRMActivity request_id="d4e5f6">
            <Activity_id>22</Activity_id>
            <Result>Success</Result>
            <AccountNumber>91234</AccountNumber>
            <UpdatedTimeStamp>2012-08-30 14:24:09</UpdatedTimeStamp>
        </CRMActivity>
    </CRMActivities>
</AddCRMActivitiesResponse>

Edit CRM Activities

This function allows the caller to modify one or more CRM activities already in the database. Search parameters should be specified inside the tag, while parameters to change to would be specified individually. Passing a Workflow_id will activate the workflow if the CRM activity is marked as complete.

Input

Specify search criteria within each CRMActivity tag. Each activity’s search criteria must return a single unique activity to modify.

Search criteria can be:

Parameters to change can include:

Output

For each CRM Activity ID, success or failure

Example Request

<EditCRMActivitiesRequest>
    <CRMActivities>
        <CRMActivity activity_id="47" request_id="a1b2c3">
            <Contact_id>33</Contact_id>
            <Done_by_contact_id>29</Done_by_contact_id>
            <Group_id>2</Group_id>
            <Done_date>201110210830</Done_date>
            <Due_date>201110231430</Due_date>
            <Activity>Meeting</Activity>
            <Notes>Meet with Jeff regarding next tasks.</Notes>
            <Opportunity_id></Opportunity_id>
            <Completed_by_contact_id>0</Completed_by_contact_id>
            <Workflow_id>7</Workflow_id>
            <Send_reminder_hour_before_due>Y</Send_reminder_hour_before_due>
            <Send_reminder_24_hours_before_due>Y</Send_reminder_24_hours_before_due>
        </CRMActivity>
        <CRMActivity contact_firstname="Joey" contact_lastname="Patrick" activity="Meeting" request_id="d4e5f6">
            <Activity>Phone Call</Activity>
        </CRMActivity>
    </CRMActivities>
</EditCRMActivitiesRequest>

Example Request (Shared Access)

<EditCRMActivitiesRequest>
    <CRMActivities>
        <CRMActivity activity_id="47" account_id="91234">
            <Contact_id>33</Contact_id>
            <Done_by_contact_id>29</Done_by_contact_id>
            <Group_id>2</Group_id>
            <Done_date>201110210830</Done_date>
            <Due_date>201110231430</Due_date>
            <Activity>Meeting</Activity>
            <Notes>Meet with Jeff regarding next tasks.</Notes>
        </CRMActivity>
        <CRMActivity contact_firstname="Joey" contact_lastname="Patrick" activity="Meeting" account_id="91234">
            <Activity>Phone Call</Activity>
        </CRMActivity>
    </CRMActivities>
</EditCRMActivitiesRequest>

Successful Response

<EditCRMActivitiesResponse>
    <CRMActivities>
        <CRMActivity request_id="a1b2c3">
            <Activity_id>47</Activity_id>
            <Result>Success</Result>
            <AccountNumber>91234</AccountNumber>
            <UpdatedTimeStamp>2012-08-30 14:24:09</UpdatedTimeStamp>
        </CRMActivity>
        <CRMActivity request_id="d4e5f6">
            <Activity_id>28</Activity_id>
            <Result>Success</Result>
            <AccountNumber>91234</AccountNumber>
            <UpdatedTimeStamp>2012-08-30 14:24:09</UpdatedTimeStamp>
        </CRMActivity>
    </CRMActivities>
</EditCRMActivitiesResponse>

Delete CRM Activities

This function allows the caller to delete one or more CRM Activities from the database.

Input

Specify search criteria within each CRMActivity tag. Search criteria can be:

Each activity’s search criteria must return a single unique activity to delete.

Output

For each CRM Activity ID, success or failure.

Example Request

<DeleteCRMActivitiesRequest>
    <CRMActivities>
        <CRMActivity activity_id="45" request_id="a1b2c3" />
        <CRMActivity activity_id="25" request_id="d4e5f6" />
    </CRMActivities>
</DeleteCRMActivitiesRequest>

Successful Response

<DeleteCRMActivitiesResponse>
    <CRMActivities>
        <CRMActivity request_id="a1b2c3">
            <Activity_id>45</Activity_id>
            <Result>Success</Result>
        </CRMActivity>
        <CRMActivity request_id="d4e5f6">
            <Activity_id>25</Activity_id>
            <Result>Success</Result>
        </CRMActivity>
    </CRMActivities>
</DeleteCRMActivitiesResponse>

Get CRM Activity Types

This function allows the caller to retrieve valid CRM Activity Types for an account.

Input

Account ID (optional - required for shared access. If missing, will be account owned by the user). Pass get_all=true to get CRM Activity Types for all accounts for which the user has contacts permissions.

Output

Success or failure. On success, a list of valid CRM Activity Types for the account.

Example Request 1

<GetCRMActivityTypesRequest></GetCRMActivityTypesRequest>

Example Request 2 (shared access)

<GetCRMActivityTypesRequest account_id="1392"></GetCRMActivityTypesRequest>

Example Request 2 (get all)

<GetCRMActivityTypesRequest get_all="true"></GetCRMActivityTypesRequest>

Successful Response

<GetCRMActivityTypesResponse>
    <Result>Success</Result>
    <CRMActivityTypes>
        <CRMActivityType>
            <AccountNumber>1392</AccountNumber>
            <Label>Make Note</Label>
        </CRMActivityType>
        <CRMActivityType>
            <AccountNumber>1392</AccountNumber>
            <Label>Phone Call</Label>
        </CRMActivityType>
        <CRMActivityType>
            <AccountNumber>1392</AccountNumber>
            <Label>Left Message</Label>
        </CRMActivityType>
        <CRMActivityType>
            <AccountNumber>1392</AccountNumber>
            <Label>Sent SMS</Label>
        </CRMActivityType>
        <CRMActivityType>
            <AccountNumber>1392</AccountNumber>
            <Label>Meeting</Label>
        </CRMActivityType>
        <CRMActivityType>
            <AccountNumber>1392</AccountNumber>
            <Label>Received Email</Label>
        </CRMActivityType>
    </CRMActivityTypes>
</GetCRMActivityTypesResponse>

Edit CRM Activity Types

This function allows the caller to edit the current existing CRM Activity Types by adding new activity types or replacing the whole existing copy.

When replace="true" argument is passed, the existing list of activity types will be fully replaced.

When replace="false" argument is passed or absent, the new <CRMActivityTypes> will be added to the end of the activity types list instead.

To reorder the activity types list, fetch the existing activity types list using the GetCRMActivityTypesRequest API and order accordingly, then submit the new order with EditCRMActivityTypesRequest plus the replace="true" argument.

When an activity type is removed, it does not change existing CRM activities. Those remain as their original activity type.

Only account owner has permission to edit the activity types of the account.

Input

Output

Success or failure. Account number.

Example Request (add new activity types to the end of the current existing list)

<EditCRMActivityTypesRequest>
    <CRMActivityTypes>
        <CRMActivityType>
            <Label>New Activity A</Label>
        </CRMActivityType>
        <CRMActivityType>
            <Label>New Activity B</Label>
        </CRMActivityType>
    </CRMActivityTypes>
</EditCRMActivityTypesRequest>

Example Request (fully replace existing activity types)

<EditCRMActivityTypesRequest replace="true">
    <CRMActivityTypes>
        <CRMActivityType>
            <Label>Make Note</Label>
        </CRMActivityType>
        <CRMActivityType>
            <Label>Phone Call</Label>
        </CRMActivityType>
        <CRMActivityType>
            <Label>Left Message</Label>
        </CRMActivityType>
        <CRMActivityType>
            <Label>Sent SMS</Label>
        </CRMActivityType>
        <CRMActivityType>
            <Label>Meeting</Label>
        </CRMActivityType>
        <CRMActivityType>
            <Label>Received Email</Label>
        </CRMActivityType>
        <CRMActivityType>
            <Label>Sent Email</Label>
        </CRMActivityType>
        <CRMActivityType>
            <Label>Sent Mail</Label>
        </CRMActivityType>
        <CRMActivityType>
            <Label>Signup Form</Label>
        </CRMActivityType>
        <CRMActivityType>
            <Label>Follow-Up</Label>
        </CRMActivityType>
        <CRMActivityType>
            <Label>Presentation</Label>
        </CRMActivityType>
    </CRMActivityTypes>
</EditCRMActivityTypesRequest>

Successful Response

<EditCRMActivityTypesResponse>
    <Result>Success</Result>
    <AccountNumber>3819</AccountNumber>
</EditCRMActivityTypesResponse>

Get CRM Assignables

This function allows the caller to retrieve a list of contacts assignable to a contact’s CRM Activities.

Input

Output

Success or failure. On success, a list of contacts assignable.

Example Request

<GetCRMAssignablesRequest contact_id="123"></GetCRMAssignablesRequest>

Successful Response

<GetCRMAssignablesResponse>
    <Result>Success</Result>
    <AssignableContacts>
        <AssignableContact>
            <ContactID>0</ContactID>
            <Name>Todd Wade</Name>
            <Email></Email>
        </AssignableContact>
    </AssignableContacts>
</GetCRMAssignablesResponse>