SalesStageInsertOrUpdate

Updates existing sales stage configuration data or inserts new data.

Usage

Use the SalesStageInsertOrUpdate method to update or insert sales stage configuration data. The Manage Data Rules - Manage Sales Stage Definition privilege is required.

New sales stages are inserted and existing sales stages are updated. Sales stages that are not identified in the request are not affected.

The <BaseName> and <SalesProcessBaseName> child elements of apdata:SalesStage are used to identify sales stage records in a request.

If no sales stage is located using this criteria, then a sales stage is inserted with the configuration specified in the request.

Note: Sales stages named Closed/Lost and Closed/Won are automatically associated with each sales process. The Probability field on the Closed/Lost sales stage is set to zero (0), and the Probability field on the Closed/Won sales stage is set to 100. You cannot change these values. Do not set up any other sales stage with the Probability field equal to 0 or 100 percent. Modifying picklists that are used internally by the Oracle CRM On Demand application can have an adverse impact on standard functionality.

The ListOfSalesStage argument contains the following elements in the <SalesStage> element for each sales stage:

  • Id. The ID of the sales stage.

  • SalesCategoryId. The ID of the sales category that the sales stage is associated with.

  • SalesCategoryName. The name of the sales category that the sales stage is associated with.

  • SalesCategoryBaseName. The language-independent name of the sales category that the sales stage is associated with.

  • Probability. The default probability for the sales stage.

  • SalesProcessBaseName. The language-independent name of the sales process that the sales stage is associated with.

  • BaseName. The language-independent name of the sales stage.

  • Name. The name of the sales stage.

  • Description. The description of the sales stage.

  • Order. The sequence of the sales stage as it appears in the picklist.

  • Status. The status of the sales stage.

  • BaseDescription. The language-independent description of the sales stage.

  • SalesProcessId. The ID of the sales process that the sales stage is associated with.

  • Language. The three-letter code for the language.

  • SalesProcessName. The name of the sales process that the sales stage is associated with.

  • ListOfProcessCoach. Information contained in the following elements in the <ProcessCoach> element for each process coach step:

    • Id. The ID of the process coach step.

    • SalesStageId. The ID of the sales stage that the process coach step is associated with.

    • BaseTitle. The language-independent title of the process coach step.

    • Order. The sequence of the process coach step as it appears in the picklist.

    • BaseDescription. The language-independent description of the process coach step.

    • Language. The three-letter code for the language.

    • Title. The title of the process coach step.

    • Description. The description of the process coach step.

    • StepName. The name of the process coach step.

  • ListOfAutomatedTask. Information contained in the elements in the <AutomatedTask> element for each automated task. There is a child element for each field that is available to be added to a task Detail page, including custom fields. For more information about task fields, see Activity.

  • ListOfTranslation. Information contained in the following elements in the <Translation> element for each automated task that is translated:

    • Id. The ID of the translation record.

    • Description. The description of the sales stage in the language identified by the language code.

    • Language. The three-letter code for the translation language.

    • SalesStageId. The ID of the sales stage.

    • Name. The name of the sales stage in the language identified by the language code.

  • ListOfProcessCoachTranslation. Information contained in the following elements in the <ProcessCoachTranslation> element for each language activated for your company:

    • Id. The ID of the translation record.

    • Language. The three-letter code for the language.

    • Title. The title of the process coach step in the language identified by the language code.

    • Instruction. The description of the process coach step in the language identified by the language code.

    • ProcessCoachId. The ID of the process coach step.

    • ProcessCoachName. The name of the process coach step in the language identified by the language code.

    • SalesStageId. The ID of the sales stage that the process coach step is associated with.

  • ListOfAttachment. Information contained in the following elements in the <Attachment> element for each attachment:

    • Id. The ID of the attachment.

    • AttachmentTag. Indicates whether the attachment is a file or a URL.

    • SalesStageId. The ID of the sales stage that the attachment is associated with.

    • FileExtension. The file extension of the attachment, if the attachment is a file.

    • DisplayFileName. The display name for the attachment.

    • FileDate. The date the file was uploaded, if the attachment is a file.

    • Description. The description of the attachment.

    • FileSize. The size of the file in KB, if the attachment is a file. The maximum file size for an attachment is 20 MB.

    • FileNameOrURL. The name of the file or the URL string.

    • Attachment. The file to be attached, if the attachment is a file.

      Note: When you extract sales stage information, the content of any attached files is included, encoded as inline Base64 encoded data. For more information about file attachments, see Using Attachments with Web Services On Demand.
  • ListOfAutomatedTaskTranslation. Information contained in the following elements in the <AutomatedTaskTranslation> element for each automated task that is translated:

    • Id. The ID of the translation record.

    • Subject. The subject of the task in the language identified by the language code.

    • TaskId. The ID of the task.

    • Language. The three-letter code for the translation language.

    • SalesStageId. The ID of the sales stage that the task is associated with.

    • TaskExternalSystemId. The unique external ID of the task.

    • TaskIntegrationId. The integration ID of the task.

    • Comments. The description of the task in the language identified by the language code.

  • ListOfRequiredField. Information contained in the following element in the <RequiredField> element for each field that is specified as a required field for the sales stage:

    • Id. The ID of the field.

    • DefaultValue. The default value for the field.

    • FieldName. The name of the field.

    • TagName. The integration tag for the field.

In addition, the following elements are also included in each of the <SalesStage>, <ProcessCoach>, <AutomatedTask>, <Translation>, <ProcessCoachTranslation>, <Attachment>, <AutomatedTaskTranslation>, and <RequiredFields> elements:

  • ModifiedDate. The date and time the instance (that is, the sales stage, process coach step, automated task, attachment, required field, or translation of a task or process coach step) was last modified.

  • CreatedDate. The date and time the instance was created.

  • ModifiedById. The Row ID of the user who last modified the instance.

  • CreatedById. The Row ID of the user who created the instance.

  • ModId. The modification key, which helps to check and protect against concurrent updates.

  • UpdatedByFirstName. The first name of the user who last modified the instance.

  • UpdatedByLastName. The last name of the user who last modified the instance.

  • UpdatedByUserSignInId. The sign-in ID of the user who last modified the instance.

  • UpdatedByAlias. The alias of the user who last modified the instance.

  • UpdatedByFullName. The full name of the user who last modified the instance.

  • UpdatedByIntegrationId. The integration ID of the user who last modified the instance.

  • UpdatedByExternalSystemId. The unique external ID of the user who last modified the instance.

  • UpdatedByEmailAddr. The email address of the user who last modified the instance.

  • CreatedBy. A combination of the full name of the person who created the instance, and the date on which the instance was created.

  • CreatedByFirstName. The first name of the user who created the instance.

  • CreatedByLastName. The last name of the user who created the instance.

  • CreatedByUserSignInId. The sign-in ID of the user who created the instance.

  • CreatedByAlias. The alias of the user who created the instance.

  • CreatedByFullName. The full name of the user who created the instance.

  • CreatedByIntegrationId. The integration ID of the user who created the instance.

  • CreatedByExternalSystemId. The unique external ID of the user who created the instance.

  • CreatedByEmailAddr. The email address of the user who created the instance.

  • CreatedBy. A combination of the full name of the person who created the instance, and the date on which the instance was created.

  • ModifiedBy. A combination of the full name of the person who last modified the instance, and the date on which the instance was last modified.

Arguments

The following table describes the arguments taken by the SalesStageInsertOrUpdate method.

Table Arguments Taken by the SalesProcessInsertOrUpdate Method

Name Description Required Default I/O

apData:SalesStage

The sales stage data to be updated or inserted.

Yes

Not applicable

Input

Status

The status of the call.

Not applicable

Not applicable

Output

Return Value of the Call

A status object of the apData:SalesStage type that contains the following:

  • Created. The username and time and date for the user who created the sales stage.

  • Modified. The username and time and date for the user who modified the sales stage.

  • Id. The ID of the sales stage.

  • ModId. The modification key, which helps to check and protect against concurrent updates.