Skip to content

Instantly share code, notes, and snippets.

@MatthewJBloom
Created June 18, 2020 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MatthewJBloom/78f0999ce16ff72822ca4e94c545e891 to your computer and use it in GitHub Desktop.
Save MatthewJBloom/78f0999ce16ff72822ca4e94c545e891 to your computer and use it in GitHub Desktop.
[
{
"customer": "5e2f11056ac61c0576bf4693",
"patch": "dedupe key patch for opportunities",
"targets": {
"connectwise": "opportunity/fields/ID",
"hubspot": "deal/fields/CW_OPPORTUNITY_ID"
}
},
{
"connectwise patches": [
{
"path": "opportunity/fields/NAME",
"value": {
"path": "id",
"type": "number",
"label": "Id (dedupe key)",
"readOnly": true
}
},
{
"path": "opportunity/fields/CLOSE_DATE",
"value": {
"path": "id",
"type": "number",
"label": "Id (dedupe key)",
"readOnly": true
}
},
{
"path": "opportunity/fields/OPP_NAME",
"value": {
"path": "name",
"type": "text",
"label": "Name (new)",
"required": true
}
},
{
"path": "opportunity/fields/OPP_CLOSE_DATE",
"value": {
"path": "expectedCloseDate",
"type": "datetime",
"label": "Close Date (new)",
"required": true,
"example": "2007-08-31T00:00:00Z",
"translate": [
{
"append": {
"append_value": "Z",
"append_on_denormal": true
}
},
{
"substring": {
"denormal": [
0,
19
]
}
}
]
}
}
]
},
{
"hubspot patches": [
{
"path": "deal/fields/NAME",
"value": {
"label": "CW-Opportunity ID (dedupe key)",
"description": "Opportunity_RecID in ConnectWise",
"path": "properties/cw_opportunity_id",
"group": "dealinformation",
"type": "number",
"translate": [
{
"cast": {
"denormal": "str"
}
}
]
}
},
{
"path": "deal/fields/CLOSE_DATE",
"value": {
"label": "CW-Opportunity ID (dedupe key)",
"description": "Opportunity_RecID in ConnectWise",
"path": "properties/cw_opportunity_id",
"group": "dealinformation",
"type": "number",
"translate": [
{
"cast": {
"denormal": "str"
}
}
]
}
},
{
"path": "deal/fields/DEAL_NAME",
"value": {
"label": "Deal Name (new)",
"description": "The name given to this deal.",
"path": "properties/dealname",
"group": "dealinformation",
"type": "text",
"translate": [
{
"cast": {
"denormal": "str"
}
}
]
}
},
{
"path": "deal/fields/DEAL_CLOSE_DATE",
"value": {
"label": "Close Date (new)",
"description": "The expected close date of the deal",
"path": "properties/closedate",
"group": "dealinformation",
"type": "datetime",
"translate": [
{
"cast": {
"denormal": "str"
}
},
{
"date": {
"unix": true,
"precision": 1000
}
},
{
"timezonefudger": {
"denormal": {
"offset": "T12:00:00Z"
},
"normal": {
"offset": "T00:00:00Z"
}
}
}
]
}
}
]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment