New and Improved MCC Services

34
Google Confidential and Proprietary New & Improved MCC Services Managing thousands of accounts the automated way!

Transcript of New and Improved MCC Services

Page 1: New and Improved MCC Services

Google Confidential and Proprietary

New & Improved MCC ServicesManaging thousands of accounts the automated way!

Page 2: New and Improved MCC Services

Google Confidential and Proprietary

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

Page 3: New and Improved MCC Services

Google Confidential and Proprietary

Motivation

Page 4: New and Improved MCC Services

Google Confidential and Proprietary

● 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.

Motivation

Page 5: New and Improved MCC Services

Google Confidential and Proprietary

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

Page 6: New and Improved MCC Services

Google Confidential and Proprietary

Introducing new API service methods

Page 7: New and Improved MCC Services

Google Confidential and Proprietary

MutateLink actions: MCC

Account 1

Account 0

Account 2

Account 3

ManagedCustomerService: Three new methods

ManagedCustomerService.mutateLink:

Performs various actions required to add or remove accounts to / from an MCC

Page 8: New and Improved MCC Services

Google Confidential and Proprietary

MutateLink actions:

Account 1

Account 0

Account 2

● Extend an invitation

Invite extended to Account 1

Invite extended to Account 2

Account 3

Invite extended to Account 3

MCC

ManagedCustomerService: Three new methods

ManagedCustomerService.mutateLink:

Performs various actions required to add or remove accounts to / from an MCC

Page 9: New and Improved MCC Services

Google Confidential and Proprietary

MutateLink actions:

Account 1

Account 0

Account 2

● Extend an invitation

Account 3

● Rescind an invitation

Rescind invitation to Account 3

MCC

ManagedCustomerService: Three new methods

ManagedCustomerService.mutateLink:

Performs various actions required to add or remove accounts to / from an MCC

Page 10: New and Improved MCC Services

Google Confidential and Proprietary

MutateLink actions:

Account 1

Account 0

Account 2

● Extend an invitation

Account 3

● Rescind an invitation● Accept an invitation (client account

only action)

Account 1 accepts invite

MCC

ManagedCustomerService: Three new methods

ManagedCustomerService.mutateLink:

Performs various actions required to add or remove accounts to / from an MCC

Page 11: New and Improved MCC Services

Google Confidential and Proprietary

MutateLink actions:

Account 1

Account 0

Account 2

● Extend an invitation

Account 3

● Rescind an invitation● Accept an invitation (client account

only action)Account 2

rejects invite

MCC

● Reject an invitation (client account only action)

ManagedCustomerService: Three new methods

ManagedCustomerService.mutateLink:

Performs various actions required to add or remove accounts to / from an MCC

Page 12: New and Improved MCC Services

Google Confidential and Proprietary

MutateLink actions:

Account 1

Account 0

Account 2

● Extend an invitation

Account 3

● Rescind an invitation● Accept an invitation (client account

only action)MCC terminates Account 1 link

MCC

● Reject an invitation (client account only action)

● Terminate the link between an MCC and client account

ManagedCustomerService: Three new methods

ManagedCustomerService.mutateLink:

Performs various actions required to add or remove accounts to / from an MCC

Page 13: New and Improved MCC Services

Google Confidential and Proprietary

MutateLink actions:

Account 1

Account 0

Account 2

● Extend an invitation

Account 3

● Rescind an invitation● Accept an invitation (client account

only action)

Account 0 terminates link

MCC

● Reject an invitation (client account only action)

● Terminate the link between an MCC and client account

ManagedCustomerService: Three new methods

ManagedCustomerService.mutateLink:

Performs various actions required to add or remove accounts to / from an MCC

Page 14: New and Improved MCC Services

Google Confidential and Proprietary

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.

ManagedCustomerService: Three new methods

Page 15: New and Improved MCC Services

Google Confidential and Proprietary

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.

ManagedCustomerService: Three new methods

Page 16: New and Improved MCC Services

Google Confidential and Proprietary

MCC 0

Account 2

MCC 1 MCC 2

Account 0

ManagedCustomerService: Three new methods

ManagedCustomerService.mutateManager:

Account 1

● Account 1 is moved from 'MCC 1' to 'MCC 2'● This action can only be completed by 'MCC 0'

Page 17: New and Improved MCC Services

Google Confidential and Proprietary

MCC 0

Account 2

MCC 1 MCC 2

Account 0

ManagedCustomerService: Three new methods

ManagedCustomerService.mutateManager:

Account 1

MCCs can be nested upto 5 levels deep

Page 18: New and Improved MCC Services

Google Confidential and Proprietary

The lifecycle of a managed account

Page 19: New and Improved MCC Services

Google Confidential and Proprietary

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.

Page 20: New and Improved MCC Services

Google Confidential and Proprietary

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);

sub MCC 0 sub MCC 1

Client Account

Top MCC

Page 21: New and Improved MCC Services

Google Confidential and Proprietary

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});

sub MCC 0 sub MCC 1

Client Account

Top MCC

Page 22: New and Improved MCC Services

Google Confidential and Proprietary

Java code sample

MCC extends a link invitation to a client account:MutateLinkResponse

<ns2:mutateLinkResponsexmlns="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>

sub MCC 0 sub MCC 1

Client Account

Top MCC

Page 23: New and Improved MCC Services

Google Confidential and Proprietary

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);

Page 24: New and Improved MCC Services

Google Confidential and Proprietary

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>[email protected]</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> ....

Java code sample

Retrieve the invitation:getPendingInvitationsResponse

Page 25: New and Improved MCC Services

Google Confidential and Proprietary

Java code sample

Retrieve the invitation:getPendingInvitationsResponse (continued)

....

<ns2:client> <ns2:name>Client Account</ns2:name> <ns2:login>[email protected]</ns2:login> <ns2:companyName>Google Inc</ns2:companyName> <ns2:customerId>CLIENT_ACCOUNT_CID</ns2:customerId> <ns2:canManageClients>false</ns2:canManageClients> <ns2:testAccount>false</ns2:testAccount> </ns2:client> <ns2:creationDate>20130313 113459 Europe/London</ns2:creationDate> <ns2:expirationDate>20130412 123459 Europe/London</ns2:expirationDate> </ns2:rval></ns2:getPendingInvitationsResponse>

Page 26: New and Improved MCC Services

Google Confidential and Proprietary

// 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);

Java code sample

The client account accepts the invitation

sub MCC 0 sub MCC 1

Client Account

Top MCC

Page 27: New and Improved MCC Services

Google Confidential and Proprietary

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});

sub MCC 0 sub MCC 1

Client Account

Top MCC

Page 28: New and Improved MCC Services

Google Confidential and Proprietary

// 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();moveAccountLink.setClientCustomerId(CLIENT_ACCOUNT_CID);moveAccountLink.setLinkStatus(LinkStatus.ACTIVE);moveAccountLink.setManagerCustomerId(SUB_MCC1_CID);

Java code sample

The client is moved to sub MCC 1

sub MCC 0 sub MCC 1

Client Account

Top MCC

Page 29: New and Improved MCC Services

Google Confidential and Proprietary

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});

sub MCC 0 sub MCC 1

Client Account

Top MCC

Page 30: New and Improved MCC Services

Google Confidential and Proprietary

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>

sub MCC 0 sub MCC 1

Client Account

Top MCC

Page 31: New and Improved MCC Services

Google Confidential and Proprietary

// Link can be terminated by either the client or the manager.

ManagedCustomerLink linkToTerminate = new ManagedCustomerLink();linkToTerminate.setClientCustomerId(CLIENT_ACCOUNT_CID);linkToTerminate.setLinkStatus(LinkStatus.INACTIVE);linkToTerminate.setManagerCustomerId(SUB_MCC1_CID);

Java code sample

The MCC terminates its link to the client account

sub MCC 0 sub MCC 1

Client Account

Top MCC

Page 32: New and Improved MCC Services

Google Confidential and Proprietary

Mind your budgets

Page 33: New and Improved MCC Services

Google Confidential and Proprietary

MCC 0

MCC 1 MCC 2

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

Account 1

MDO

Budget

Budget linked to MDO

MDO - Budget link broken

Active BudgetBudget Ended

Page 34: New and Improved MCC Services

Q&A