The document discusses new API methods for managing accounts within a Google Ad Manager managed customer center (MCC) structure programmatically. It introduces three new ManagedCustomerService methods - mutateLink to add/remove accounts from an MCC, getPendingInvitations to retrieve pending account invitations, and mutateManager to move accounts between MCCs. It provides examples of how these methods can be used to extend and manage account invitations and links throughout the lifecycle within the MCC structure.
1 of 34
Downloaded 40 times
More Related Content
New and Improved MCC Services
1. New & Improved
MCC Services
Managing thousands of accounts the
automated way!
Google Confidential and Proprietary
2. Agenda
1. Motivation
¡ð The need for a new service
2. Introducing new API service methods
¡ð What do they do?
3. The lifecycle of a managed account
¡ð Using the new functionality
¡ð Common use-case code samples
4. Mind your budgets
¡ð Possible account level budget implications
5. Q & A
Google Confidential and Proprietary
4. Motivation
¡ñ Until now, developers have not been able to manipulate account
structures programmatically.
¡ñ The manual intervention required to link, unlink or reorganize
accounts within an MCC can prevent the full automation of some
business processes.
¡ð For example, onboarding a customer account.
Google Confidential and Proprietary
5. Common use-cases
¡ñ Reorganising accounts according to business needs
¡ñ API / platform efficiency improvements: Maintaining an "inactive
accounts" MCC
¡ñ Taking control of (onboarding) an existing client account
¡ñ Day-to-day management of complex MCC structures
¡ñ Relinquishing control of an account no longer managed by a
platform
Google Confidential and Proprietary
7. ManagedCustomerService: Three new methods
ManagedCustomerService.mutateLink:
Performs various actions required to add or remove accounts to / from
an MCC
MutateLink actions: MCC
Account 0
Account 1
Account 2
Account 3
Google Confidential and Proprietary
8. ManagedCustomerService: Three new methods
ManagedCustomerService.mutateLink:
Performs various actions required to add or remove accounts to / from
an MCC
MutateLink actions: MCC
¡ñ Extend an invitation
Account 0
Invite extended
to Account 1
Account 1
Invite extended
to Account 2
Account 2
Invite extended
to Account 3
Account 3
Google Confidential and Proprietary
9. ManagedCustomerService: Three new methods
ManagedCustomerService.mutateLink:
Performs various actions required to add or remove accounts to / from
an MCC
MutateLink actions: MCC
¡ñ Extend an invitation
¡ñ Rescind an invitation Account 0
Account 1
Account 2
Rescind invitation
to Account 3
Account 3
Google Confidential and Proprietary
10. ManagedCustomerService: Three new methods
ManagedCustomerService.mutateLink:
Performs various actions required to add or remove accounts to / from
an MCC
MutateLink actions: MCC
¡ñ Extend an invitation
¡ñ Rescind an invitation Account 0
Account 1
¡ñ Accept an invitation (client account accepts invite
only action) Account 1
Account 2
Account 3
Google Confidential and Proprietary
11. ManagedCustomerService: Three new methods
ManagedCustomerService.mutateLink:
Performs various actions required to add or remove accounts to / from
an MCC
MutateLink actions: MCC
¡ñ Extend an invitation
¡ñ Rescind an invitation Account 0
¡ñ Accept an invitation (client account
only action) Account 1
Account 2
¡ñ Reject an invitation (client account rejects invite
only action)
Account 2
Account 3
Google Confidential and Proprietary
12. ManagedCustomerService: Three new methods
ManagedCustomerService.mutateLink:
Performs various actions required to add or remove accounts to / from
an MCC
MutateLink actions: MCC
¡ñ Extend an invitation
¡ñ Rescind an invitation Account 0
¡ñ Accept an invitation (client account MCC terminates
Account 1 link
only action) Account 1
¡ñ Reject an invitation (client account
only action)
Account 2
¡ñ Terminate the link between an
MCC and client account
Account 3
Google Confidential and Proprietary
13. ManagedCustomerService: Three new methods
ManagedCustomerService.mutateLink:
Performs various actions required to add or remove accounts to / from
an MCC
MutateLink actions: MCC
¡ñ Extend an invitation Account 0
terminates link
¡ñ Rescind an invitation Account 0
¡ñ Accept an invitation (client account
only action) Account 1
¡ñ Reject an invitation (client account
only action)
Account 2
¡ñ Terminate the link between an
MCC and client account
Account 3
Google Confidential and Proprietary
14. ManagedCustomerService: Three new methods
ManagedCustomerService.getPendingInvitations:
Retrieves pending invitations.
¡ñ Can be invoked by either the manager (MCC) or the client.
¡ñ Once an invitation has been accepted, declined or rescinded, it will no
longer be in a pending state.
¡ñ Pending invitations are available via the ManagedCustomerService.
getPendingInvitations method.
¡ñ Accepted links will be available via the ManagedCustomerService.get
method.
¡ñ Declined, Rescinded and Terminated links will not be available through
the ManagedCustomerService at all.
Google Confidential and Proprietary
15. ManagedCustomerService: Three new methods
ManagedCustomerService.mutateManager:
Enables you to move accounts between MCCs within your account
structure
¡ñ Move a client account to or from any MCC within your structure
¡ñ Both MCCs (to and from) must be managed by the effective user
¡ñ MCCs cannot currently be moved using this method
¡ñ To move an MCC: Terminate its link to the parent MCC and
establish a new link using the mutateLink method.
Google Confidential and Proprietary
16. ManagedCustomerService: Three new methods
ManagedCustomerService.mutateManager:
MCC 0
MCC 1 MCC 2
Account 0 Account 1 Account 2
¡ñ Account 1 is moved from 'MCC 1' to 'MCC 2'
¡ñ This action can only be completed by 'MCC 0'
Google Confidential and Proprietary
17. ManagedCustomerService: Three new methods
ManagedCustomerService.mutateManager:
MCC 0
MCCs can be
nested upto 5
levels deep
MCC 1 MCC 2
Account 0 Account 1 Account 2
Google Confidential and Proprietary
18. The lifecycle of a
managed account
Google Confidential and Proprietary
19. Java code sample
1. MCC extends a link invitation to a client account.
2. [Optional] Retrieve the invitation.
3. The client account accepts the invitation.
4. [Optional] The client is moved to another MCC within the structure.
5. The MCC terminates its link to the client account.
Google Confidential and Proprietary
20. Java code sample
MCC extends a link invitation to a client account
// Get the ManagedCustomerService (for top level MCC).
ManagedCustomerServiceInterface managedCustomerService =
adWordsServices.get(mccSession,
ManagedCustomerServiceInterface.class);
// Create a 'pending' link between sub MCC 0 and client account.
ManagedCustomerLink inviteLink = new ManagedCustomerLink();
inviteLink.setClientCustomerId(CLIENT_ACCOUNT_CID);
inviteLink.setLinkStatus(LinkStatus.PENDING);
inviteLink.setManagerCustomerId(SUB_MCC0_CID);
Top MCC
sub MCC 0 sub MCC 1
Client
Account
Google Confidential and Proprietary
21. Java code sample
MCC extends a link invitation to a client account
(continued)
// Send invitation to client account.
LinkOperation inviteLinkOp = new LinkOperation();
inviteLinkOp.setOperand(inviteLink);
inviteLinkOp.setOperator(Operator.ADD);
managedCustomerService.mutateLink(
new LinkOperation[]{inviteLinkOp});
Top MCC
sub MCC 0 sub MCC 1
Client
Account
Google Confidential and Proprietary
22. Java code sample
MCC extends a link invitation to a client account:
MutateLinkResponse
<ns2:mutateLinkResponse
xmlns="https://adwords.google.com/api/adwords/cm/v201302" xmlns:ns2="
https://adwords.google.com/api/adwords/mcm/v201302">
<ns2:rval>
<ns2:links>
<ns2:managerCustomerId>SUB_MCC0_CID</ns2:managerCustomerId>
<ns2:clientCustomerId>CLIENT_ACCOUNT_CID</ns2:clientCustomerId>
<ns2:linkStatus>PENDING</ns2:linkStatus>
</ns2:links>
</ns2:rval>
</ns2:mutateLinkResponse>
Top MCC
sub MCC 0 sub MCC 1
Client
Account
Google Confidential and Proprietary
23. Java code sample
Retrieve the invitation
// Set session customer ID to sub MCC 0.
mccSession.setClientCustomerId("SUB_MCC0_CID");
// Retrieve all pending invites.
// This can also be performed by the client account.
PendingInvitationSelector selector =
new PendingInvitationSelector();
PendingInvitation[] invitations =
managedCustomerService.getPendingInvitations(selector);
Google Confidential and Proprietary
24. Java code sample
Retrieve the invitation:
getPendingInvitationsResponse
<ns2:getPendingInvitationsResponse xmlns="https://adwords.google.
com/api/adwords/cm/v201302" xmlns:ns2="https://adwords.google.
com/api/adwords/mcm/v201302">
<ns2:rval>
<ns2:manager>
<ns2:name>SUB MCC 0</ns2:name>
<ns2:login>submcc0@company.com</ns2:login>
<ns2:companyName>Google Inc</ns2:companyName>
<ns2:customerId>SUB_MCC_0_CID</ns2:customerId>
<ns2:canManageClients>true</ns2:canManageClients>
<ns2:testAccount>false</ns2:testAccount>
</ns2:manager>
....
Google Confidential and Proprietary
26. Java code sample
The client account accepts the invitation
// Get the ManagedCustomerService (for client account).
managedCustomerService =
adWordsServices.get(clientAccountSession,
ManagedCustomerServiceInterface.class);
// Create an 'active' link between sub MCC 0 and client account.
ManagedCustomerLink activeLink = new ManagedCustomerLink();
activeLink.setClientCustomerId(CLIENT_ACCOUNT_CID);
// Set LinkStatus.REFUSED to decline the invite.
activeLink.setLinkStatus(LinkStatus.ACTIVE);
activeLink.setManagerCustomerId(SUB_MCC0_CID);
Top MCC
sub MCC 0 sub MCC 1
Client
Account
Google Confidential and Proprietary
27. Java code sample
The client account accepts the invitation
(continued)
// Accept the invitation.
LinkOperation acceptInviteLinkOp = new LinkOperation();
acceptInviteLinkOp.setOperand(activeLink);
acceptInviteLinkOp.setOperator(Operator.SET);
managedCustomerService.mutateLink(
new LinkOperation[]{acceptInviteLinkOp});
Top MCC
sub MCC 0 sub MCC 1
Client
Account
Google Confidential and Proprietary
28. Java code sample
The client is moved to sub MCC 1
// The top MCC is the only MCC in this structure that manages
// both sub MCCs.
mccSession.setClientCustomerId("TOP_MCC_CID");
managedCustomerService = adWordsServices.get(mccSession,
ManagedCustomerServiceInterface.class);
// The MoveAccountLink.
ManagedCustomerLink moveAccountLink = new ManagedCustomerLink();
CLIENT_ACCOUNT_CID);
moveAccountLink.setClientCustomerId(
moveAccountLink.setLinkStatus(LinkStatus.ACTIVE);
moveAccountLink.setManagerCustomerId(SUB_MCC1_CID);
Top MCC
sub MCC 0 sub MCC 1
Client
Account
Google Confidential and Proprietary
29. Java code sample
The client is moved to sub MCC 1 (continued)
MoveOperation moveAccountOp = new MoveOperation();
moveAccountOp.setOldManagerCustomerId(SUB_MCC0_CID);
moveAccountOp.setOperator(Operator.SET);
moveAccountOp.setOperand(moveAccountLink);
managedCustomerService.mutateManager(
new MoveOperation[]{moveAccountOp});
Top MCC
sub MCC 0 sub MCC 1
Client
Account
Google Confidential and Proprietary
30. Java code sample
The client is moved to sub MCC 1:
mutateManagerResponse
<ns2:mutateManagerResponse xmlns="https://adwords.google.
com/api/adwords/cm/v201302" xmlns:ns2="https://adwords.google.
com/api/adwords/mcm/v201302">
<ns2:rval>
<ns2:links>
<ns2:managerCustomerId>SUB_MCC1_CID</ns2:managerCustomerId>
<ns2:clientCustomerId>CLIENT_ACCOUNT_CID</ns2:clientCustomerId>
<ns2:linkStatus>ACTIVE</ns2:linkStatus>
</ns2:links>
</ns2:rval>
</ns2:mutateManagerResponse>
Top MCC
sub MCC 0 sub MCC 1
Client
Account
Google Confidential and Proprietary
31. Java code sample
The MCC terminates its link to the client account
// Link can be terminated by either the client or the manager.
ManagedCustomerLink linkToTerminate = new ManagedCustomerLink();
CLIENT_ACCOUNT_CID);
linkToTerminate.setClientCustomerId(
linkToTerminate.setLinkStatus(LinkStatus.INACTIVE);
linkToTerminate.setManagerCustomerId(SUB_MCC1_CID);
Top MCC
sub MCC 0 sub MCC 1
Client
Account
Google Confidential and Proprietary
33. Account Level Budgets
'Managed Defined Order' (MDO) users beware: Breaking the link
between an account and the MDO on which its account budget relies,
will end the budget
MCC 0
MCC 1 MCC 2
MDO
MDO - Budget
Budget linked
link broken
to MDO
Account 1
Budget
BudgetBudget
Active Ended
Google Confidential and Proprietary