Skip to content

Instantly share code, notes, and snippets.

View MatthewJBloom's full-sized avatar

Matt Bloom MatthewJBloom

  • Formstack
  • United States
View GitHub Profile
@MatthewJBloom
MatthewJBloom / d-wise.json
Created May 20, 2020 17:30
d-wise dedupe key patches prep
{
"goal": "dedupe key swap",
"targets": {
"hubspot": "netsuite_customer_id",
"netsuite": "entityid"
},
"hubspot patches": [
{
"path": "company/fields/COMPANY_NAME",
"value": {
@MatthewJBloom
MatthewJBloom / gist:6134e0e2771c7da8258964ea80cceb2a
Created May 18, 2020 14:54
Kyber Security Logs From Testing
[
{
"keyDescription": "Bedrock API",
"requestStartUtc": "2020-05-15 17:51:14",
"requestEndUtc": "2020-05-15 17:51:15",
"duration": 333,
"requestUrl": "https://cw.connectcomputer.com/v4_6_release/apis/3.0/company/companies?page=1&orderBy=lastUpdated%2Cid&pageSize=100&conditions=lastUpdated%20%3E%3D%20%5B2020-05-15T14%3A40%3A40Z%5D%20and%20deletedFlag%20%21%3D%20true",
"httpMethod": "GET",
"requestContents": "",
"httpStatus": 200,
@MatthewJBloom
MatthewJBloom / gist:3109fb2da2d06108c3ea816253c4ec4d
Created May 12, 2020 15:27
Connectwise POST Company Error on customFields/0/value
bedrock_api_1 | CALLING METHOD create company { name: 'Power Home Remodeling Group LLC',
bedrock_api_1 | city: 'Chester',
bedrock_api_1 | customFields: { '9': '500+' },
bedrock_api_1 | type: 26,
bedrock_api_1 | addressLine1: '2501 Seaport Drive',
bedrock_api_1 | country: 1,
bedrock_api_1 | state: 'PA',
bedrock_api_1 | phoneNumber: '(610) 990-4243',
bedrock_api_1 | status: 1,
bedrock_api_1 | website: 'www.powerhrg.com',
{
"query": {},
"headers": {
"Accept": "application/vnd.connectwise.com+json; version=3.0.0",
"Content-Type": "application/json",
"clientId": "cb3e7a7f-fac1-4bc9-854a-a9676cb83d83"
},
"form": {},
"json": {
"name": "Power Home Remodeling Group LLC",
import json
# get mappings from https://my.bedrockdata.com/v2/mappings
with open("mappings.json", "r") as read_file:
mappings = json.load(read_file)
# get schema from https://my.bedrockdata.com/v2/agents/dynamicscrm0/schema
with open("schema.json", "r") as read_file:
schema = json.load(read_file)
@MatthewJBloom
MatthewJBloom / sumo_url.py
Created April 30, 2020 01:07
Sumo Search URL Generator
# import urllib.parse # for python 3
import urllib
"""
Given a customer id and search parameters, generate a sumo logic url.
Comments saved for easy python2 -> python3 conversion.
"""
# https://<endpoint>/ui/index.html#section/search/@<start>,<end>@<urlEncodedQuery>
@MatthewJBloom
MatthewJBloom / search_str.coffee
Created April 15, 2020 21:18
Ignore HS_TIME_IN_ fields
names = ['HS_TIME_IN_APPOINTMENTSCHEDULED', 'HS_TIME_IN_CLOSEDLOST',
'HS_TIME_IN_CLOSEDWON', 'test']
console.log('Testing multiple: ', names)
search_str = 'HS_TIME_IN_'
for name in names
if(name.indexOf(search_str) != -1)
console.log(name, 'ignore me!')
else
site.webmanifest:1 GET https://my.bedrockdata.com/icons/site.webmanifest 404 (Not Found)
site.webmanifest:1 Manifest: Line: 1, column: 1, Syntax error.
main.js:372 Deprecation warning: Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.
r @ main.js:372
(anonymous) @ main.js:372
s.context @ main.js:397
o @ main.js:370
_getContext @ main.js:370
renderTemplate @ main.js:370
(anonymous) @ main.js:370
@MatthewJBloom
MatthewJBloom / gist:3daded5eb826d5d01b19d7754988b2d3
Created March 24, 2020 21:34
New_SalesManagerId optional fields to map
"New_SalesManagerId": {
"ownerid": "10ee61ad-6529-e911-a98c-000d3a324a3e",
"address1_fax": null,
"po_templatefolders": null,
"new_isactive": false,
"organizationid": "40cca42c-a34a-4126-9290-a49c60f2006e",
"defaultodbfoldername": "Dynamics365",
"address1_postofficebox": null,
"accessmode": 0,
"address1_upszone": null,
https://my.bedrockdata.com/v2/normaldocs/5e6fefa806d58f016e7a85df
{
"_customer": "5a1c1f5505a1ae6f77faf68d",
"type": "Contact",
"rels": {
"Company": [
"hubspot0/company/3186813753",
"autotask1/account/258"
]
},