Spec - Opportunities

Table Of Contents

Get Opportunities

This function allows the caller to retrieve a contact’s opportunities from the database.

Search parameters should be specified inside the tag.

Contacts permission is required for shared access users.

phase_id is a unique ID assigned to that particular phase. It is NOT the phase number, which is used to organize phases into a sequence. You can find both when you log into your SalesDrip account and go to Settings - Opportunity Settings.

Input

Output

Success or failure. A list of opportunities.

Example Request

<GetOpportunitiesRequest contact_id="123"></GetOpportunitiesRequest>

Example Request

<GetOpportunitiesRequest contact_id="123" get_all="true" show_assignables="true"></GetOpportunitiesRequest>

Example Request

<GetOpportunitiesRequest contact_id="123" close_date_start="20150101" close_date_end="20150131"></GetOpportunitiesRequest>

Example Request

<GetOpportunitiesRequest opportunity_id="13"></GetOpportunitiesRequest>

Example Request

<GetOpportunitiesRequest group_id="4" company_id="123"></GetOpportunitiesRequest>

Example Request

<GetOpportunitiesRequest contact_id="123" show_associated="true"></GetOpportunitiesRequest>

Example Request (filter by phase_path_id)

<GetOpportunitiesRequest contact_id="123" phase_path_id="5"></GetOpportunitiesRequest>

Example Request (filter by managed_by_contact_id)

<GetOpportunitiesRequest managed_by_contact_id="0"></GetOpportunitiesRequest>

Example Request (filter only the opportunities that are closed (Closed - Deal Won and Closed - Deal Lost))

<GetOpportunitiesRequest phase="closed"></GetOpportunitiesRequest>

Example Request (shared access)

<GetOpportunitiesRequest contact_id="123" account_id="12345"></GetOpportunitiesRequest>

Successful Response

<GetOpportunitiesResponse>
    <Result>Success</Result>
    <Opportunities>
        <Opportunity>
            <OpportunityID>8</OpportunityID>
            <Title>test</Title>
            <AssignedToContactID>123</AssignedToContactID>
            <AssignedToCompanyID>13</AssignedToCompanyID>
            <AssignedToFirstname>Testfirst1 &amp; and " '</AssignedToFirstname>
            <AssignedToLastname>Test1 &amp; 2</AssignedToLastname>
            <AssignedToEmail>contact+test1@gmail.com</AssignedToEmail>
            <ManagedByContactID>0</ManagedByContactID>
            <Firstname></Firstname>
            <Lastname></Lastname>
            <Email></Email>
            <SourceID>4</SourceID>
            <Source>Networking</Source>
            <PhaseID>4</PhaseID>
            <Phase>Proposal</Phase>
            <PhaseNumber>4</PhaseNumber>
            <PhasePathID>2</PhasePathID>
            <PhasePathName>Sales Pipeline</PhasePathName>
            <WarningDays>10</WarningDays>
            <AssociatedContacts>
                <AssociatedContact>
                    <ContactID>7</ContactID>
                    <Firstname>Bob</Firstname>
                    <Lastname>Associated</Lastname>
                    <Email>associated@contact.com</Email>
                    <Notes>A note</Notes>
                </AssociatedContact>
            </AssociatedContacts>
            <CustomFields>
                <CustomField>
                    <CustomFieldID>1</CustomFieldID>
                    <FieldName>My Custom Field</FieldName>
                    <FieldValue>yellow</FieldValue>
                </CustomField>
            </CustomFields>
            <Products>
                <Product>
                    <ProductID>1</ProductID>
                    <Product>Sample Product</Product>
                    <ProductNotes></ProductNotes>
                    <ProductValue>0.00</ProductValue>
                    <DefaultValue></DefaultValue>
                </Product>
                <Product>
                    <ProductID>2</ProductID>
                    <Product>Sample Service</Product>
                    <ProductNotes>good test</ProductNotes>
                    <ProductValue>100.00</ProductValue>
                    <DefaultValue></DefaultValue>
                </Product>
            </Products>
            <Quality>A</Quality>
            <OpportunityCurrency>USD</OpportunityCurrency>
            <OpportunityValue>0.00</OpportunityValue>
            <OpportunityProfit>0.00</OpportunityProfit>
            <PercentWin>10</PercentWin>
            <InvoiceID></InvoiceID>
            <CloseDate>20150124</CloseDate>
            <Notes>The quick brown fox jumps over the lazy dog.</Notes>
        </Opportunity>
    </Opportunities>
</GetOpportunitiesResponse>

Add Opportunities

This function allows the caller to add one or more opportunities for a contact.

Contacts permission is required for shared access users.

If an opportunity phase is paired with a workflow, the specified workflow will be activated.

Input

Output

Success or failure for each opportunities. List of opportunities.

Example Request

<AddOpportunitiesRequest>
    <Opportunities>
        <Opportunity request_id="a1b2c3">
            <Title>Test</Title>
            <ContactID>123</ContactID>
            <ManagedByContactID>0</ManagedByContactID>
            <Quality>A</Quality>
            <SourceID>1</SourceID>
            <PhaseID>1</PhaseID>
            <OpportunityValue>5.12</OpportunityValue>
            <OpportunityProfit>12.34</OpportunityProfit>
            <PercentWin>10</PercentWin>
            <CloseDate>20150414</CloseDate>
            <AssociatedContacts>
                <AssociatedContact>
                    <ContactID>7</ContactID>
                    <Notes>A note</Notes>
                </AssociatedContact>
            </AssociatedContacts>
            <CustomFields>
                <CustomField fieldnum=\"1\">b</CustomField>
                <CustomField fieldname=\"My Custom Field\">c</CustomField>
            </CustomFields>
            <Products>
                <Product>
                    <ProductID>2</ProductID>
                    <ProductNotes>Sample product notes</ProductNotes>
                    <ProductValue>3</ProductValue>
                </Product>
            </Products>
            <Notes>The quick brown fox jumps over the lazy dog.</Notes>
        </Opportunity>
    </Opportunities>
</AddOpportunitiesRequest>

Example Request (lookup source/phase/product by title)

<AddOpportunitiesRequest>
    <Opportunities>
        <Opportunity>
            <Title>Test</Title>
            <ContactID>123</ContactID>
            <ManagedByContactID>0</ManagedByContactID>
            <Quality>A</Quality>
            <Source>Networking</Source>
            <Phase>New Lead</Phase>
            <PhasePath>Path A</PhasePath>
            <OpportunityCurrency>GBP</OpportunityCurrency>
            <OpportunityValue>5.12</OpportunityValue>
            <OpportunityProfit>12.34</OpportunityProfit>
            <PercentWin>10</PercentWin>
            <CloseDate>20150414</CloseDate>
            <AssociatedContacts>
                <AssociatedContact>
                    <ContactID>7</ContactID>
                    <Notes>A note</Notes>
                </AssociatedContact>
            </AssociatedContacts>
            <CustomFields>
                <CustomField fieldnum=\"1\">b</CustomField>
                <CustomField fieldname=\"My Custom Field\">c</CustomField>
            </CustomFields>
            <Products>
                <Product>
                    <Title>Sample Product</Title>
                    <ProductNotes>Sample product notes</ProductNotes>
                    <ProductValue>3</ProductValue>
                </Product>
            </Products>
            <Notes>The quick brown fox jumps over the lazy dog.</Notes>
        </Opportunity>
    </Opportunities>
</AddOpportunitiesRequest>

Example Request (shared access)

<AddOpportunitiesRequest>
    <Opportunities>
        <Opportunity account_id="12345">
            <Title>Test</Title>
            <ContactID>123</ContactID>
            <ManagedByContactID>0</ManagedByContactID>
            <Quality>A</Quality>
            <Source>Networking</Source>
            <PhaseNumber>1</PhaseNumber>
            <PhasePath>Path A</PhasePath>
            <OpportunityCurrency>GBP</OpportunityCurrency>
            <OpportunityValue>5.12</OpportunityValue>
            <OpportunityProfit>12.34</OpportunityProfit>
            <PercentWin>10</PercentWin>
            <CloseDate>20150414</CloseDate>
            <AssociatedContacts>
                <AssociatedContact>
                    <ContactID>7</ContactID>
                    <Notes>A note</Notes>
                </AssociatedContact>
            </AssociatedContacts>
            <CustomFields>
                <CustomField fieldnum=\"1\">b</CustomField>
                <CustomField fieldname=\"My Custom Field\">c</CustomField>
            </CustomFields>
            <Products>
                <Product>
                    <Title>Sample Product</Title>
                    <ProductNotes>Sample product notes</ProductNotes>
                    <ProductValue>3</ProductValue>
                </Product>
            </Products>
            <Notes>The quick brown fox jumps over the lazy dog.</Notes>
        </Opportunity>
    </Opportunities>
</AddOpportunitiesRequest>

Successful Response

<AddOpportunitiesResponse>
    <Opportunities>
        <Opportunity request_id="a1b2c3">
            <Result>Success</Result>
            <OpportunityID>22</OpportunityID>
            <Title>Test</Title>
            <ManagedByContactID>0</ManagedByContactID>
            <Quality>A</Quality>
            <SourceID>1</SourceID>
            <PhaseID>1</PhaseID>
            <PhasePathID>2</PhasePathID>
            <OpportunityCurrency>USD</OpportunityCurrency>
            <OpportunityValue>5.12</OpportunityValue>
            <OpportunityProfit>12.34</OpportunityProfit>
            <PercentWin>10</PercentWin>
            <CloseDate>20150414</CloseDate>
            <AssociatedContacts>
                <AssociatedContact>
                    <ContactID>7</ContactID>
                    <Notes>A note</Notes>
                </AssociatedContact>
            </AssociatedContacts>
            <CustomFields>
                <CustomField>
                    <CustomFieldID>1</CustomFieldID>
                    <FieldName>My Custom Field</FieldName>
                    <FieldValue>b</FieldValue>
                </CustomField>
                <CustomField>
                    <CustomFieldID>1</CustomFieldID>
                    <FieldName>My Custom Field</FieldName>
                    <FieldValue>c</FieldValue>
                </CustomField>
            </CustomFields>
            <Products>
                <Product>
                    <ProductID>2</ProductID>
                    <ProductNotes></ProductNotes>
                    <ProductValue></ProductValue>
                </Product>
            </Products>
        </Opportunity>
    </Opportunities>
</AddOpportunitiesResponse>

Edit Opportunities

This function allows the caller to modify one or more opportunities already in the database.

Search parameters should be specified inside the tag, while parameters to change to would be specified individually.

If no Products or CustomFields tags are passed, any pre-existing opportunity product and custom field data is left in place. If empty AssociatedContacts, Products or CustomFields tags are passed, pre-existing opportunity associated contact, product and custom field data is removed. If new associated contacts, products or customfields are passed any existing ones will be removed and replaced with the new ones.

Contacts permission is required for shared access users.

If an opportunity phase is paired with a workflow, the specified workflow will be activated.

Input

Output

Success or failure for each opportunities. List of opportunities.

Example Request

<EditOpportunitiesRequest>
    <Opportunities>
        <Opportunity opportunity_id="20" request_id="a1b2c3">
            <Title>Test</Title>
            <ManagedByContactID>0</ManagedByContactID>
            <Quality>A</Quality>
            <SourceID>1</SourceID>
            <PhaseID>1</PhaseID>
            <PhasePathID>1</PhasePathID>
            <OpportunityValue>5.12</OpportunityValue>
            <OpportunityProfit>12.34</OpportunityProfit>
            <PercentWin>10</PercentWin>
            <CloseDate>20150414</CloseDate>
            <AssociatedContacts>
                <AssociatedContact>
                    <ContactID>7</ContactID>
                    <Notes>B note</Notes>
                </AssociatedContact>
            </AssociatedContacts>
            <CustomFields>
                <CustomField fieldnum=\"1\">b</CustomField>
                <CustomField fieldname=\"My Custom Field\">c</CustomField>
            </CustomFields>
            <Products>
                <Product>
                    <ProductID>2</ProductID>
                    <ProductNotes>edited sample product notes</ProductNotes>
                    <ProductValue>4</ProductValue>
                </Product>
            </Products>
            <Notes>The quick brown fox jumps over the lazy dog.</Notes>
        </Opportunity>
    </Opportunities>
</EditOpportunitiesRequest>

Example Request (lookup source/phase/product by title)

<EditOpportunitiesRequest>
    <Opportunities>
        <Opportunity opportunity_id="20">
            <Title>Test</Title>
            <ManagedByContactID>0</ManagedByContactID>
            <Quality>A</Quality>
            <Source>Networking</Source>
            <Phase>New Lead</Phase>
            <PhasePath>Path 1</PhasePath>
            <OpportunityValue>5.12</OpportunityValue>
            <OpportunityProfit>12.34</OpportunityProfit>
            <PercentWin>10</PercentWin>
            <CloseDate>20150414</CloseDate>
            <AssociatedContacts>
                <AssociatedContact>
                    <ContactID>7</ContactID>
                    <Notes>B note</Notes>
                </AssociatedContact>
            </AssociatedContacts>
            <CustomFields>
                <CustomField fieldnum=\"1\">b</CustomField>
                <CustomField fieldname=\"My Custom Field\">c</CustomField>
            </CustomFields>
            <Products>
                <Product>
                    <Title>Sample Product</Title>
                    <ProductNotes>edited sample product notes</ProductNotes>
                    <ProductValue>4</ProductValue>
                </Product>
            </Products>
            <Notes>The quick brown fox jumps over the lazy dog.</Notes>
        </Opportunity>
    </Opportunities>
</EditOpportunitiesRequest>

Example Request (shared access)

<EditOpportunitiesRequest>
    <Opportunities>
        <Opportunity opportunity_id="20" account_id="12345">
            <Title>Test</Title>
            <ManagedByContactID>0</ManagedByContactID>
            <Quality>A</Quality>
            <Source>Networking</Source>
            <PhaseNumber>1</PhaseNumber>
            <PhasePathID>1</PhasePathID>
            <OpportunityValue>5.12</OpportunityValue>
            <OpportunityProfit>12.34</OpportunityProfit>
            <PercentWin>10</PercentWin>
            <CloseDate>20150414</CloseDate>
            <AssociatedContacts>
                <AssociatedContact>
                    <ContactID>7</ContactID>
                    <Notes>B note</Notes>
                </AssociatedContact>
            </AssociatedContacts>
            <CustomFields>
                <CustomField fieldnum=\"1\">b</CustomField>
                <CustomField fieldname=\"My Custom Field\">c</CustomField>
            </CustomFields>
            <Products>
                <Product>
                    <Title>Sample Product</Title>
                    <ProductNotes>edited sample product notes</ProductNotes>
                    <ProductValue>4</ProductValue>
                </Product>
            </Products>
            <Notes>The quick brown fox jumps over the lazy dog.</Notes>
        </Opportunity>
    </Opportunities>
</EditOpportunitiesRequest>

Example Response

<EditOpportunitiesResponse>
    <Opportunities>
        <Opportunity request_id="a1b2c3">
            <Result>Success</Result>
            <OpportunityID>22</OpportunityID>
            <Title>Test</Title>
            <ManagedByContactID>0</ManagedByContactID>
            <Quality>A</Quality>
            <SourceID>1</SourceID>
            <PhaseID>1</PhaseID>
            <PhasePathID>1</PhasePathID>
            <OpportunityValue>5.12</OpportunityValue>
            <OpportunityProfit>12.34</OpportunityProfit>
            <PercentWin>10</PercentWin>
            <CloseDate>20150414</CloseDate>
            <AssociatedContacts>
                <AssociatedContact>
                    <ContactID>7</ContactID>
                    <Notes>B note</Notes>
                </AssociatedContact>
            </AssociatedContacts>
            <CustomFields>
                <CustomField>
                    <CustomFieldID>1</CustomFieldID>
                    <FieldName>My Custom Field</FieldName>
                    <FieldValue>b</FieldValue>
                </CustomField>
                <CustomField>
                    <CustomFieldID>1</CustomFieldID>
                    <FieldName>My Custom Field</FieldName>
                    <FieldValue>c</FieldValue>
                </CustomField>
            </CustomFields>
            <Products>
                <Product>
                    <ProductID>2</ProductID>
                    <ProductNotes>edited sample product notes</ProductNotes>
                    <ProductValue>4</ProductValue>
                </Product>
            </Products>
        </Opportunity>
    </Opportunities>
</EditOpportunitiesResponse>

Delete Opportunities

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

Search parameters should be specified inside the tag.

Contacts permission is required for shared access users.

Input

Output

Success or failure for each opportunities. List of opportunities.

Example Request

<DeleteOpportunitiesRequest>
    <Opportunities>
        <Opportunity opportunity_id="20" request_id="a1b2c3"/>
    </Opportunities>
</DeleteOpportunitiesRequest>

Example Response

<DeleteOpportunitiesResponse>
    <Opportunities>
        <Opportunity request_id="a1b2c3">
            <Result>Success</Result>
            <OpportunityID>22</OpportunityID>
        </Opportunity>
    </Opportunities>
</DeleteOpportunitiesResponse>

Get Sources

This function allows the caller to retrieve a contact’s opportunity sources from the database.

Search parameters should be specified inside the tag.

Contacts permission is required for shared access users.

Input

Output

Success or failure. A list of sources.

Example Request

<GetSourcesRequest></GetSourcesRequest>

Example Request

<GetSourcesRequest source_id="1"></GetSourcesRequest>

Example Request

<GetSourcesRequest source_title="Networking"></GetSourcesRequest>

Example Request (shared access)

<GetSourcesRequest account_id="12345"></GetSourcesRequest>

Successful Response

<GetSourcesResponse>
    <Result>Success</Result>
    <Sources>
        <Source>
            <SourceID>5</SourceID>
            <Title>Cold Call</Title>
        </Source>
        <Source>
            <SourceID>2</SourceID>
            <Title>Internet Search</Title>
        </Source>
        <Source>
            <SourceID>4</SourceID>
            <Title>Networking</Title>
        </Source>
        <Source>
            <SourceID>1</SourceID>
            <Title>Referral</Title>
        </Source>
        <Source>
            <SourceID>3</SourceID>
            <Title>Social Network</Title>
        </Source>
        <Source>
            <SourceID>7</SourceID>
            <Title>Test Source</Title>
        </Source>
        <Source>
            <SourceID>12</SourceID>
            <Title>tttt</Title>
        </Source>
    </Sources>
</GetSourcesResponse>

Add Sources

This function allows the caller to add one or more opportunity sources.

Contacts permission is required for shared access users.

Input

Output

Success or failure for each sources. List of sources.

Example Request

<AddSourcesRequest>
    <Sources>
        <Source request_id="a1b2c3">
            <Title>Sample Title</Title>
        </Source>
    </Sources>
</AddSourcesRequest>

Successful Response

<AddSourcesResponse>
    <Sources>
        <Source request_id="a1b2c3">
            <Result>Success</Result>
            <SourceID>15</SourceID>
            <Title>Sample Title</Title>
        </Source>
    </Sources>
</AddSourcesResponse>

Edit Sources

This function allows the caller to modify one or more opportunity sources already in the database.

Search parameters should be specified inside the tag, while parameters to change to would be specified individually.

Contacts permission is required for shared access users.

Input

Output

Success or failure for each sources. List of sources.

Example Request

<EditSourcesRequest>
    <Sources>
        <Source source_id="12" request_id="a1b2c3">
            <Title>Edited Sample Title</Title>
        </Source>
    </Sources>
</EditSourcesRequest>

Example Response

<EditSourcesResponse>
    <Sources>
        <Source request_id="a1b2c3">
            <Result>Success</Result>
            <SourceID>12</SourceID>
            <Title>Edited Sample Title</Title>
        </Source>
    </Sources>
</EditSourcesResponse>

Delete Sources

This function allows the caller to delete one or more opportunity sources from the database.

Search parameters should be specified inside the tag.

Contacts permission is required for shared access users.

Input

Output

Success or failure for each sources. List of sources.

Example Request

<DeleteSourcesRequest>
    <Sources>
        <Source source_id="12" request_id="a1b2c3"/>
    </Sources>
</DeleteSourcesRequest>

Example Response

<DeleteSourcesResponse>
    <Sources>
        <Source request_id="a1b2c3">
            <Result>Success</Result>
            <SourceID>12</SourceID>
        </Source>
    </Sources>
</DeleteSourcesResponse>

Get Phases

This function allows the caller to retrieve a contact’s opportunity phases from the database.

Search parameters should be specified inside the tag.

Contacts permission is required for shared access users.

Input

Output

Success or failure. A list of phases.

Example Request

<GetPhasesRequest></GetPhasesRequest>

Example Request

<GetPhasesRequest phase_id="1"></GetPhasesRequest>

Example Request

<GetPhasesRequest phase_title="New Lead"></GetPhasesRequest>

Example Request

<GetPhasesRequest phase_number="1"></GetPhasesRequest>

Example Request (shared access)

<GetPhasesRequest account_id="12345"></GetPhasesRequest>

Successful Response

<GetPhasesResponse>
    <Result>Success</Result>
    <Phases>
        <Phase>
            <PhaseID>1</PhaseID>
            <Title>New Lead</Title>
            <PhaseNumber>1</PhaseNumber>
            <WarningDays>5</WarningDays>
        </Phase>
        <Phase>
            <PhaseID>2</PhaseID>
            <Title>Qualified Lead</Title>
            <PhaseNumber>2</PhaseNumber>
            <WarningDays>5</WarningDays>
        </Phase>
        <Phase>
            <PhaseID>3</PhaseID>
            <Title>Prospect</Title>
            <PhaseNumber>3</PhaseNumber>
            <WarningDays>5</WarningDays>
        </Phase>
        <Phase>
            <PhaseID>4</PhaseID>
            <Title>Proposal</Title>
            <PhaseNumber>4</PhaseNumber>
            <WarningDays>10</WarningDays>
        </Phase>
        <Phase>
            <PhaseID>5</PhaseID>
            <Title>Proposal Evaluation</Title>
            <PhaseNumber>5</PhaseNumber>
            <WarningDays>10</WarningDays>
        </Phase>
        <Phase>
            <PhaseID>6</PhaseID>
            <Title>Closed - Deal Lost</Title>
            <PhaseNumber>6</PhaseNumber>
            <WarningDays>0</WarningDays>
        </Phase>
        <Phase>
            <PhaseID>7</PhaseID>
            <Title>Closed - Deal Won</Title>
            <PhaseNumber>7</PhaseNumber>
            <WarningDays>0</WarningDays>
        </Phase>
        <Phase>
            <PhaseID>9</PhaseID>
            <Title>Test</Title>
            <PhaseNumber>8</PhaseNumber>
            <WarningDays>2</WarningDays>
        </Phase>
    </Phases>
</GetPhasesResponse>

Add Phases

This function allows the caller to add one or more opportunity phases.

Contacts permission is required for shared access users.

Input

Output

Success or failure for each phases. List of phases.

Example Request

<AddPhasesRequest>
    <Phases>
        <Phase request_id="a1b2c3">
            <Title>Sample</Title>
            <WarningDays>1</WarningDays>
        </Phase>
    </Phases>
</AddPhasesRequest>

Successful Response

<AddPhasesResponse>
    <Phases>
        <Phase request_id="a1b2c3">
            <Result>Success</Result>
            <PhaseID>18</PhaseID>
            <Title>Sample</Title>
            <WarningDays>1</WarningDays>
        </Phase>
    </Phases>
</AddPhasesResponse>

Edit Phases

This function allows the caller to modify one or more opportunity phases already in the database.

Search parameters should be specified inside the tag, while parameters to change to would be specified individually.

Contacts permission is required for shared access users.

Input

Output

Success or failure for each phases. List of phases.

Example Request

<EditPhasesRequest>
    <Phases>
        <Phase phase_id="17" request_id="a1b2c3">
            <Title>Edited Sample</Title>
            <WarningDays>1</WarningDays>
            <PhaseNumber>9</PhaseNumber>
        </Phase>
    </Phases>
</EditPhasesRequest>

Example Response

<EditPhasesResponse>
    <Phases>
        <Phase request_id="a1b2c3">
            <Result>Success</Result>
            <PhaseID>17</PhaseID>
            <Title>Edited Sample</Title>
            <PhaseNumber>9</PhaseNumber>
            <WarningDays>1</WarningDays>
        </Phase>
    </Phases>
</EditPhasesResponse>

Delete Phases

This function allows the caller to delete one or more opportunity phases from the database.

Search parameters should be specified inside the tag.

Contacts permission is required for shared access users.

Input

Output

Success or failure for each phases. List of phases.

Example Request

<DeletePhasesRequest>
    <Phases>
        <Phase phase_id="17" request_id="a1b2c3"/>
    </Phases>
</DeletePhasesRequest>

Example Response

<DeletePhasesResponse>
    <Phases>
        <Phase request_id="a1b2c3">
            <Result>Success</Result>
            <PhaseID>17</PhaseID>
        </Phase>
    </Phases>
</DeletePhasesResponse>

Get Phase Paths

This function allows the caller to retrieve the opportunity phase paths from the database.

Contacts permission is required for shared access users.

Input

Output

Success or failure. A list of phase paths.

Example Request

<GetPhasePathsRequest></GetPhasePathsRequest>

Example Request (shared access)

<GetPhasePathsRequest account_id="12345"></GetPhasePathsRequest>

Successful Response

<GetPhasePathsResponse>
    <PhasePaths>
        <PhasePath>
            <PhasePathID>1</PhasePathID>
            <PhasePathName>Phase 1</PhasePathName>
            <Phases>
                <Phase>
                    <PhaseID>1</PhaseID>
                    <Title>New Lead</Title>
                </Phase>
                <Phase>
                    <PhaseID>6</PhaseID>
                    <Title>Closed - Deal Lost</Title>
                </Phase>
                <Phase>
                    <PhaseID>7</PhaseID>
                    <Title>Closed - Deal Won</Title>
                </Phase>
            </Phases>
        </PhasePath>
    </PhasePaths>
</GetPhasePathsResponse>

Get Products

This function allows the caller to retrieve a contact’s opportunity products from the database.

Search parameters should be specified inside the tag.

Contacts permission is required for shared access users.

Input

Output

Success or failure. A list of products.

Example Request

<GetProductsRequest></GetProductsRequest>

Example Request

<GetProductsRequest product_id="1"></GetProductsRequest>

Example Request

<GetProductsRequest product_title="Sample Product"></GetProductsRequest>

Example Request (shared access)

<GetProductsRequest account_id="12345"></GetProductsRequest>

Successful Response

<GetProductsResponse>
    <Result>Success</Result>
    <Products>
        <Product>
            <ProductID>1</ProductID>
            <Title>Sample Product</Title>
            <DefaultValue></DefaultValue>
        </Product>
        <Product>
            <ProductID>2</ProductID>
            <Title>Sample Service</Title>
            <DefaultValue></DefaultValue>
        </Product>
        <Product>
            <ProductID>3</ProductID>
            <Title>Test New Product</Title>
            <DefaultValue></DefaultValue>
        </Product>
    </Products>
</GetProductsResponse>

Add Products

This function allows the caller to add one or more opportunity products.

Contacts permission is required for shared access users.

Input

Output

Success or failure for each products. List of products.

Example Request

<AddProductsRequest>
    <Products>
        <Product request_id="a1b2c3">
            <Title>Sample</Title>
            <DefaultValue>1</DefaultValue>
        </Product>
    </Products>
</AddProductsRequest>

Successful Response

<AddProductsResponse>
    <Products>
        <Product request_id="a1b2c3">
            <Result>Success</Result>
            <ProductID>13</ProductID>
            <Title>Sample</Title>
            <DefaultValue>1</DefaultValue>
        </Product>
    </Products>
</AddProductsResponse>

Edit Products

This function allows the caller to modify one or more opportunity products already in the database.

Search parameters should be specified inside the tag, while parameters to change to would be specified individually.

Contacts permission is required for shared access users.

Input

Output

Success or failure for each products. List of products.

Example Request

<EditProductsRequest>
    <Products>
        <Product product_id="13" request_id="a1b2c3">
            <Title>Edited Sample</Title>
            <DefaultValue>2</DefaultValue>
        </Product>
    </Products>
</EditProductsRequest>

Example Response

<EditProductsResponse>
    <Products>
        <Product request_id="a1b2c3">
            <Result>Success</Result>
            <ProductID>13</ProductID>
            <Title>Edited Sample</Title>
            <DefaultValue>2</DefaultValue>
        </Product>
    </Products>
</EditProductsResponse>

Delete Products

This function allows the caller to delete one or more opportunity products from the database.

Search parameters should be specified inside the tag.

Contacts permission is required for shared access users.

Input

Output

Success or failure for each products. List of products.

Example Request

<DeleteProductsRequest>
    <Products>
        <Product product_id="13" request_id="a1b2c3"/>
    </Products>
</DeleteProductsRequest>

Example Response

<DeleteProductsResponse>
    <Products>
        <Product request_id="a1b2c3">
            <Result>Success</Result>
            <ProductID>13</ProductID>
        </Product>
    </Products>
</DeleteProductsResponse>

Get Custom Fields

This function allows the caller to fetch opportunity custom fields for an account.

Contacts permission is required for shared access users.

Input

Output

Success or failure. A list of custom fields.

Example Request

<GetOpportunityFieldsRequest></GetOpportunityFieldsRequest>

Example Request

<GetOpportunityFieldsRequest account_id="1392"></GetOpportunityFieldsRequest>

Successful Response

<GetOpportunityFieldsResponse>
    <Result>Success</Result>
    <CustomFields>
        <CustomField>
            <PhasePathID>2</PhasePathID>
            <CustomFieldID>93</CustomFieldID>
            <FieldName>Favorite Animal</FieldName>
            <FieldType>Checkbox</FieldType>
            <PossibleValues>Dog,Cat,Monkey</PossibleValues>
            <RequiredField>N</RequiredField>
            <LastModified>2012-12-06 10:52:17</LastModified>
        </CustomField>
        <CustomField>
            <PhasePathID>5</PhasePathID>
            <CustomFieldID>154</CustomFieldID>
            <FieldName>Fruits</FieldName>
            <FieldType>Select</FieldType>
            <PossibleValues>Apple,Orange,Banana</PossibleValues>
            <RequiredField>Y</RequiredField>
            <LastModified>2012-12-06 14:59:29</LastModified>
        </CustomField>
    </CustomFields>
</GetOpportunityFieldsResponse>

Add Custom Fields

This function allows the caller to add a custom field for opportunities, for specific phase paths or for all phase paths.

Contacts permission is required for shared access users.

Input

Output

Success or failure for each custom field. List of custom fields.

Example Request

<AddOpportunityFieldsRequest>
    <CustomFields>
         <CustomField>
             <FieldName>Fruits</FieldName>
             <FieldType>Select</FieldType>
             <PossibleValues>Orange,Apple,Banana</PossibleValues>
             <RequiredField>N</RequiredField>
             <PhasePathID>0</PhasePathID>
        </CustomField>
    </CustomFields>
</AddOpportunityFieldsRequest>

Example Request

<AddOpportunityFieldsRequest>
    <CustomFields>
         <CustomField>
             <FieldName>MyTextField</FieldName>
        </CustomField>
    </CustomFields>
</AddOpportunityFieldsRequest>

Successful Response

<AddOpportunityFieldsResponse>
    <CustomFields>
         <CustomField>
             <Result>Success</Result>
             <CustomFieldID>8</CustomFieldID>
             <FieldName>MyTextField</FieldName>
             <FieldOrder>11</FieldOrder>
             <FieldType>Text</FieldType>
             <PossibleValues></PossibleValues>
             <RequiredField>N</RequiredField>
             <PhasePathID>0</PhasePathID>
        </CustomField>
    </CustomFields>
</AddOpportunityFieldsResponse>

Edit Custom Fields

This function allows the caller to edit custom fields.

Contacts permission is required for shared access users.

Any fields not passed will retain their original values. If one of more PhasePathIDs are passed then any existing PhasePathIDs are replaced.

Input

Output

Success or failure for each custom field. List of custom fields.

Example Request

<EditOpportunityFieldsRequest>
    <CustomFields>
         <CustomField>
             <CustomFieldID>2</CustomFieldID>
             <FieldType>Checkbox</FieldType>
             <PossibleValues>Dog,Cat,Monkey</PossibleValues>
             <RequiredField>Y</RequiredField>
        </CustomField>
    </CustomFields>
</EditOpportunityFieldsRequest>

Example Request

<EditOpportunityFieldsRequest>
    <CustomFields>
         <CustomField>
             <FieldName>Favorite Animal</FieldName>
             <FieldType>Checkbox</FieldType>
             <PossibleValues>Dog,Cat,Monkey</PossibleValues>
             <RequiredField>Y</RequiredField>
        </CustomField>
    </CustomFields>
</EditOpportunityFieldsRequest>

Example Response

<EditOpportunityFieldsResponse>
    <CustomFields>
         <CustomField>
             <Result>Success</Result>
             <CustomFieldID>2</CustomFieldID>
             <AccountNumber>19821</AccountNumber>
             <PossibleValues>A,B,C</PossibleValues>
        </CustomField>
    </CustomFields>
</EditOpportunityFieldsResponse>

Delete Custom Fields

This function allows the caller to delete custom fields.

Contacts permission is required for shared access users.

Input

Output

Success or failure for each products. List of products.

Example Request

<DeleteOpportunityFieldsRequest>
    <CustomFields>
         <CustomField>
             <FieldName>Favorite Animal</FieldName>
        </CustomField>
    </CustomFields>
</DeleteOpportunityFieldsRequest>

Example Request

<DeleteOpportunityFieldsRequest>
    <CustomFields>
         <CustomField>
             <CustomFieldID>5</CustomFieldID>
        </CustomField>
    </CustomFields>
</DeleteOpportunityFieldsRequest>

Example Response

<DeleteOpportunityFieldsResponse>
    <CustomFields>
         <CustomField>
             <Result>Success</Result>
        </CustomField>
    </CustomFields>
</DeleteOpportunityFieldsResponse>