►
From YouTube: Support Ops - Zendesk - ZD Partner-SFDC Sync
Description
Jason Colyer, Support Operations Manager, takes us through how the ZD-SFDC sync works
A
Hey
y'all
jason
support
operations
manager
here
at
git
lab
and
today
we're
going
to
go
over
the
zendesk
salesforce
sync
for
partners.
Specifically
it's
one
of
the
three
sync
mechanisms
we
got
in
place.
We've
got
the
one
for
the
main
instance,
one
for
the
federal
instance
and
this
one
we
call
partners,
even
though
it
also
sinks
to
the
main
instance.
The
reason
for
that
is
partners
are
slightly
different
in
how
they
think
so.
A
A
So
yeah.
Let
me
share
my
screen
and
we
will
get
started
cool
real,
quick
mike.
Are
you
able
to
read
this
or
do
I
need
to
zoom
in
for.
A
Awesome
cool,
so
here
we've
got
the
repo
itself.
We've
got
the
basic
readme
file,
it
just
kind
of
tells
you
what
it
is:
the
required
gems,
which
in
this
case
json
oj
and
restforce
I'll,
go
over
those
a
bit
with
the
gem
file,
a
file
tree
that
shows
all
the
different
files
and
then
the
soql
query
that
is
used
and
again
like
I'll
go
over
that
more
when
we
get
to
it
in
the
salesforce
file,
but
the
big
way
that
this
works
is
through
this
gitlab
ci
file.
A
One
thing
you'll
definitely
learn
from
this
video
is
I'm
not
original
on
naming,
so
everything
has
pretty
bland
names.
The
stages
are
gather
data,
compare
and
sync,
and
we've
got
the
cache
path
of
vendor
ruby.
That's
to
help
it
speed
along
a
little
bit.
If
you
have
to
retry
jobs
the
before
script,
I
haven't
output,
the
ruby
version
useful
for
debugging
purposes,
especially
if
the
ruby
image
being
used
from
docker
updates.
A
A
A
Precinct
zendesk
org
report
and
the
precinct
sf
org
report.
They
both
run
only
via
schedules.
The
zendesk
org
report
will
gather
the
zendesk
organizations
the
salesforce
one
will
gather
salesforce
accounts
and
they'll
both
generate
artifacts
that
expire
in
four
hours.
The
zendesk
one
generates
zendesk.json,
which
will
just
have
all
the
partner
organizations
in
it
or
more.
A
More
specifically,
all
organizations
in
it
since
there's
not
a
great
search
term,
for
that
the
salesforce
will
generate
two
different
artifacts
we've
got
salesforce.json,
which
will
contain
all
our
syncable
sales
force,
organizations
that
are
partners
and
then
salesforceproblems.json,
which
will
contain
any
problems
that
the
gather
sage
found.
That
would
prevent
syncing.
A
The
big
one
would
be
duplicate
names,
since
it's
like,
I
can't
figure
out
which
one's
the
real
org
the
compare
stage
is.
The
precinct.
Org
comparison
report
is
the
job
it
needs.
These
two
previous
gather
data
stage
jobs
that
way
it
can
run
since
it's
using
the
artifact
files,
namely
the
zest.json
salesforce.json,
runs
only
via
schedule.
It
runs
the
compare
organizations
and
it'll
create
two
different
artifacts
creates
and
updates.json,
which
will
contain
information
about
what
orgs
to
create
and
what
orgs
to
update.
A
A
It's
requiring
the
zendesk
zd
sfdc
sync
partners
file
and
then
it's
basically
calling
the
module
the
class
and
telling
it
to
run
you'll
find
out.
The
rest
of
them
are
pretty
much
the
same.
The
zendesk
one
will
call
zendesk
salesforce
partners,
zendesk
gather,
run
or
zendesk
sync
run,
I'm
not
original
on
the
scripting
there.
So
it's
pretty
much
just
easier
to
call
that
than
in
the
scripts.
For
that
ci
file,
say
oh
yeah
require
this
and
then
run
this
and
then
run
this.
A
Let's
go
over
the
gym
file.
Real
quick,
like
I
said
I
would
cool.
So
this
is
a
very
basic
gem
file.
It's
requiring
three
gems
json
oj
and
restforce
json,
being
a
gem,
slash
library
to
handle
json
objects
converting
to
and
from
ruby
objects.
A
Oj
is
a
nice
gem
that
I
like
to
use.
It
takes
http,
headers
and
requests
and
stuff
like
that
and
makes
them
into
ruby
objects,
so
they're
easy
to
work
with,
and
then
restforce
is
the
official
salesforce
gem
to
interact
with
the
salesforce
api.
The
reason
I
call
4.2.2
specifically
is
that's
the
version.
I've
tested,
newer
versions,
might
change
api,
endpoints
or
syntax
or
stuff
like
that,
haven't
been
tested
yet.
A
A
All
right
so
the
zendesk
or
zd
sftc
sync
partners.rb
file,
which
is
the
main
file.
You
saw
the
script,
requiring
it's
going
to
declare
the
module,
zendesk
salesforce
partners,
prepare
to
hear
me
say
that
statement
a
lot
and
it's
going
to
require
bundler
setup
and
then
the
bundler
is
I'm
going
to
call
bundler
to
require
default,
which
is
a
fancy
way
of
saying
I'm
requiring
the
bundler
gem
and
then
telling
bundler
to
read
the
gem
file
and
require
everything
else.
I
need
this
particular
script.
A
Only
has
three
gems,
so
I
could
have
said
require
json
require
oj,
require
rest
force,
but
when
you
start
building
up
your
scripts,
you
get
to
where
it's
like.
Oh
there's,
like
30
gems,
I'm
using
it'd,
be
really
annoying
to
type
out
require
that
many
times.
So
this
is
a
nice
little
shortcut
that
just
says
right
require
everything
you've
already
installed
and
then
from
there
I'm
requiring
relative
to
call
the
client
file.
A
So
the
client
file
would
be
the
next
thing
to
go
over
and
once
again
I've
been
clearing
the
modules
into
salesforce
sync
partners
and
then
I'm
declaring
a
class
called
clients.
Here,
I'm
requiring
a
compare,
salesforce
and
zendesk
scripts
which
we'll
go
over
in
a
bit.
A
I
declare
a
function
called
retry
options.
It
just
contains
a
hash
that
has
basically
options
for
telling
faraday
how
to
handle
certain
failures,
in
this
case
connection
failed
and
timeout
error,
and
what
this
is
saying
is
you're
allowed
five
max
retries.
I
want
an
interval
at
least
of
a
second.
I
want
some
randomness
of
0.5,
so
it'll
tweak
the
interval
a
bit.
So
it's
not
always
the
same.
The
back
off
period
between
failures
is
at
least
two
seconds
or
is
the
backup
factor
is
two
meaning.
A
If
you
get
the
same
error
twice,
make
sure
you
wait
a
bit,
but
all
this
will
be
passed
to
faraday,
to
tell
us
how
to
handle
errors.
That
way.
When
we
get
a
timeout
or
a
connection
failed,
we
just
don't
abort
the
script
instead,
it'll
say
cool.
This
is
what
I
should
do.
I
should
retry.
A
A
That's
what's
been
tested
with
4.2.2
restforce,
I
believe
salesforce
is
actually
up
to
52.0.
So
I
need
to
do
some
testing
to
see
how
the
new
versions
differ
and
all
that
fun
stuff.
A
A
I'm
setting
the
the
adapter
to
whatever
the
default
adapter
for
faraday
is
I'm
setting
the
content
type
in
the
headers
to
application
json,
not
as
required
for
get
request,
but
when
we
do
like,
creates
and
updates
which
we'll
use
like
post
input
absolutely
required
because
we're
going
to
be
sending
off
json
and
receiving
json.
So
it's
important
to
make
sure
that
the
content
tag
knows
what
it's
dealing
with
and
then
I'm
saying
the
basic
auth
to
be
a
username
token
and
then
the
actual
api
token.
A
As
a
fun
fact,
basic
auth
is
being
deprecated.
I
found
that
out
when
I
coded
this
the
other
day.
So
eventually
this
will
be
updated
to
use
the
new
method,
which
will
pretty
much
be
the
same
thing
just
with
whatever
new
official
method
to
do
basic
authentication
through
faraday
requests,
and
then
we've
got
this
request
function.
A
This
takes
an
http
method,
url
and
parameters
parameters
are
by
default,
set
to
an
empty
hash,
but
this
allows
me
to
customize
if
needed,
and
all
this
is
doing
is
doing
a
public
send
on
that
faraday
object
using
the
http
method
and
a
url
which
will
be
appended
to
that
url.
We
set
up
here
and
whatever
parameters,
I'm
passing
it's
going
to
take
whatever
the
response
is
and
send
the
body
to
oj.
A
A
Cool
so
I'll
go
to
the
next
stuff,
yeah
we'll
start
with
salesforce,
that's
the
easier
one
to
kind
of
start
with,
so
we
have
salesforce
you'll
notice.
I'm
doing
this
less
thing.
Client,
that's
basically
ruby
for
saying
inherent
what's
already
in
client,
it
makes
it
so
I
don't
have
to
say
zendesk
salesforce,
sync
partners
coloncolonclient.salesforce.
A
Instead,
I
can
just
say
salesforce:
it's
it's
already
inherited
that
it
makes
it
really
easy
to
call
to
it.
We've
got
this
run
function
which
you
saw
a
reference
to
the
script.
All
this
is
doing.
This
basically
is
doing
everything.
This
would
actually
do
so.
It's
gathering
the
data
verifying
it
reporting
on
it
and
making
our
artifacts
gather
is
just
printing
out
that
it's
gathering
date
gathering
the
data.
A
It
calls
the
data
function
and
then
it
says
it's
done
and
the
data
function
is
going
to
call
that
salesforce
object
and
run
a
query
and
we're
going
to
pass
this
query
string
we'll
go
over
in
a
bit.
It's
going
to
map
those
results
to
account
objects
we'll
go
over
duplicates
in
a
second
in
a
bit,
so
the
query
string.
This
is
what
we
have
here.
It's
soql,
which
is
salesforce,
object,
query
language.
If
you
know
sql
you're
going
to
notice,
it
looks
almost
the
exact
same,
but
essentially
what
we're
doing
here
is
telling
it.
A
I
want
the
account
id
the
18,
digit
format
or
18
character
format
of
it.
Sorry,
not
digit
the
name,
the
arr,
the
sales
segmentation
or
market
segment,
whatever
you
want
to
refer
to
it
as
the
account
owner
the
number
of
seats
and
the
license,
the
type
which
would
be
like
customer
prospects
or,
in
our
case
partner,
the
technical
account
manager,
the
support
level.
The
manual
support
upgrade
the
region,
the
game
site
health
score,
which,
admittedly,
I
don't
fully
know
how
it's
calculated.
B
A
Risk
my
my
understandings
have
something
to
do
with
likelihood
to
renewal,
but
I'd
say,
look
into
gain
sight
more
to
kind
of
understand
how
they're
doing
that
next
renewal
date
is
a
calculated
feature,
calculated
field
that
basically
looks
at
their
license.
Information
says
this
is
when
they're
supposed
to
renew
next
partners.
A
A
Basically,
it's
telling
us
well,
they
may
be
a
partner
what
their
actual
status
as
a
partner
is,
and
we've
got
partner
track,
which
will
tell
us
what
kind
of
partner
they
are
we're,
selecting
all
this
from
the
account
table
or
account
object
as
it's
referred
to
in
salesforce,
and
we
have
this.
Where
statement,
we
only
want
partners
for
the
same.
We
only
want
it
when
the
status
is
authorized
or.
B
A
And
for
partner
tracks,
we
only
sync
open
selected
technology
technology
is
an
alliance
partner.
It's
called
technology,
not
sure
why.
I
just
accept
that
and
move
on
with
my
life,
so
account
objects
is
basically
going
to
generate
this
hash.
That
will
then
be
used
to
help,
compare
it
to
zendesk
it's
kind
of
putting
it
in
a
format
that
will
be
easily
comparable,
which
we'll
see
when
we
go
over
the
zendesk
stuff.
But
it
all
starts
with
this
check
account
which,
on
main
and
us
federal,
does
considerably
more
on
this
one.
A
It
pretty
much
just
determines
the
type
of
account
and
sets
the
subscriptions
ultimate
and
the
support
level,
because
we
just
default
to
ultimate
for
partners
select
or
always
ultimate
and
open
have
their
own
stuff
that
that
changes
the
requester
to
their
customer,
at
which
point
the
customer's.
So
you
know,
plan
levels
what
we
actually
take
into
effect
and
then
alliance
are
always
ultimate
as
well.
A
The
type
pretty
much
is
just
looking
at
the
partner
track,
and
if
it's
select
it
puts
select
partner
if
open
it's
open
partner
or
it
says,
alliance
partner.
This
is
just
putting
it
into
the
format
that
zendesk
expects
it
in.
So
it's
easier
to
compare
and
we
don't
have
to
worry
about
zendesk,
saying
well.
The
api
name
is
this
in
salesforce
saying
right,
but
the
pretty
string
humans
want
to
see.
Is
this
so
yeah?
That's
all
that
really
does,
and
then
we
pretty
much
just
you
know.
The
name
is
the
account
name.
A
Salesforce
id
is
the
account
salesforce.
So
you
know
the
account
id18
for
the
short
id.
I
just
literally
take
the
first
15
characters,
which
is
the
short
id,
is
just
the
first
15
characters
of
the
18
character,
one
for
support
level.
I
called
out
first
just
in
case
they
have
ultimate
that's
or
they
have
multiple
support
levels.
That's
something
from
main
and
federal.
It
doesn't
apply
here,
but
I
just
kept
the
logic
there
for
sake
of
simple
scripting.
A
Annual
support
upgrade
is
always
set
to
false.
It's
not
going
to
be
true
on
a
partner
partners.
We
don't
do
priority
prospects.
They
have
to
be
authorized
already
at
which
point
they're
not
a
prospect
they're
a
partner
for
the
gain
site
health
score.
I
just
set
it
to
a
string
which
is,
if
it's
empty.
We
don't
want
to
send
nil,
because
that's
going
to
do
weird
things,
we
want
to
set
it
to
an
empty
string.
A
That's
what
zendesk
is
going
to
expect
when
we
pass
that
on
later
on
yeah,
that's
where
that
comes
from
I've
got
determined
region
here,
which
basically
is
just
saying
if
it's
blank
set
it
to
an
empty
string.
Otherwise
put
it
in
this
specific
format.
This
org
region
region
name
to
a
string
dot
down
case,
which
is
just
what
zendesk
is
going
to
expect
a
region
to
say
it
doesn't
expect
it
to
say
a
merit,
expects
it
to
say
or
region
amer.
A
So
the
duplicates
which
we
saw
up
here
we've
got.
This
determined
duplicates
is
what
it
sets
the
variable
to
and
determine
duplicates
is
going
to
take
all
that
salesforce
data
we
have,
and
it's
going
to
group
it
by
the
name
of
the
partner
in
down
case
that
way,
it's
all
lowercase.
So
it's
easier
to
compare
because
zendesk
is
case
sensitive
or
is
not
case
sensitive
on
naming
so
bob
in
all
capital.
A
Letters
equals
bob
and
lower
case
letters,
and
both
of
them
are
going
to
have
the
same
name,
and
since
names
are
unique
in
zendesk
it
will
not
work.
So
what
we
want
to
do
is
basically
say
right,
grab
all
the
names
that
are
the
exact
same,
because
we
can't
sync
those
this
select
right
here
is
basically
saying
right.
So
of
these
group.
Things
only
grab
the
arrays
that
have
a
size
bigger
than
one
meaning,
there's
two
of
them
three
of
them,
four
of
them.
A
The
verified
data
was
is
where
we're
actually
going
to
use
this
duplicates
and
all
we're
doing
is
taking
our
salesforce
data
and
subtracting
duplicates,
because
we
can't
sync
duplicates
there's
no
way
in
the
script
to
say
well,
this
account's
right
and
this
duplicate
is
not
so
we
kind
of
just
go
with
the.
We
can't
sync
them.
That's
something
that
whoever
is
the
account
owner
or
tam,
or
solutions,
architect
or
whoever's,
managing
whomever,
whoever
whomever,
whichever
is
managing
the
account,
would
you
know.
B
B
A
Normally
they
need
to
be
merged
because
they're
the
same
account.
Sometimes
they
just
need
to
be
renamed
either
way,
we'll
fix
it
from
there.
It
reports
on
them
to
let
us
know,
here's
how
many
accounts
are
located.
Here's
how
many
duplicates
I
found
and
then
it's
going
to
print
out
all
the
duplicates
with
their
salesforce
id,
so
you
can
quickly
and
easily
see
which
ones
are
the
probable
ones.
A
The
artifacts
it'll
generate
that
salesforce.json
and
salesforceproblems.json
salesforce.json
contains
the
actual
data
we're
going
to
use
for
the
syncs
salesforce
problems
at
this
point
contains
the
duplicates
that
way.
We
also
have
an
artifact.
We
can
download
and
use
if
needed.
So
any
questions
on
the
salesforce
script.
A
Cool
then
we'll
go
over
to
zendesk.
Oh,
I
should
start
with
the
zendesk
file.
All
the
zendesk
file
does
is
declares
index
class
require
the
gather
and
sync
scripts,
it's
not
very
original,
but
it
allows
me
to
separate
the
scripts
out.
So
we
don't
have
a
huge
file.
I
can
instead
split
it
into
smaller,
easily
digestible
files.
A
You
know,
we've
got
the
modules
index,
salesforce
sync
partners,
and
then
we
declare
the
class
zendesk
here
we're
calling
class
gather.
You
can
see
how
I'm
inheriting
from
client
again
and
run's,
going
to
generate
an
artifact
and
then
report
on
it.
A
So
the
generate
artifact
is
actually
going
to
be
calling
the
data,
which
is
where
we're
going
to
gather
our
orgs
and
all
this
is
doing,
is
making
faraday
requests
to
gather
every
organization
in
zendesk
there's
not
a
great
way
to
search
just
for
the
partners.
A
We
also
don't
just
want
to
search
for
the
partners,
because
if
there's
sync
issues,
we
want
those
to
be
reported
later
on
during
the
actual
sync,
but
essentially
it's
going
to
gather
it's
going
to
paginate
through
every
page
and
as
you
can
imagine,
this
takes
a
while.
It
makes
a
good
number
of
api
calls.
A
It
only
gets
worse
the
more
organizations
we
have,
so
that's
always
fun,
but
it's
essentially
mapping
these
out
to
organization
objects.
A
If
there's
not
a
next
page
in
the
object,
it's
gonna
break
out
and
then
just
return
orgs,
it's
a
fun
fact
in
ruby.
I
don't
have
to
say
return
orgs
by
saying
orgs
is
that
last
statement
it
knows:
hey
yeah,
so
return.
The
last
thing
we
actually
got.
If
I
didn't
have
that
there-
and
I
just
did
quits
done
it-
would
actually
just
return
true,
because
it's
like
right,
I
I
was
able
to
run
the
command
puts
done
so
by
saying
orgs.
A
A
The
only
thing
we
really
have
here
is
we're
grabbing
the
actual
zendesk
id
and
the
tags
this
will
be
used
for
in
partners
case
not
a
whole
lot
in
the
main
and
federal
it's
using
it
to
determine
if
they
have
multiple
subscriptions
and
stuff
like
that,
but
the
essentially
support
level.
I've
got
this
right
here
where
it's
like
return
starter.
If
it
says
basic
because
basic's
not
a
real
plan,
it's
starter
plan.
This
is
completely
not
needed
in
partners,
because
we
already
know
the
support
level
is
ultimate.
A
It's
always
going
to
be
ultimate,
even
if
it's
not
it'll
end
up
saying
I
need
to
update
anyway,
because
it
should
be
ultimate
determined
subscriptions,
which
I
don't
like
it's
there
from
the
main
and
federal,
but
you'll
notice.
It's
not
actually
called
up
here,
because
they
only
have
ultimate
they're
partners.
It's
a
little
simpler.
I
just
didn't
delete
the
function.
A
Clean
tags
is
going
to
duplicate
the
tags.
It's
going
to
remove
all
the
plan
tags
from
it,
and
then
it's
going
to
sort
them
out.
This
will
be
used
later
when
we
compare
them
to
make
sure
they
need
to
be
synced
or
not
again
like
we
do
it
for
this
one.
But
it's
not
super
needed
with
partners,
because
at
the
end
of
the
day,
like
there's,
not
starter
and
premium,
there's
not
bronze
silver
gold,
community
custom,
they're
they're,
only
ultimate
yeah,
so
that's
gathering
all
the
zendesk
or
any
questions
on
that.
One.
A
Awesome
so
we'll
go
back
to
compare
here's
where
we're
actually
going
to
compare
them
and
start
getting
ready
for
the
sync.
We
declare
the
classes.
Compare
we
don't
need
to
inherit
from
client
because
we're
actually
not
making
any
api
requests
at
all.
We're
just
literally
running
some
ruby
on
this
one.
We've
got
the
run
function,
which
does
compare
generate
artifacts
reports.
A
A
Artifacts,
based
on
what
we
need,
but
the
compare
is
essentially
going
to
go
through
every
salesforce
account.
That's
what
accounts
is,
I
believe.
That's
declared
down
here
at
the
bottom
organizations
is
coming
from
data
zendesk
json.
Our
accounts
come
from
salesforce.json,
but
essentially
we're
looping
through
each
account,
I'm
doing
it
with
index.
A
This
is
solely
so
I
can
have
the
script
telling
me
what
number
it's
on,
because
this
does
take
a
little
bit
of
time
and
I
have
a
little
quirk
where,
if
I
see
a
script
saying
it's
running
and
then
nothing
happens
for
like
two
minutes,
I
start
panicking
that
it's
frozen.
This
gives
me
output
pretty
consistently.
So
I
know
it's
constantly
running
and
then
basically,
we're
going
to
in
the
zendesk
works.
A
A
Otherwise,
it's
going
to
determine
if
an
update
is
needed
unless
it
couldn't
find
it
because
we
already
know
it
needs
to
be
created,
so
your
create
object.
It
looks
like
this
and
this
is
starting
to
move
towards
the
format.
Zendesk
wants
it
in.
It
wants
a
name
and
then
it
wants
organization
fields
and
then
it
wants
each
of
those
listed
and
it
wants
the
tags.
A
A
The
com
determine
update
it's
going
to
make
a
comparable
object,
which
basically
is
removing
those
objects.
We
can't
compare
like
there's,
not
a
zendesk
id
in
salesforce,
there's,
not
tags
in
salesforce,
so
you'll
see
it's
essentially
removing
those
it's
ensuring
that
health
score
is
a
string
because
we
really
want
to
compare
it
as
a
string,
and
then
it's
literally
just
saying:
okay,
so
does
that
account
object
equal
our
new,
comparable
object.
A
If
it
does
cool,
nothing
has
to
happen.
It's
already
in
sync,
everything's,
perfect:
it's
going
to
push
that
to
do
nothing,
so
we
have
it
stored
there.
If
it's
not
the
same,
it's
going
to
actually
push
an
update,
object
to
the
updates
array,
which
looks
a
lot
like
the
create
object,
except
it
has
an
id.
A
That's
that's
pretty
much
the
only
difference
it
has
an
id
and
we
also
call
the
update
tags
there,
which
is
essentially
just
going
to
duplicate
them,
ensure
that
that
ultimate
tag
is
there
and
then
it's
going
to
do
a
sort
and
unique,
don't
actually
have
to
sort
them
here,
but
it's
great
for
debugging.
I
like
things
in
alphabetical
order.
So
that's
why
there's
a
sort
it's
not
required.
A
A
It's
a
fun
function
in
ruby
that
says
so
clone
that
and
make
a
whole
new
one.
So
I
can
edit
it
and
do
things
to
it
without
impacting
the
original.
What
this
does
is
allow
me
to
edit
the
tags
without
actually
editing
that
org
tags
object
super
useful.
That
way.
If
I
need
to
debug,
I
can
come
in
here
and
say:
yeah.
B
A
Out
what
the
tags
were
print
out,
what
our
new
tags
were
that
way,
I
can
make
sure
they're
what
they
need
to
be.
If
I
just
mingled
the
tags
object,
then
I
have
the
problem
of.
I
have
to
output
it
before
the
main
goal,
whereas
here
I
could
say,
yeah
push
here
and
then
output
both
after
that
still
have
what
I
need,
but
yeah
beyond
that
we've
got
the
report,
which
is
going
to
tell
us
hey,
I'm
creating.
I
need
to
create
this
many
update
this
many.
A
A
A
I
shouldn't
actually
need
these.
This
is
actually
duplicate
coding
that
I
could
probably
remove,
but
all
I'm
doing
is
creating
these
create,
update
and
errors,
objects
created
and
updated,
or
just
the
number
zero.
That
way
I
can
do
a
quick
valley
count
based
on
successful
and
errors
is
an
array
that
way
I
can
push
a
bunch
of
errors
there
and
at
the
end,
have
nice
output
that
says
hey.
A
I
failed
to
do
it
because
of
these
reasons
so
create
orgs
is
just
gonna
go
through
that
creates,
which
is
you
know
that
creates.json
we
made
and
it's
gonna
do
each
with
index.
I
like
output,
so
there's
output
randomly
telling
me
what
number
it's
on
and
it's
going
to
create.
The
org,
which
is
just
gonna,
make
a
post
request
to
organizations.json
using
a
create
object.
A
If
there's
an
error
in
the
response,
it'll
put
that
into
the
errors
array
in
an
error
string
we
can
use
later.
This
is
the
create
object
which
is
the
ultimate.
This
is
exactly
what
zendesk
wants
has
to
be
in
this
format.
It
wants
you
to
say
it's
an
organization
and
then
go
to
a
hash
and
say
the
name
and
the
tags,
and
then
say
the
organization
fields
and
go
to
a
new
hash,
and
this
is
where,
if
you're
slightly
off
it
will
not
do
things.
A
The
updates
we'll
go
down
here
to
sync
orgs
and
go
back
to
that
object
there.
But
here
I'm
going
to
instead
of
doing
it
one
at
a
time
I'm
going
to
actually
do
a
bulk
update
and
senddesk
has
a
limit.
You
can
only
do
100
of
those
at
a
time,
so
I'm
taking
the
updates.json
list
and
I'm
slicing
it
by
100,
which
is
to
say,
give
me
a
hundred.
Give
me
arrays
that
contain
a
hundred
of
each
100
items
before
you
go
to
the
next
array
from
this.
A
A
So
we
have
it
print
that
out
in
case
we
need
to
debug.
We
can
go
look
at
that
job
status
and
that
will
actually
contain
a
bunch
of
information.
Saying
I
succeeded,
I
failed.
I
succeeded,
you
know
this
is
why
I
failed,
but
essentially
we're
just
going
to
count.
However,
many
orgs
are
in
a
slice
normally
a
hundred,
but
you
know
if
we
have
like
579,
that
last
iteration
you
can
only
have
79
so
we'll
add
that
to
the
updated
and
yeah
after
that,
we're
just
going
to
report
them.
So
we've
got.
A
If
there
are
any
errors
in
the
array,
it's
going
to
actually
print
out
the
error,
count
and
then
print
out
an
error
report
which
is
just
going
to
print
out
a
bunch
of
error
strings
and
all
that
is,
is
this
format
right
here
saying
hey
this
salesforce
id
could
not
be
synced.
This
is
why
99
of
the
time,
the
reason
why
is
duplicate
name
could
not
sync,
there's
already
an
org
with
that
name,
something's
wrong
and
usually
with
at
least
with
updates
or
creates.
A
Cool,
so
that
is
the
basic
gist
of
the
partner
sync.
All
of
this
runs
via
schedules,
ci
cd
schedules,
which
I
believe,
run
every
30
minutes.
Currently,
we've
got
this
in
the
ops.
It's
because
this
is
going
to
output
customer
data
we
needed
to
make
sure
it
was
as
access
controlled
as
possible.
A
That's
what
we've
got
on
this
ops
instance
where
the
admins
are
very
tightly
watched
and
only
specific
people
are
allowed
access
and,
like
as
an
example,
is
partner.
Sync,
I
believe
only
support
ops
and
the
admins
of
the
opposites
can
see
this.
I
have
plans
in
the
future
to
figure
out
how
to
sync
or
mirror
the
scripts
over
to.com
so
that
they're
visible,
but
not
running,
but
yeah.
That's
the
basic
gist
of
that.
A
Oh
yeah,
no
problem
at
all.
Like
I
said
it's,
you
saw
it's
different
enough
that
I
don't
want
it
in
the
main
sync
script.
The
main
sync
script
is
complex
enough.
That's
why
we
kind
of
have
it
here
because
it's
allowed
to
skip
so
much
of
the
checks,
because
it's
always
ultimate.
It
doesn't
matter.
If
salesforce's
salesforce
says
well,
it's
bronze
doesn't
matter.
It's
a
partner
partners
are
always
ultimate.
So
that's
why
it's
separate.
I
like
that.
A
Right
on
any
other
questions,
comments,
thoughts.
B
When
you're
looking
at
the
duplicates,
those
are
duplicates
within
salesforce
itself,.
A
Correct
good
examples:
if
you
a
good
one
I
can
point
out,
is
there
are
about
100
accounts
in
salesforce
called
test,
so.
A
What
it
ends
up
doing
is
in
its
report
for
at
least
maine,
where
that's
a
where
that's
an
issue.
It
has
about
100
lines.
That
say,
I
found
200
duplicates
of
the
word
test
and
it
just
prints
them
all
out.
I've
confirmed
with
sales,
ops
and
sales
in
the
past,
so
things
with
that
nature
of
a
name
will
not
be
synced
because
they're
supposed
to
be
test
accounts.
A
There
could
be
a
point
in
the
future
where
there
is
a
company
called
test,
and
there
is.
We
have
to
fix
that
that
at
which
point
I'll
basically
be
like
there's
99
of
these,
you
got
to
get
rid
of.
A
I
tend
to
check
them
once
a
week
at
minimum,
but
usually
a
little
more
and
I
tend
to
generate
a
report
and
send
it
over
to
sales
saying
hey.
None
of
these
are
going
to
sync
because
of
duplicates
and
let
sales
act
to
you
know
action
on
those
as
they
have
time
and
effort
to
do
so
if
it
comes
up
in
an
actual
ticket
like
a
ticket
and
somebody's
like
hey
this
didn't
sync,
you
don't
have
sla.
A
There's-
and
I
know,
there's
tooling
they're
trying
to
build
in
salesforce
to
prevent
the
duplicate
naming
issue,
because
it's
not
just
zendesk
that
has
a
problem
with
that.
There's
several
other
tools.
We
use
that
do
not
like
things
having
the
same
name.
A
Unfortunately,
not
in
global,
unfortunately,
global
has
over
300
000
contacts.
So
to
get
a
list
of
contacts
in
zendesk
last
conservative
effort
fastest,
I
could
code
fastest,
I
could
get
it
to
run.
It
took
six
and
a
half
hours.
A
Unfortunately,
we
cannot
run
a
ci
cd
job
for
six
and
a
half
hours,
whether
it
be
in
ops
or
gitlab.com,
which
you
cannot
do
that
I
am
actively
working
with
zendesk.
I've
got
a
couple
feature:
requests
of
like
I'd,
love
to
be
able
to
do
this
and
not
need
six
hours.
A
I'd
love
to
not
have
to
iterate
a
hundred
contacts
at
a
time
federal
has
a
contact
sync,
it
does
the
basically
the
same
thing
you
just
saw,
but
with
contacts
with
the
caveat
and
it's
something
I've
addressed
with
like
james
and
federal
is
at
a
certain
point.
We
will
hit
that
threshold
of
it's
too
many
contacts.
We
have
to
stop,
which
will
then
require
some
process
changes
with
zendesk
main.
We
were
already
past
that
threshold
on
like
day
one
when
the
script
with
a
very
first
v1
of
the
script
was
made.
A
A
A
I
say
that
because
it
does
have
errors
every
now
and
then,
especially
when
it's
like.
I
can't
put
this
guy
in
two
different
organizations,
and
it's
like
correct
you
cannot.
We
do
not
have
it
set
up
to
do
that,
but
it
does
help
at
least
eliminate
some
of
that.
Unfortunately,
we
do
encounter
cases
where
they're,
not
in
salesforce
or
it
didn't
sink
them
properly
or
couldn't
associate
that's
why
we
have
a
needs.
A
Cool
well
I'll
call
them
I'll
call
this
all
that
I
appreciate
you
joining.
I
hope
this
was
educational.
I
hope
you
learned
something
if
you
ever
have
questions
or
want
to
talk
about
this
feel
free.
To
put
some
on
my
schedule,
come
to
the
ops
channel
dm
me,
I'm
always
willing
to
talk
about
the
six
scripts.