# Sync YTD and LYTD Sales Data Using Windows Scheduler

As we now know about displaying the YTD and LYTD sales data using import custom fields process which has to be done manually can now be synced automatically based on windows scheduler.

User will have to schedule the batch file using Task Scheduler which will sync YTD, LYTD and Last Invoice Date data automatically into Sage CRM based on scheduled time.

If user wants to keep sales value updated on daily, weekly or monthly basis then user can run scheduler (on daily, weekly or monthly basis ) by scheduling the utility. Before running scheduler, user will have to follow below steps –

* Edit ‘**SyncCustomFields**’ batch file from ‘C:\Program Files (x86)\Greytrix\GUMU for Sage CRM Server’
* Edit the below details in that file :–
  1. **Sage CRM URL –** Enter the Sage CRM URL (like <http://grey087/CRM2017R3/eware.dll>)
  2. **Sage CRM User Name –** Enter Sage CRM username
  3. **Sage CRM Password –** Enter Sage CRM password
  4. **Sage CRM Instance Name –** Enter Sage CRM Instance name
  5. **Sage 100 company code –** Enter the Sage 100 Company Code which is integrated with GUMU™ Integration.
* Save the file
* Run ‘**SyncCustomFields’** with **Run as Administrator** which will import YTD sales data from Sage 100 to Sage CRM or you can schedule under Windows [Task Scheduler](https://www.thewindowsclub.com/how-to-schedule-batch-file-run-automatically-windows-7).

**Note: –** Scheduler will work only for 1 Sage 100 Company Code not for multiple Sage 100 Company Codes.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.greytrix.com/gumu-sage-crm-integration/sage-100/user-guide/configuring-gumu-integration-on-sage-crm/sync-ytd-and-lytd-sales-data-using-windows-scheduler.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
