Associate Records with Integrated Service

Purpose

- To either link, or unlink a Zoho FSM record w.r.t a record in an integrated Zoho service

- To push a Zoho FSM record to an integrated Zoho service

Request URL

https://fsm.zoho.com/fsm/v1/<module_api_name>/<record_id>/actions/process_sync

module_api_name - The API name of the Zoho FSM module whose record you want to link/unlink/push

record_id - The unique ID of the Zoho FSM record you want to link/unlink/push

Request Method

POST

Scope

scope=ZohoFSM.modules.<module_name>.UPDATE

Parameters

NameData TypeDescriptionMandatory
sync_serviceString

The Zoho service with whose record you want to link/unlink a Zoho FSM record or to which you want to push the Zoho FSM record.

The admissible values are:

- finance

- zohocrm

Yes

Input JSON Keys

NameData TypeDescriptionMandatory
integ_idString

The ID of the Zoho service record to which you want to link/unlink the Zoho FSM record.

If you want to link/unlink a Zoho FSM contact to a contact person in Zoho Books/Invoice, then you need to use the ID of the contact person. Refer to the Get a Contact API doc of Books/Invoice to obtain this ID.

Yes, if you are performing link/unlink
sync_processString

The action that you want to perform on the Zoho FSM record. The possible values are:

- link

- unlink

- push

Yes
integ_moduleString

The module in the integrated Zoho service with which you want to link a Zoho FSM request, estimate, or work order. The possible values are:

- Deals

- Sales_Orders

Yes, if you are linking a Zoho FSM request, estimate, or work order record

Supported FSM Modules

Module NameAPI NameAction AllowedIntegrated Zoho Service
ContactsContactsLink, Unlink, PushFinance
CompaniesCompaniesLink, Unlink, PushFinance
Service_And_PartsService_And_PartsLink, Unlink, PushFinance
RequestsRequestsLink, UnlinkCRM
EstimatesEstimatesLink, UnlinkCRM
WorkOrdersWork_OrdersLink, UnlinkCRM

Sample Request

Copiedcurl --request POST 'https://fsm.zoho.com/fsm/v1/Contacts/1003000000764092/actions/process_sync?sync_service=finance' \
--header 'Authorization: Zoho-oauthtoken 1000.xxxx.xxxxxe'
--header 'content-type: application/json' \
--data "@sync.json"

Sample Input (Link record)

Copied{
   "data":[
       {
           "integ_id":"109010000000190001",
           "sync_process":"link"
       }
   ]
}

Sample Success Response (Link record)

Copied{
    "data": [
        {
            "details": {
                "code": "success",
                "finance_id": "109010000000190001",
                "source": "finance",
                "message": "Sync Successfull",
                "status": "SUCCESS",
                "fsm_id": "1003000000764092"
            },
            "id": 1003000000764092,
            "status": "SUCCESS"
        }
    ]
}

Sample Error Response (Link record)

Copied{
    "code": "INVALID_DATA",
    "details": {
        "finance_id": "2316667000000480277"
    },
    "message": "This record is already linked with a record of integrated service. Kindly unlink to proceed.",
    "status": "error"
}

Sample Error Response (Link record)

Copied//When you try to link a contact (not associated with a company) in Zoho FSM to a contact person in Zoho Finance.
{
    "code": "RESOURCE_NOT_FOUND",
    "details": {
        "finance_id": "109010000000372152"
    },
    "message": "The given record id for contact is unavailable/invalid",
    "status": "error"
}

Sample Error Response (Link record)

Copied//When you try to link a contact (associated with a company) in Zoho FSM to a customer (of Type Individual) in Zoho Finance.
{
    "code": "INVALID_DATA",
    "details": {
        "integ_id": "109010000000257001"
    },
    "message": "Invalid contact_person id passed for the parent contact associated",
    "status": "error"
}

Sample Input (Unlink record)

Copied{
   "data":[
       {
           "integ_id":"109010000000190001",
           "sync_process":"unlink"
       }
   ]
}

Sample Success Response (Unlink record)

Copied{
    "data": [
        {
            "id": 1003000000764092,
            "status": "SUCCESS"
        }
    ]
}

Sample Error Response (Unlink record)

Copied{
    "code": "INVALID_DATA",
    "details": {
        "id": 1003000000764092
    },
    "message": "This record is not linked to any integration service record.",
    "status": "error"
}

Sample Input (Push record)

Copied{
   "data":[
       {
           "sync_process":"push"
       }
   ]
}

Sample Success Response (Push record)

Copied{
    "data": [
        {
            "details": {
                "code": "SUCCESS",
                "finance_id": "109010000000192001",
                "source": "fsm",
                "message": "The contact has been added.",
                "status": "SUCCESS",
                "fsm_id": "1003000000900153"
            },
            "id": 1003000000900153,
            "status": "SUCCESS"
        }
    ]
}

Sample Error Response (Push record)

Copied{
    "code": "INVALID_DATA",
    "details": {
        "code": "UNABLE_TO_LINK",
        "finance_id": "",
        "source": "fsm",
        "status": "error",
        "fsm_id": "1003000000764092"
    },
    "message": "The customer \"Ms. Lucy Robin\" already exists. Please specify a different name.",
    "status": "error"
}

Sample Input (Link Work Order with Sales Orders)

Copied{
   "data":[
       {
           "integ_id":"2316667000000538129",
           "sync_process":"link",
           "integ_module":"Sales_Orders"
       }
   ]
}

Sample Input (Link Work Order with Deals)

Copied{
   "data":[
       {
           "integ_id":"2316667000000480277",
           "sync_process":"link",
           "integ_module":"Deals"
       }
   ]
}

Sample Success Response

Copied{
    "data": [
        {
            "id": 3177000000309126,
            "status": "SUCCESS"
        }
    ]
}