> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudify.biz/llms.txt
> Use this file to discover all available pages before exploring further.

# Deal

> Deal-Based Workflows are where automation shines for your sales process. Let's set up a workflow for when deals close.

<Steps>
  <Step title="">
    First, we'll set our trigger. You can use any trigger based on your needs. For this example, we'll select "**Met filter criteria"**.

    <img src="https://mintcdn.com/cloudify-c7720744/sVwbOLRaDMVuHkuy/images/image-126.png?fit=max&auto=format&n=sVwbOLRaDMVuHkuy&q=85&s=df97020328e068b79c84ff932b050efa" alt="Main dashboard interface" style={{ height:"100%",width:"100%",borderRadius:"15px",border:"1px solid #e2e8f0",padding:"4px" }} width="1900" height="783" data-path="images/image-126.png" />
  </Step>

  <Step title="">
    Now choose a type of record that can enroll. Click on **'Deal,**' and then select any trigger based on your needs—this is just for demonstration. In this example, we'll click on '**Deal properties**,' select 'Deal stage,' and set it to **'Closed Won**' in your sales pipeline.

    <img src="https://mintcdn.com/cloudify-c7720744/sVwbOLRaDMVuHkuy/images/image-127.png?fit=max&auto=format&n=sVwbOLRaDMVuHkuy&q=85&s=1dc92a8d14b9001bbe91708ef06251cf" alt="Main dashboard interface" style={{ height:"100%",width:"100%",borderRadius:"15px",border:"1px solid #e2e8f0",padding:"4px" }} width="1900" height="814" data-path="images/image-127.png" />

    <img src="https://mintcdn.com/cloudify-c7720744/sVwbOLRaDMVuHkuy/images/image-129.png?fit=max&auto=format&n=sVwbOLRaDMVuHkuy&q=85&s=f250f8e1aa218b6d15d0776d9cb72211" alt="Main dashboard interface" style={{ height:"100%",width:"100%",borderRadius:"15px",border:"1px solid #e2e8f0",padding:"4px" }} width="1915" height="787" data-path="images/image-129.png" />
  </Step>

  <Step title="">
    For the automation, add "**Xero**" by Cloudify from the Integrated apps section
  </Step>

  <Step title="">
    After selecting the Xero app, choose **'Create an Invoice or Quote".**

    <img src="https://mintcdn.com/cloudify-c7720744/sVwbOLRaDMVuHkuy/images/image-130.png?fit=max&auto=format&n=sVwbOLRaDMVuHkuy&q=85&s=406b56b741cd7fb367366b116be766f1" alt="Main dashboard interface" style={{ height:"100%",width:"100%",borderRadius:"15px",border:"1px solid #e2e8f0",padding:"4px" }} width="1882" height="860" data-path="images/image-130.png" />
  </Step>

  <Step title="">
    In this step, select your invoice or quote preference from the dropdown below. We’re selecting ‘**Create draft invoice**,’ but you can pick any option from the dropdown based on your requirements.

    <img src="https://mintcdn.com/cloudify-c7720744/sVwbOLRaDMVuHkuy/images/image-131.png?fit=max&auto=format&n=sVwbOLRaDMVuHkuy&q=85&s=c70f90b99f745eb2f15362419dc98c11" alt="Main dashboard interface" style={{ height:"100%",width:"100%",borderRadius:"15px",border:"1px solid #e2e8f0",padding:"4px" }} width="1854" height="847" data-path="images/image-131.png" />
  </Step>

  <Step title="">
    Now select the account you want to apply your lines items to update. For demonstration we will select \*\*"Sales" \*\*and click on **"Save"**

    <img src="https://mintcdn.com/cloudify-c7720744/sVwbOLRaDMVuHkuy/images/image-132.png?fit=max&auto=format&n=sVwbOLRaDMVuHkuy&q=85&s=ef086b8cb1d803d8702f12eae9be60d9" alt="Main dashboard interface" style={{ height:"100%",width:"100%",borderRadius:"15px",border:"1px solid #e2e8f0",padding:"4px" }} width="1833" height="844" data-path="images/image-132.png" />

    <Info>
      **Note**: If selected, the chosen account will get automatically applied to all line items while creating the Xero invoice.
    </Info>
  </Step>

  <Step title="">
    Now we have finally set up our workflow, and it is ready to run based on the preferences we selected.
  </Step>

  <Step title="">
    Now we have finally set up our workflow, and it is ready to run based on the preferences we selected.

    <img src="https://mintcdn.com/cloudify-c7720744/sVwbOLRaDMVuHkuy/images/image-133.png?fit=max&auto=format&n=sVwbOLRaDMVuHkuy&q=85&s=33c5cf541faaab0965d66b797ea430ce" alt="Main dashboard interface" style={{ height:"100%",width:"100%",borderRadius:"15px",border:"1px solid #e2e8f0",padding:"4px" }} width="1834" height="862" data-path="images/image-133.png" />
  </Step>

  <Step title="">
    Click on '**Review and publish,**' or test it first before making it live.

    <img src="https://mintcdn.com/cloudify-c7720744/sVwbOLRaDMVuHkuy/images/image-134.png?fit=max&auto=format&n=sVwbOLRaDMVuHkuy&q=85&s=1ab3d27fe2f9c9778c7ad50b29387542" alt="Main dashboard interface" style={{ height:"100%",width:"100%",borderRadius:"15px",border:"1px solid #e2e8f0",padding:"4px" }} width="1911" height="847" data-path="images/image-134.png" />

    <Info>
      Workflows actions will only work with Cloudify's Premium Subscription.
    </Info>
  </Step>
</Steps>

<Tip>
  **Got unique integration needs?**\
  Our custom team can build tailored integrations, specialized data mappings, and workflow automations to perfectly match your specific business processes.

  [Advanced integration settings](https://custom.cloudify.biz/)
</Tip>
