Opportunity

An Opportunity in Maximizer CRM is a way to track a potential sale or business deal that a given company is working on. It helps businesses organize inquiries that have shown interest in their products or services and may result in a sale.

Think of an Opportunity as a digital file or record that stores all the important details about a possible deal. It is always associated with an AbEntry (Company, Individual or Contact) and has relevant information like what the customers are interested in, how much the deal might be worth, and when they might make a decision.

See below some considerations for Opportunities:

  • Some fields are mandatory when creating an Opportunity:

    • AbEntryKey

    • Objective

  • Optionally, an Opportunity can follow a pre-defined Sales Process.

HowTo's

Change Stage

1. List all Sales Processes

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "FieldOptions": {
            "SalesProcess/Setup": [
                {
                    "Key": 1,
                    "Description": 1
                }
            ]
        }
    }
}

2. List all Stages of a Sales Process

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "FieldOptions": {
            "CurrentSalesStage/Setup": [
                {
                    "Key": 1,
                    "Description": 1,
                    "ProbabilityClose": 1
                }
            ]
        },
        "Data": {
            "SalesProcessSetup": {
                "Key": "U2FsZXNQcm9jZXNzCURFRkFVTFQJMA==" // key read from step 1
            }
        }
    }
}

3. Read Current Sales Stage (Instance) from Opportunity

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "Scope": {
            "Fields": {
                "Key": 1,
                "Objective": 1,
                "Status": 1,
                "SalesProcess": {
                    "Key": 1,
                    "Setup": 1,
                    "Description": 1,
                    "DisplayValue": 1
                },
                "CurrentSalesStage": {
                    "Key": 1,
                    "Setup": 1,
                    "Description": 1,
                    "Age": 1,
                    "TargetAge": 1,
                    "ProbabilityClose": 1,
                    "DisplayValue": 1
                }
            }
        },
        "Criteria": {
            "SearchQuery": {
                "Key": {
                    "$EQ": "T3Bwb3J0dW5pdHkJMjUwMTAzMjUxNTUwMzE0NTIwMDExTwkw"
                }
            }
        }
    }
}

4. Change Opportunity Stage

// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
    "Opportunity": {
        "Data": {
            "Key": "T3Bwb3J0dW5pdHkJMjUwMTAzMjUxNTUwMzE0NTIwMDExTwkw",
            "SalesStageSetupKey": "U2FsZXNQcm9jZXNzU3RhZ2VTZXR1cAkyMjA0MDYyNTEzNTE0Mjc0ODAwMDJHCTA=" // one of the keys read on step 2, depending to which stage you want to move the Opportunity to
        }
    }
}

Work with Categories associated to Products/Services

How to work with the Category items associated to Products/Services items (Administrator > Preferences > System Fields > Products/Services > "Associated category items").

Products/Services (Product) and Categories (Category) are system table fields shared by Opportunity, Case, Campaign and Appointment. There is one item list and one association set: every request in this folder works with any of those entities, and a change made through one entity applies to all of them.

Covered here:

  • Read the Category options valid for a given Product selection (Data.Product filter).

  • Read the full product-to-category association map (AssociatedCategories property).

  • Create, change and clear associations through the standard table-item Update syntax.

  • Remove a product item (its associations are cleaned up automatically).

Requires API version 2.68+.

Read Category Options - Filtered by Selected Products

Returns the Category options filtered by the Products/Services items provided in the Data block.

The same request works for Case, Campaign and Appointment: Products/Services and Categories are shared system fields, so replace "Opportunity" with the entity you are working with.

Filtering rules:

  • A Category is returned when it is associated with at least one product in Data.Product.
  • A Category without any product association is always returned.
  • "Product": [] returns only the Categories that have no association.
  • Omitting the Data block returns the full list (backward compatible).
// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    // Returns the Category options that are valid for the given selection of
    // Products/Services items, applying the associations configured in
    // Administrator > System Fields > Products/Services > "Associated category items".
    //
    // Rules:
    // - A Category is returned when it is associated with AT LEAST ONE of the
    //   products listed in Data.Product (union).
    // - A Category with NO product association at all is ALWAYS returned.
    // - With "Product": [] only the unassociated Categories are returned.
    // - Without the Data block the full Category list is returned (legacy behavior).
    "Opportunity": {
        "FieldOptions": {
            "Category": [
                {
                    "Key": 1,
                    "DisplayValue": 1
                }
            ]
        },
        "Data": {
            // Keys of the selected Products/Services items, as numeric strings
            "Product": [ "1", "3" ]
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

Read Product Items - With Associated Categories

Reads the Products/Services items including the AssociatedCategories property: the Category items associated to each product (as configured in Administrator > System Fields).

AssociatedCategories uses an item scope, so you choose which Category fields to return (Key, DisplayValue).

The same request works for Case, Campaign and Appointment, since Products/Services and Categories are shared system fields.

Response example:
"Product": [
{&#34;Key&#34;: &#34;1&#34;, &#34;DisplayValue&#34;: &#34;Accessories&#34;, &#34;AssociatedCategories&#34;: [ { &#34;Key&#34;: &#34;2&#34;, &#34;DisplayValue&#34;: &#34;Cat 1&#34; } ]},
{&#34;Key&#34;: &#34;6&#34;, &#34;DisplayValue&#34;: &#34;Products&#34;, &#34;AssociatedCategories&#34;: []}
]

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    // Returns every Products/Services item together with the Category items
    // associated to it. Useful to retrieve the complete product-to-category
    // map in a single call.
    //
    // AssociatedCategories in the response is an array of Category items,
    // each one with its Key and DisplayValue. An empty array means the
    // product has no association, so every Category is valid for it.
    "Opportunity": {
        "FieldOptions": {
            "Product": [
                {
                    "Key": 1,
                    "DisplayValue": 1,
                    "AssociatedCategories": [
                        {
                            "Key": 1,
                            "DisplayValue": 1
                        }
                    ]
                }
            ]
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

Add Product Item - With Associated Categories

Creates a new Products/Services item with its associated Category items in a single call. This is the API equivalent of adding an item in Administrator > System Fields > Products/Services and checking entries under "Associated category items".

AssociatedCategories takes Category items as objects; Key (numeric string) is the only field used. Every key must reference an existing Category item, otherwise the request fails.

The same request works for Case, Campaign and Appointment, since Products/Services and Categories are shared system fields. An association created here applies to all of them.

// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
    // Creates a new Products/Services item and associates Category items
    // to it in the same call.
    //
    // Key: null is included so the response echoes back the key generated
    // for the new item.
    //
    // AssociatedCategories takes Category items; Key is the only field used.
    // Every key must belong to an existing Category item: if a key does not
    // exist, the request fails and nothing is saved.
    //
    // The property is optional: omitting it (or passing []) creates the item
    // without associations, so every Category is valid for it.
    "Opportunity": {
        "FieldOptions": {
            "Product": [
                {
                    "Key": null,
                    "Name": "Services",
                    "AssociatedCategories": [
                        {
                            "Key": "5"
                        }
                    ]
                }
            ]
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

Change Product Item - Replace Associated Categories

Replaces the set of Category items associated to an existing Products/Services item. Equivalent to editing "Associated category items" for the item in Administrator > System Fields.

AssociatedCategories takes Category items as objects; Key (numeric string) is the only field used. Every key must reference an existing Category item, otherwise the request fails. The list sent becomes the product's complete association set (full replace). Omit the property to leave associations untouched while changing other item fields (for example Name).

The same request works for Case, Campaign and Appointment, since Products/Services and Categories are shared system fields.

// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
    // Replaces the full set of Category items associated to an existing
    // Products/Services item. This is the API equivalent of saving the
    // "Associated category items" checkboxes in the Administrator dialog.
    //
    // AssociatedCategories takes Category items; Key is the only field used.
    // Every key must belong to an existing Category item: if a key does not
    // exist, the request fails and nothing is saved.
    //
    // Semantics per item:
    // - AssociatedCategories present: the product's association set becomes
    //   exactly this list (full replace).
    // - AssociatedCategories omitted: associations are left untouched.
    //
    // Key identifies the existing product item. Name can be included in the
    // same call to rename the item.
    "Opportunity": {
        "FieldOptions": {
            "Product": [
                {
                    "Key": "1",
                    "AssociatedCategories": [
                        {
                            "Key": "2"
                        },
                        {
                            "Key": "5"
                        }
                    ]
                }
            ]
        },
        "Options": {
            "Modify": true
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

Change Product Item - Clear Associated Categories

Clears every Category association from an existing Products/Services item. Equivalent to unchecking all entries under "Associated category items" in Administrator > System Fields.

An empty AssociatedCategories array means "no association": the product stops restricting the Category options. When categories are provided, they are objects and Key (numeric string) is the only field used.

The same request works for Case, Campaign and Appointment, since Products/Services and Categories are shared system fields.

// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
    // Removes ALL Category associations from an existing Products/Services
    // item by sending an empty AssociatedCategories array.
    //
    // After this call the product has no association, so every Category is
    // valid for it again (unassociated products do not restrict anything).
    "Opportunity": {
        "FieldOptions": {
            "Product": [
                {
                    "Key": "1",
                    "AssociatedCategories": []
                }
            ]
        },
        "Options": {
            "Modify": true
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

Remove Product Item - Associations Removed Automatically

Removes a Products/Services item. The item is deleted only when it is not in use; if any entry has the item selected, the request fails and nothing is removed.

The Category associations of the removed item are deleted automatically together with it; the Category items themselves are not affected.

The same request works for Case, Campaign and Appointment, since Products/Services and Categories are shared system fields.

// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
    // Removes a Products/Services item.
    //
    // The item is deleted only when it is not in use: if any entry has the
    // item selected, the request fails and nothing is removed.
    //
    // The Category associations of the removed item are deleted together
    // with it; no separate cleanup call is required. The Category items
    // themselves are NOT deleted.
    "Opportunity": {
        "FieldOptions": {
            "Product": [
                {
                    "Key": "1"
                }
            ]
        },
        "Options": {
            "Remove": true
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

Read - Opportunity by SalesProcessSetup

Use the AbEntryRead method to search for Address Book entries in the database.

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "Scope": {
            "Fields": {
                "Key": 1,
                "Objective": 1,
                "SalesProcessSetup": {
                    "Key": 1,
                    "DisplayValue": 1
                }
            }
        },
        "Criteria": {
            "SearchQuery": {
                "SalesProcessSetupKey": {
                    "$EQ": "U2FsZXNQcm9jZXNzCURFRkFVTFQJMA=="
                }
            },
            "Top": 3
        }
    }
}

Read - Opportunity Revenue by AbEntryKey or ContactKey

Use the AbEntryRead method to search for Address Book entries in the database.

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "Scope": {
            "Fields": {
                "Key": 1,
                "Objective": 1,
                "ForecastRevenue": 1,
                "Revenue": 1,
                "Status": 1
            }
        },
        "Criteria": {
            "SearchQuery": {
                "$AND": [
                    {
                        "$OR": [
                            {
                                "AbEntryKey": {
                                    "$EQ": "Q29tcGFueQkyMjA1MDUyNTE1MzY1OTg0NTAwMDVDCTA="
                                }
                            },
                            {
                                "ContactKey": {
                                    "$EQ": "Q29tcGFueQkyMjA1MDUyNTE1MzY1OTg0NTAwMDVDCTA="
                                }
                            }
                        ]
                    },
                    {
                        "Status": {
                            "$IN": [
                                0,
                                2,
                                3
                            ]
                        }
                    }
                ]
            }
        }
    },
    "Compatibility": {
        "AbEntryKey": "2.0"
    },
    // Required for retrieving Revenue property
    "Configuration": {
        "Drivers": {
            "IOpportunitySearcher": "Maximizer.Model.Access.Sql.OpportunitySearcher"
        }
    }
}

Read - Opportunity using $PHRASE operator

Use the AbEntryRead method to search for Address Book entries in the database.

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "Scope": {
            "Fields": {
                "Key": 1,
                "Objective": 1,
                "Description": 1
            }
        },
        "Criteria": {
            "SearchQuery": {
                // This search will execute on the Objective & Description property
                "$PHRASE": "Test"
            },
            "Top": 3
        }
    }
}

Read - Opportunities created from Leads

Use the AbEntryRead method to search for Address Book entries in the database.

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "Scope": {
            "Fields": {
                "Key": 1,
                "Objective": 1
            }
        },
        "Criteria": {
            "SearchQuery": {
                "Key": {
                    // This condition translates to: "retrieve all Lead objects that have OpportunityKey associated"
                    "$EXISTS(LeadObject)": "OpportunityKey"
                }
            },
            "Top": 3
        }
    },
    "Configuration": { // Needed for using $EXISTS
        "Drivers": {
            "IOpportunitySearcher": "Maximizer.Model.Access.Sql.OpportunitySearcher"
        }
    }
}

Read - Get monthly total revenue for a year

Use the AbEntryRead method to search for Address Book entries in the database.

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "Scope": {
            "Fields": {
                "$MONTH(CloseDate)": 1,
                "$COUNT()": 1,
                "$SUM(CorporateRevenue)/DisplayValue": 1
            }
        },
        "Criteria": {
            "SearchQuery": {
                "$YEAR(CloseDate)": {
                    "$EQ": 2022
                }
            }
        },
        "GroupBy": {
            "Fields": [
                "$MONTH(CloseDate)"
            ]
        },
        "OrderBy": {
            "Fields": [
                {
                    "$MONTH(CloseDate)": "ASC"
                }
            ]
        }
    },
    // Needed for using $YEAR and $MONTH
    "Configuration": {
        "Drivers": {
            "IOpportunitySearcher": "Maximizer.Model.Access.Sql.OpportunitySearcher"
        }
    }
}

Read - Opportunity by PartnerInfo

Use the AbEntryRead method to search for Address Book entries in the database.

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "Scope": {
            "Fields": {
                "Key": 1,
                "Objective": 1,
                "PartnerInfo": 1
            }
        },
        "Criteria": {
            "SearchQuery": {
                "PartnerInfo": {
                    "$EQ": {
                        "Key": "Q29udGFjdAlERU1PXzVDCTE="
                    }
                }
            },
            "Top": 3
        }
    },
    "Compatibility": {
        "AbEntryKey": "2.0"
    }
}

Read - Opportunity by SalesTeam

Use the AbEntryRead method to search for Address Book entries in the database.

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "Scope": {
            "Fields": {
                "Key": 1,
                "Objective": 1,
                "SalesTeam": 1
            }
        },
        "Criteria": {
            "SearchQuery": {
                "SalesTeam/Key": {
                    "$EQ": "U2FsZXNUZWFtCTE="
                }
            },
            "Top": 3
        }
    }
}

Read - Sales stages of a given opportunity

Use the AbEntryRead method to search for Address Book entries in the database.

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "SalesStage": {
        "Scope": {
            "Fields": {
                "Key": 1,
                "Description": 1,
                "ProbabilityClose": 1,
                "Age": {
                    "DisplayValue": 1
                },
                "Current": 1
            }
        },
        "Criteria": {
            "SearchQuery": {
                "OpportunityKey": {
                    "$EQ": "T3Bwb3J0dW5pdHkJMjIwNTA1MjUxNTM2NTg5NDAwMDAzTwkw"
                }
            }
        }
    }
}

Read - Opportunity stage and time at that stage

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "Scope": {
            "Fields": {
                "Key": 1,
                "Objective": 1,
                "Status": 1,
                "SalesProcessSetup": {
                    "Key": 1,
                    "DisplayValue": 1
                },
                "CurrentSalesStage": {
                    "Description": 1,
                    "TargetAge": 1, // Days the stage is expected to take. 0 = not set
                    "ProbabilityClose": 1
                },
                "CurrentSalesStageAge": { // Days at the current stage. It counts up while the opportunity is open and stops when it is won, lost or abandoned
                    "Value": 1,
                    "DisplayValue": 1
                }
            }
        },
        "Criteria": {
            "Top": 3
        }
    },
    "Configuration": {
        "Drivers": { // Needed to return CurrentSalesStageAge
            "IOpportunitySearcher": "Maximizer.Model.Access.Sql.OpportunitySearcher"
        }
    }
}

Update - Change AbEntryKey of an existing opportunity

// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
    "Opportunity": {
        "Data": {
            "Key": "T3Bwb3J0dW5pdHkJMjQwMTA4MjUxNDM2MjgzNzcwMDAxTwkw", // Mandatory
            "AbEntryKey": "QWJFbnRyeQkyMjA1MDUyNTE1MzY1OTg0NTAwMDVDCTA="
        }
    },
    "Compatibility": {
        "AbEntryKey": "2.0"
    },
    "Configuration": {
        "Drivers": {
            // Changing AbEntryKey of an Opportunity is supported by SQL Driver only
            "IOpportunityAccess": "Maximizer.Model.Access.Sql.OpportunityAccess"
        }
    }
}

Validate - Get opportunity mandatory fields

// POST https://api.maximizer.com/octopus/Validate
// Authorization: Bearer <token>
// The endpoint response will be an echo of the payload + Validation result listing all mandatory fields
// The endpoint validates fields as described below:
//      * Basic fields.
//      * UDFs always mandatory.
//      * UDFs mandatory on rule if the rule is true for the payload below (payload should include all fields that are part of the rule for it to be evaluated).
//      * Fields mandatory per business rules:
//          - AbEntryKey in Creation.
//          - SalesStageSetupKey if SalesProcessSetupKey is present in the payload.
{
    "Opportunity": {
        "Data": {
            "Key": null, // If null, validation will be done assuming is a create operation. If not null, validation will be done assuming is an update operation
            "AbEntryKey": "Q29tcGFueQkyMjA1MDUyNTIyMjczODY2NDAwMjlDCTA=",
            "ContactKey": "Q29udGFjdAkyMjA1MDUyNTIyMjczODY2NDAwMjlDCTE=",
            "Cost": 3000,
            "ForecastRevenue": 5000,
            "Leader": "VXNlcglNQVNURVI=",
            "SalesProcessSetupKey": "U2FsZXNQcm9jZXNzCURFRkFVTFQJMA==",
            "SalesStageSetupKey": "U2FsZXNQcm9jZXNzU3RhZ2VTZXR1cAkyMjA0MDYyNTEzNTIzMjM3MzAwMDZHCTA="
        }
    },
    "Configuration": {
        "Drivers": {
            "IOpportunityAccess": "Maximizer.Model.Access.Sql.OpportunityAccess"
        }
    }
}

Example: Example response

// Request →
// POST https://api.maximizer.com/octopus/Validate
// Authorization: Bearer <token>
// The endpoint response will be an echo of the payload + Validation result listing all mandatory fields
// The endpoint validates fields as described below:
//      * Basic fields.
//      * UDFs always mandatory.
//      * UDFs mandatory on rule if the rule is true for the payload below (payload should include all fields that are part of the rule for it to be evaluated).
//      * Fields mandatory per business rules:
//          - AbEntryKey in Creation.
//          - SalesStageSetupKey if SalesProcessSetupKey is present in the payload.
{
    "Opportunity": {
        "Data": {
            "Key": null, // If null, validation will be done assuming is a create operation. If not null, validation will be done assuming is an update operation
            "AbEntryKey": "Q29tcGFueQkyMjA1MDUyNTIyMjczODY2NDAwMjlDCTA=",
            "ContactKey": "Q29udGFjdAkyMjA1MDUyNTIyMjczODY2NDAwMjlDCTE=",
            "Cost": 1000,
            "ForecastRevenue": 2000,
            "Leader": "VXNlcglNQVNURVI=",
            "SalesProcessSetupKey": "U2FsZXNQcm9jZXNzCURFRkFVTFQJMA==",
            "SalesStageSetupKey": "U2FsZXNQcm9jZXNzU3RhZ2VTZXR1cAkyMjA0MDYyNTEzNTIzMjM3MzAwMDZHCTA="
        }
    },
    "Configuration": {
        "Drivers": {
            "IOpportunityAccess": "Maximizer.Model.Access.Sql.OpportunityAccess"
        }
    }
}
// Response ←
{
  "Code": 0,
  "Opportunity": {
    "Data": {
      "Key": null,
      "AbEntryKey": "Q29tcGFueQkyMjA1MDUyNTIyMjczODY2NDAwMjlDCTA=",
      "ContactKey": "Q29udGFjdAkyMjA1MDUyNTIyMjczODY2NDAwMjlDCTE=",
      "Cost": 1000.0,
      "ForecastRevenue": 2000.0,
      "Leader": "VXNlcglNQVNURVI=",
      "SalesProcessSetupKey": "U2FsZXNQcm9jZXNzCURFRkFVTFQJMA==",
      "SalesStageSetupKey": "U2FsZXNQcm9jZXNzU3RhZ2VTZXR1cAkyMjA0MDYyNTEzNTIzMjM3MzAwMDZHCTA="
    },
    "Validation": {
      "AbEntryKey": {
        "Mandatory": true
      },
      "Leader": {
        "Mandatory": true
      },
      "SalesStageSetupKey": {
        "Mandatory": true
      },
      "Description": {
        "Mandatory": true
      },
      "CloseDate": {
        "Mandatory": true
      },
      "SalesTeam": {
        "Mandatory": true
      }
    }
  }
}

Metadata

Read Opportunity metadata (simple)

Use the SchemaRead method to query the structure or metadata of entities in the database.

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Schema": {
        "Scope": {
            "Fields": 1
        },
        "Criteria": {
            "SearchQuery": {
                "Key": {
                    "$TREE": "/Opportunity"
                }
            }
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

Read Opportunity metadata (more)

Use the SchemaRead method to query the structure or metadata of entities in the database.

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Schema": {
        "Scope": {
            "Fields": {
                "Key": 1,
                "Alias": 1,
                "Type": 1,
                "Name": 1,
                "AppliesTo": 1,
                "Sortable": 1,
                "Nullable": 1,
                "Assignable": 1,
                "Queryable": 1,
                "Mandatory": 1,
                "Attributes": 1,
                "HasOption": 1,
                "DisplayValue": 1
            }
        },
        "Criteria": {
            "SearchQuery": {
                "Key": {
                    "$TREE": "/Opportunity"
                }
            }
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

FieldOptions

Read Opportunity FieldOptions - SalesProcessSetup

Use the AbEntryGetFieldOptions method to retrieve the options for table-valued fields of AbEntry objects.

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "FieldOptions": {
            "SalesProcessSetup": [
                {
                    "Key": 1,
                    "DisplayValue": 1
                }
            ]
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

Read Opportunity FieldOptions - SalesStageSetup

Use the AbEntryGetFieldOptions method to retrieve the options for table-valued fields of AbEntry objects.

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "FieldOptions": {
            "SalesStageSetup": [
                {
                    "Key": 1,
                    "ProbabilityClose": 1,
                    "DisplayValue": 1
                }
            ]
        },
        "Data": {
            // Mandatory
            // We need to know which SalesProcessSetup to retrieve the Stages from
            "SalesProcessSetupKey": "U2FsZXNQcm9jZXNzCURFRkFVTFQJMA=="
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

Read Opportunity FieldOptions - Reason

Use the AbEntryGetFieldOptions method to retrieve the options for table-valued fields of AbEntry objects.

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "FieldOptions": {
            "Reason": [
                {
                    "Key": 1,
                    "DisplayValue": 1
                }
            ]
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

Read Opportunity FieldOptions - Category

Use the AbEntryGetFieldOptions method to retrieve the options for table-valued fields of AbEntry objects.

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "FieldOptions": {
            "Category": [
                {
                    "Key": 1,
                    "DisplayValue": 1
                }
            ]
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

Read Opportunity FieldOptions - Product

Use the AbEntryGetFieldOptions method to retrieve the options for table-valued fields of AbEntry objects.

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "FieldOptions": {
            "Product": [
                {
                    "Key": 1,
                    "DisplayValue": 1
                }
            ]
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

Read Opportunity FieldOptions - Rating

Use the AbEntryGetFieldOptions method to retrieve the options for table-valued fields of AbEntry objects.

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "FieldOptions": {
            "Rating": [
                {
                    "Key": 1,
                    "DisplayValue": 1
                }
            ]
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

Read Opportunity FieldOptions - RevenueType

Use the AbEntryGetFieldOptions method to retrieve the options for table-valued fields of AbEntry objects.

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "FieldOptions": {
            "RevenueType": [
                {
                    "Key": 1,
                    "DisplayValue": 1
                }
            ]
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

Read Opportunity FieldOptions - Status

Use the AbEntryGetFieldOptions method to retrieve the options for table-valued fields of AbEntry objects.

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "FieldOptions": {
            "Status": [
                {
                    "Key": 1,
                    "DisplayValue": 1
                }
            ]
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

Read Opportunity FieldOptions - Leader

Use the AbEntryGetFieldOptions method to retrieve the options for table-valued fields of AbEntry objects.

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "FieldOptions": {
            "Leader": [
                {
                    "Uid": 1,
                    "Key": 1,
                    "DisplayValue": 1
                }
            ]
        },
        "Options": {
            // Disabled users are not included by default. This option forces returning disabled users.
            "IncludeDisabled": true
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

Opportunity CRUD

Create - Opportunity

Use the AbEntryRead method to search for Address Book entries in the database.

// POST https://api.maximizer.com/octopus/Create
// Authorization: Bearer <token>
{
    "Opportunity": {
        "Data": {
            "Key": null, // Will be generated automatically
            "AbEntryKey": "QWJFbnRyeQkyMjA1MDUyNTE1MzY1OTg0NTAwMDVDCTA=", // Mandatory
            "Objective": "Test Objective", // Mandatory
            "Description": "Description",
            "Status": 2, // In Progress - Check FieldOptions for possible values
            "Cost": 1234.56,
            "ForecastRevenue": 5678.90,
            "StartDate": "2025-01-02T12:00:00Z",
            "Leader": {
                "Uid": "MASTER"
            },
            "SalesTeam/Key": "U2FsZXNUZWFtCTY1NTM1",
            "NextAction": "Develop solution",
            "SalesProcessSetupKey": "U2FsZXNQcm9jZXNzCURFRkFVTFQJMA==", // Check FieldOptions for possible values
            "SalesStageSetupKey": "U2FsZXNQcm9jZXNzU3RhZ2VTZXR1cAkyMjA0MTEyNTE1NTg1NzQxNDAwMDFHCTA=", //Check FieldOptions for possible values related to SalesProcessSetupKey
            "Category": [ // Check FieldOptions for possible values
                "1"
            ],
            "Product": [ // Check FieldOptions for possible values
                "1",
                "2"
            ],
            "Rating": [ // Check FieldOptions for possible values
                "57998"
            ],
            "RevenueType": "60001" // Check FieldOptions for possible values
        }
    },
    "Compatibility": {
        "AbEntryKey": "2.0"
    }
}

Read - Opportunity

Use the AbEntryRead method to search for Address Book entries in the database.

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Opportunity": {
        "Scope": {
            "Fields": {
                "Key": 1,
                "AbEntryKey": 1,
                "Objective": 1,
                "Description": 1,
                "Status": {
                    "Key": 1,
                    "DisplayValue": 1
                },
                "Cost": 1,
                "ForecastRevenue": 1,
                "StartDate": 1,
                "SalesTeam/Key": 1,
                "NextAction": 1,
                "SalesProcessSetupKey": 1,
                "SalesStageSetupKey": 1,
                "Reason": [
                    {
                        "Key": 1,
                        "DisplayValue": 1
                    }
                ],
                "Category": [
                    {
                        "Key": 1,
                        "DisplayValue": 1
                    }
                ],
                "Product": [
                    {
                        "Key": 1,
                        "DisplayValue": 1
                    }
                ],
                "Rating": [
                    {
                        "Key": 1,
                        "DisplayValue": 1
                    }
                ],
                "RevenueType": [
                    {
                        "Key": 1,
                        "DisplayValue": 1
                    }
                ]
            }
        },
        "Criteria": {
            "SearchQuery": {},
            "Top": 3
        }
    },
    "Compatibility": {
        "AbEntryKey": "2.0"
    }
}

Update - Opportunity

Use the AbEntryRead method to search for Address Book entries in the database.

// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
    "Opportunity": {
        "Data": {
            "Key": "T3Bwb3J0dW5pdHkJMjUwMTAzMjUxNTM2NTg1MTMwMDA5Twkw", // Mandatory
            "Objective": "Test Objective updated",
            "Status": 3 // Won - See FieldOptions for possible values
        }
    }
}

Delete - Opportunity

Use the AbEntryRead method to search for Address Book entries in the database.

// POST https://api.maximizer.com/octopus/Delete
// Authorization: Bearer <token>
{
    "Opportunity": {
        "Data": {
            "Key": "T3Bwb3J0dW5pdHkJMjUwMTAzMjUxNTM2NTg1MTMwMDA5Twkw" // Mandatory
        }
    }
}