Loading
Insurance
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          InsPolicyService:getPolicyAsyncJobStatus

          InsPolicyService:getPolicyAsyncJobStatus

          Use this service to fetch the status of the asynchronous batch job.

          Class: InsPolicyService

          Method: getPolicyAsyncJobStatus

          How It Works

          1. The service takes jobId, policyId, or referencePolicyNumber as an input parameter. When you pass more than one input parameter in the request, the jobId takes precedence, followed by policyId, and then referencePolicyNumber.

            Important
            Important If you pass more than one of the accepted parameters and any one of them is invalid, the service returns an error.
          2. The service first validates field-level permissions and then retrieves the status of the asynchronous process. The possible values are:

            • WaitingToProcess—The job is in the queue.

            • InProgress—The job is in progress.

            • Success—The job is successful.

            • Failed—The job failed.

            • Aborted—The admin aborted the operation.

          3. The service returns the status of the latest jobId for a given policy based on the createdDate.

          Inputs

          You must pass one of these inputs.

          Input Description
          jobId

          The asynchronous job ID that’s returned by the asynchronous batch job.

          policyId

          The policy ID being monitored by the asynchronous job.

          referencePolicyNumber

          The reference number of the policy. This option isn’t supported for multi-root services.

          Input JSON

          Here's the sample input JSON.

          {
               "jobId": "7075j00004uK6GjAAK"
                        or
               "policyId": "0YT5w000000Y8MNGA0"
                        or
               "referencePolicyNumber": "0YT5w000000Y8MNGA0"
          }
            

          Output

          Option Description
          jobId The asynchronous job ID for the process. If you didn't provide the jobId as input and must know it, you can retrieve it from the output.
          status The status of the asynchronous process. Possible values include: WaitingToProcess, InProgress, Success, Failed, and Aborted.
          error The error message that’s returned when a job succeeds, fails, or is aborted.

          Output JSON

          Here's the sample output JSON.

          {
                "status": "Success",
                "jobId": "7075j00004uK6GjAAK",
                "errorCode": "INVOKE-200",
                "error": "OK"
          }
          
           
          Loading
          Salesforce Help | Article