Creation of new Contract and then addition of services to it

Hi, I am trying to automate the process of creating a contract, and then adding the relevant services to it. Has anyone done this before and can point me in the right direction.

I can automate the creation of the contract, but its the addition of the services.

Thanks for any help in advance.

Contracts in Autotask are complicated. I recommend starting with reading the following Autotask developer articles:

To add a new service or service bundle to a contract, create a new ContractServiceAdjustment or ContractServiceBundleAdjustment.

Here is a list of entities and how to use them. For each entity, I am listing the “Service” entity, but you can use the “ServiceBundle” entity to work with contract service bundles:

  • ContractService

    • Create: Add a service to a contract with 0 quantity. Used to set the default price, cost, and description of a service for a contract without actually any units of the service.
    • Update: Update the cost and description of a service for a contract.
    • Query: Not useful.
  • ContractServiceAdjustment

    • Create: Adjust the quantity of a service on a contract effective at a particular time. If your contract has a qty of 3 for a service, and you want the quantity to be 5, you should create a new ContractServiceAdjustment with a quantity of 2.
  • ContractServiceUnit

    • Query: Determine the quantity of a particular service on a contract as of a specific date. When querying, be sure to filter where StartDate is less than, and EndDate is greater than, the date on which you want to determine the quantity.

I imagine this will lead to more questions, so please let me know what else I can clarify for you.